> +static inline int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap > *cap, > + enum > ieee80211_vht_chanwidth bw) > +{ > + unsigned long w; > + int max_vht_nss; > + int ext_nss_bw; > + int supp_width; > + > + if (cap->supp_mcs.rx_mcs_map == 0xffff) > + return 0; Apart from the various endian issues, this function is completely wrong because the max_vht_nss is per MCS (at least 0-7, 8 and 9 separately), which this can't take into account. Also, the only code that would use this right now, in mac80211, probably won't use the same types as the parameters were to this function. I want to preserve the strange table somewhere in a single place, but not sure yet how to do that best. johannes