Re: compat-wireless and minstrel

Johannes Berg
2009-11-14T09:30:39Z

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

On Fri, 2009-11-13 at 14:35 -0800, Adam Wozniak wrote:

> I've traced it down to this bit in rx.c in prepare_for_handlers():
>
> case NL80211_IFTYPE_ADHOC:
> [ stuff deleted ]
> } else if (!rx->sta) {
> int rate_idx;
> if (rx->status->flag & RX_FLAG_HT)
> rate_idx = 0; /* TODO: HT rates */
> else
> rate_idx = rx->status->rate_idx;
>
> rx->sta = ieee80211_ibss_add_sta(sdata, bssid,
> hdr->addr2,
> BIT(rate_idx));
> }
> break;
>
> I don't think this is right. I know the issue is here, because if I
> change to "BIT(rate_idx) | 0xfff" the problem corrects. Either we need
> to (a) set it properly here or (b) make sure something else happens
> before or after. I'm not sure we have enough context here to do (a).

Hmm. This BIT(..) was basically here to ensure we have at least a single
good rate absent other information. If we do not receive a probe or
beacon frame from that peer at least once, but add it to our IBSS only
due to a single received data frame, we add the bitrate that this frame
was transmitted at so we have one rate that we know it can transmit (and
presumably also receive).

What should happen is that once it starts beaconing we pick up a beacon
and extend our set of known good rates.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]