Index: sys/dev/iwm/if_iwm.c =================================================================== --- sys/dev/iwm/if_iwm.c +++ sys/dev/iwm/if_iwm.c @@ -3303,12 +3303,15 @@ */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = le16toh(phy_info->channel); if (le16toh(phy_info->phy_flags & IWM_RX_RES_PHY_FLAGS_BAND_24)) { rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); + rxs.c_band = IEEE80211_CHAN_2GHZ; } else { rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_5GHZ); + rxs.c_band = IEEE80211_CHAN_5GHZ; } /* rssi is in 1/2db units */ @@ -3414,10 +3417,12 @@ */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = channel; rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, channel <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); + rxs.c_band = channel <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ; /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2; Index: sys/dev/rtwn/rtl8188e/r88e_rx.c =================================================================== --- sys/dev/rtwn/rtl8188e/r88e_rx.c +++ sys/dev/rtwn/rtl8188e/r88e_rx.c @@ -240,8 +240,10 @@ if (!sc->sc_ht40) { /* XXX center channel */ rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->r_flags |= IEEE80211_R_BAND; rxs->c_ieee = physt->chan; rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, IEEE80211_CHAN_2GHZ); + rxs->c_band = IEEE80211_CHAN_2GHZ; } } Index: sys/dev/rtwn/rtl8812a/r12a_rx.c =================================================================== --- sys/dev/rtwn/rtl8812a/r12a_rx.c +++ sys/dev/rtwn/rtl8812a/r12a_rx.c @@ -321,8 +321,10 @@ */ #if 0 rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs->r_flags |= IEEE80211_R_BAND; rxs->c_ieee = MS(le16toh(physt->phyw1), R12A_PHYW1_CHAN); rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); + rxs->c_band = (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ; #endif } Index: sys/dev/usb/wlan/if_rsu.c =================================================================== --- sys/dev/usb/wlan/if_rsu.c +++ sys/dev/usb/wlan/if_rsu.c @@ -2081,9 +2081,11 @@ /* Set channel flags for input path */ bzero(&rxs, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_BAND; rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; rxs.c_ieee = le32toh(bss->config.dsconfig); rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); + rxs.c_band = IEEE80211_CHAN_2GHZ; /* This is a number from 0..100; so let's just divide it down a bit */ rxs.c_rssi = le32toh(bss->rssi) / 2; rxs.c_nf = -96; Index: sys/net80211/_ieee80211.h =================================================================== --- sys/net80211/_ieee80211.h +++ sys/net80211/_ieee80211.h @@ -612,6 +612,9 @@ uint8_t c_ieee; /* Channel */ uint8_t c_width; /* channel width, FW flags above */ + /* 32 bits */ + uint32_t c_band; /* Band; XXX we do not have a real band. */ + /* Force alignment to DWORD */ union { uint8_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS]; Index: sys/net80211/ieee80211.c =================================================================== --- sys/net80211/ieee80211.c +++ sys/net80211/ieee80211.c @@ -1818,6 +1818,8 @@ return (NULL); if ((rxs->r_flags & IEEE80211_R_IEEE) == 0) return (NULL); + if ((rxs->r_flags & IEEE80211_R_BAND) == 0) + return (NULL); /* * If the rx status contains a valid ieee/freq, then @@ -1828,11 +1830,20 @@ */ /* Determine a band */ - /* XXX should be done by the driver? */ - if (rxs->c_freq < 3000) { + switch (rxs->c_band) { + case IEEE80211_CHAN_2GHZ: flags = IEEE80211_CHAN_G; - } else { + break; + case IEEE80211_CHAN_5GHZ: flags = IEEE80211_CHAN_A; + break; + default: + if (rxs->c_freq < 3000) { + flags = IEEE80211_CHAN_G; + } else { + flags = IEEE80211_CHAN_A; + } + break; } /* Channel lookup */