On Tue, 2011-11-08 at 21:58 +0100, Johannes Berg wrote: > On Tue, 2011-11-08 at 12:44 -0800, Ben Greear wrote: > > On 11/08/2011 12:09 PM, Johannes Berg wrote: > > > On Tue, 2011-11-08 at 11:36 -0800, greearb@xxxxxxxxxxxxxxx wrote: > > > > > >> + /* > > >> + * We always need to advert at least MCS0-7, to > > >> + * be a compliant HT station, for instance > > >> + */ > > >> + if (((i * 8 + q)>= min_rates)&& > > > > > > This is a little misleading -- why min_rates when the comment says > > > MCS0-7? > > > > I let caller determine the min, but comment was to tell why > > the min might be set. In APs, the min supported rates are 16, evidently...not > > that this code supports APs at the moment... > > About APs: that can't be right, there certainly will be 1x1 APs. > > > When this is about local use instead of advertising, then any minimum > > is OK. > > > > Want me to just remove the comment entirely? > > Well, so, I think the logic there is a little odd anyway -- why aren't > you doing it byte-wise, if the only thing that can possibly happen is > that the first byte is masked or not? Maybe change the parameter to > "bool allow_single_stream_mask" or something like that and adjust the > algorithm like: > > start = allow_single_stream_mask ? 0 : 1; > > for (i = start; i < IEEE80211_HT_MCS_MASK_LEN; i++) { > u8 val = smask[i] & scaps[i]; > val |= ht_cap->mcs.rx_mask[i] & ~smask[i]; > ht_cap->mcs.rx_mask[i] val; > } Ok, no, I totally misunderstood the variables here, but anyway, it seems there's no need for bit-wise stuff. 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