diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-22 15:28:46 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-05-22 15:28:46 +0000 |
commit | b736a355c143b92a25693faedbd9fbf93a6b2d6c (patch) | |
tree | a8c7fbe34a8f2ecc17295617df88e1dc84426846 /sys/dev/pci | |
parent | d7fe0b65b300e1d10c59e64d084508775547f89f (diff) |
some changes for IBSS mode support (not yet working).
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_iwi.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/if_iwireg.h | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index f888bd27dc4..b027dea352f 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.40 2005/05/22 15:14:10 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.41 2005/05/22 15:28:45 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -1667,6 +1667,7 @@ iwi_config(struct iwi_softc *sc) bzero(&config, sizeof config); config.bluetooth_coexistence = 1; config.multicast_enabled = 1; + config.answer_pbreq = (ic->ic_opmode == IEEE80211_M_IBSS) ? 1 : 0; DPRINTF(("Configuring adapter\n")); error = iwi_cmd(sc, IWI_CMD_SET_CONFIGURATION, &config, sizeof config, 0); @@ -1826,6 +1827,8 @@ iwi_auth_and_assoc(struct iwi_softc *sc) config.bluetooth_coexistence = 1; config.multicast_enabled = 1; config.bg_autodetection = 1; + config.answer_pbreq = + (ic->ic_opmode == IEEE80211_M_IBSS) ? 1 : 0; DPRINTF(("Configuring adapter\n")); error = iwi_cmd(sc, IWI_CMD_SET_CONFIGURATION, &config, sizeof config, 1); @@ -1883,7 +1886,10 @@ iwi_auth_and_assoc(struct iwi_softc *sc) assoc.lintval = htole16(ic->ic_lintval); assoc.intval = htole16(ni->ni_intval); IEEE80211_ADDR_COPY(assoc.bssid, ni->ni_bssid); - IEEE80211_ADDR_COPY(assoc.dst, ni->ni_bssid); + if (ic->ic_opmode == IEEE80211_M_IBSS) + IEEE80211_ADDR_COPY(assoc.dst, etherbroadcastaddr); + else + IEEE80211_ADDR_COPY(assoc.dst, ni->ni_bssid); DPRINTF(("Trying to associate to %s channel %u auth %u\n", ether_sprintf(assoc.bssid), assoc.chan, assoc.auth)); diff --git a/sys/dev/pci/if_iwireg.h b/sys/dev/pci/if_iwireg.h index e65bbb5f9d5..5b2dde71012 100644 --- a/sys/dev/pci/if_iwireg.h +++ b/sys/dev/pci/if_iwireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwireg.h,v 1.13 2005/05/22 15:14:10 damien Exp $ */ +/* $OpenBSD: if_iwireg.h,v 1.14 2005/05/22 15:28:45 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -330,7 +330,7 @@ struct iwi_scan { struct iwi_configuration { u_int8_t bluetooth_coexistence; u_int8_t reserved1; - u_int8_t answer_broadcast_probe_req; + u_int8_t answer_pbreq; u_int8_t allow_invalid_frames; u_int8_t multicast_enabled; u_int8_t exclude_unicast_unencrypted; |