nl80211: Derive frequency for BSSes other than the first

Commit e4fb216769 moved frequency
storage from driver struct to bss struct and is assigned in
wpa_driver_nl80211_set_freq. As this wpa_driver_nl80211_set_freq is
triggered only on the first_bss, bss->freq for other BSSes is never
being set to the correct value. This sends MLME frames on frequency zero
(initialized value of freq) for BSSes other than the first.

To fix this derive frequency value from first_bss.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
This commit is contained in:
Yogesh Ashok Powar 2012-01-29 12:28:35 +02:00 committed by Jouni Malinen
parent fa7187bfde
commit a7a6af4cba

View file

@ -7808,6 +7808,7 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
new_bss->ifindex = ifidx; new_bss->ifindex = ifidx;
new_bss->drv = drv; new_bss->drv = drv;
new_bss->next = drv->first_bss.next; new_bss->next = drv->first_bss.next;
new_bss->freq = drv->first_bss.freq;
drv->first_bss.next = new_bss; drv->first_bss.next = new_bss;
if (drv_priv) if (drv_priv)
*drv_priv = new_bss; *drv_priv = new_bss;