On Fri, 2011-11-18 at 09:09 -0800, Ben Greear wrote: > On 11/18/2011 02:15 AM, Johannes Berg wrote: > > On Thu, 2011-11-17 at 13:54 -0800, greearb@xxxxxxxxxxxxxxx wrote: > > > >> -void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, > >> +bool ieee80111_cfg_override_disables_ht40(struct ieee80211_sub_if_data *sdata) > >> +{ > >> + const u16 flg = IEEE80211_HT_CAP_SUP_WIDTH_20_40; > >> + if ((sdata->u.mgd.ht_capa_mask.cap_info& flg)&& > >> + !(sdata->u.mgd.ht_capa.cap_info& flg)) > >> + return true; > > > > This looks like it has endian bugs. Note that sband->ht_cap is > > ieee80211_sta_ht_cap, whereas sdata->u.mgd.ht_capa[_mask] is > > ieee80211_ht_cap -- the latter is in IEEE format (LE) while the former > > is in a complete different format that's easier to digest for the > > CPU :-) > > So, the ht-caps & mask data coming from user-space via netlink > should be in network-byte order? It is that way right now, and that makes sense. > Or do you want me to flip the bytes around when copying > it into the u.mgd.ht_cap structs? No. Just use them in little endian ("network byte order" for 802.11) johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html