Date: Sat, 1 Mar 2008 23:51:40 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 136616 for review Message-ID: <200803012351.m21Npedv091563@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=136616 Change 136616 by sam@sam_ebb on 2008/03/01 23:50:43 o the channel field in the RXON cmd block (aka IWN_CMD_CONFIGURE) is 16 bits, not 8; don't try to be cute just to be different o document and fillin more of the RXON cmd block Affected files ... .. //depot/projects/vap/sys/dev/iwn/if_iwn.c#5 edit .. //depot/projects/vap/sys/dev/iwn/if_iwnreg.h#3 edit Differences ... ==== //depot/projects/vap/sys/dev/iwn/if_iwn.c#5 (text+kox) ==== @@ -3424,7 +3424,7 @@ /* update adapter's configuration */ sc->config.associd = 0; IEEE80211_ADDR_COPY(sc->config.bssid, ni->ni_bssid); - sc->config.chan = ieee80211_chan2ieee(ic, ni->ni_chan); + sc->config.chan = htole16(ieee80211_chan2ieee(ic, ni->ni_chan)); sc->config.flags = htole32(IWN_CONFIG_TSF); if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) sc->config.flags |= htole32(IWN_CONFIG_AUTO | IWN_CONFIG_24GHZ); @@ -3450,7 +3450,7 @@ "ht_single 0x%x ht_dual 0x%x rxchain 0x%x " "myaddr %6D wlap %6D bssid %6D associd %d filter 0x%x\n", __func__, - sc->config.chan, sc->config.mode, le32toh(sc->config.flags), + le16toh(sc->config.chan), sc->config.mode, le32toh(sc->config.flags), sc->config.cck_mask, sc->config.ofdm_mask, sc->config.ht_single_mask, sc->config.ht_dual_mask, le16toh(sc->config.rxchain), @@ -3549,7 +3549,7 @@ "ht_single 0x%x ht_dual 0x%x rxchain 0x%x " "myaddr %6D wlap %6D bssid %6D associd %d filter 0x%x\n", __func__, - sc->config.chan, sc->config.mode, le32toh(sc->config.flags), + le16toh(sc->config.chan), sc->config.mode, le32toh(sc->config.flags), sc->config.cck_mask, sc->config.ofdm_mask, sc->config.ht_single_mask, sc->config.ht_dual_mask, le16toh(sc->config.rxchain), @@ -3854,7 +3854,7 @@ IEEE80211_ADDR_COPY(sc->config.myaddr, ic->ic_myaddr); IEEE80211_ADDR_COPY(sc->config.wlap, ic->ic_myaddr); /* set default channel */ - sc->config.chan = ieee80211_chan2ieee(ic, ic->ic_curchan); + sc->config.chan = htole16(ieee80211_chan2ieee(ic, ic->ic_curchan)); sc->config.flags = htole32(IWN_CONFIG_TSF); if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan)) sc->config.flags |= htole32(IWN_CONFIG_AUTO | IWN_CONFIG_24GHZ); @@ -3890,7 +3890,7 @@ "ht_single 0x%x ht_dual 0x%x rxchain 0x%x " "myaddr %6D wlap %6D bssid %6D associd %d filter 0x%x\n", __func__, - sc->config.chan, sc->config.mode, le32toh(sc->config.flags), + le16toh(sc->config.chan), sc->config.mode, le32toh(sc->config.flags), sc->config.cck_mask, sc->config.ofdm_mask, sc->config.ht_single_mask, sc->config.ht_dual_mask, le16toh(sc->config.rxchain), ==== //depot/projects/vap/sys/dev/iwn/if_iwnreg.h#3 (text+kox) ==== @@ -274,7 +274,7 @@ uint8_t data[136]; } __packed; -/* structure for command IWN_CMD_CONFIGURE */ +/* structure for command IWN_CMD_CONFIGURE (NB: RXON) */ struct iwn_config { uint8_t myaddr[IEEE80211_ADDR_LEN]; uint16_t reserved1; @@ -287,38 +287,39 @@ #define IWN_MODE_STA 3 #define IWN_MODE_IBSS 4 #define IWN_MODE_MONITOR 6 - - uint8_t reserved4; + uint8_t unused4; /* air propagation */ uint16_t rxchain; #define IWN_RXCHAIN_ANTMSK_SHIFT 1 #define IWN_RXCHAIN_FORCE_MIMO (1 << 14) - uint8_t ofdm_mask; /* basic rates */ uint8_t cck_mask; /* basic rates */ uint16_t associd; uint32_t flags; -#define IWN_CONFIG_24GHZ 0x00000001 -#define IWN_CONFIG_CCK 0x00000002 -#define IWN_CONFIG_AUTO 0x00000004 -#define IWN_CONFIG_SHSLOT 0x00000010 -#define IWN_CONFIG_SHPREAMBLE 0x00000020 -#define IWN_CONFIG_NODIVERSITY 0x00000080 +#define IWN_CONFIG_24GHZ 0x00000001 /* band */ +#define IWN_CONFIG_CCK 0x00000002 /* modulation */ +#define IWN_CONFIG_AUTO 0x00000004 /* 2.4-only auto-detect */ +#define IWN_CONFIG_HTPROT 0x00000008 /* xmit with HT protection */ +#define IWN_CONFIG_SHSLOT 0x00000010 /* short slot time */ +#define IWN_CONFIG_SHPREAMBLE 0x00000020 /* short premable */ +#define IWN_CONFIG_NODIVERSITY 0x00000080 /* disable antenna diversity */ #define IWN_CONFIG_ANTENNA_A 0x00000100 #define IWN_CONFIG_ANTENNA_B 0x00000200 +#define IWN_CONFIG_RADAR 0x00001000 /* enable radar detect */ +#define IWN_CONFIG_NARROW 0x00002000 /* MKK narrow band select */ #define IWN_CONFIG_TSF 0x00008000 #define IWN_CONFIG_HT 0x06400000 #define IWN_CONFIG_HT20 0x02000000 #define IWN_CONFIG_HT40U 0x04000000 #define IWN_CONFIG_HT40D 0x04400000 uint32_t filter; -#define IWN_FILTER_PROMISC (1 << 0) -#define IWN_FILTER_CTL (1 << 1) -#define IWN_FILTER_MULTICAST (1 << 2) -#define IWN_FILTER_NODECRYPT (1 << 3) -#define IWN_FILTER_BSS (1 << 5) - - uint8_t chan; - uint8_t reserved5; +#define IWN_FILTER_PROMISC (1 << 0) /* pass all data frames */ +#define IWN_FILTER_CTL (1 << 1) /* pass ctl+mgt frames */ +#define IWN_FILTER_MULTICAST (1 << 2) /* pass multi-cast frames */ +#define IWN_FILTER_NODECRYPT (1 << 3) /* pass unicast undecrypted */ +#define IWN_FILTER_BSS (1 << 5) /* station is associated */ +#define IWN_FILTER_ALLBEACONS (1 << 6) /* pass overlapping bss beacons + (must be associated) */ + uint16_t chan; /* IEEE channel # of control/primary */ uint8_t ht_single_mask; /* single-stream basic rates */ uint8_t ht_dual_mask; /* dual-stream basic rates */ } __packed;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803012351.m21Npedv091563>
