Hi, the warning in $subj can pop up in the following scenario: - iwconfig wlan0 mode ad-hoc; ifconfig wlan0 up - a frame arrives from an unknown station which triggers ieee80211_ibss_sta_add() (called from prepare_for_handlers()) In this case, we create a new sta entry, fill in supp_rates field, initialize rate_control algo, and insert this sta entry into the list. The problem is the assignment for supp_rates: sta->supp_rates[local->hw.conf.channel->band] = sdata->u.sta.supp_rates_bits[local->hw.conf.channel->band]; because sdata->u.sta.supp_rates_bits is set only when we actually join an ibss, which is not the case in this scenario; so we assign zero here. Then, the code in rate_control_pid_rate_init() calls rate_lowest_index() for some reason, and since no supported rate is found, this warning is issued. The question is how sta->supp_rates should be initialized: - we could initialize it to our sta's rates, but then we could probably transmit to a station at unsupported rate - add new ibss station only on received beacon, not on a data frame; currently, beacons are ignored for this purpose (they just update the bss list later on) - something else (like 1Mbps only)? As soon as we do sta_join_ibss(), this warning won't happen again. Note that once we have sta entry (in our ibss), we will update its supported rates based on beacons it sends (in rx_bss_info()). Any thoughts? Regards, Vlado
Attachment:
signature.asc
Description: OpenPGP digital signature