[PATCH 5/6] Update the allowed rates before association

Pontus Fuchs pontus.fuchs at gmail.com
Thu Jun 13 15:46:30 EDT 2013


On 2013-06-13 14:38, Olof Johansson wrote:
> This function will set the set of rates allowed for this access point
> before the rates are sent to the firmware.
>
> Signed-off-by: Olof Johansson<dev at skyshaper.net>

[...]

> @@ -472,6 +504,9 @@ static void wcn36xx_bss_info_changed(struct
> ieee80211_hw *hw,
>   	if (changed & BSS_CHANGED_ASSOC) {
>   		wcn->is_joining = false;
>   		if (bss_conf->assoc) {
> +			struct ieee80211_sta *sta;
> +			sta = ieee80211_find_sta(vif, bss_conf->bssid);
> +

1. You must hold the RCU until you're done with the sta. 2. Please check 
sta for NULL.

Do something like this:

rcu_read_lock();
sta = ieee80211_find_sta 
<http://lxr.free-electrons.com/ident?v=2.6.39;i=ieee80211_find_sta>(....)
if (!sta) {
     rcu_read_unlock();
    bail out;
}

...

wcn36xx_update_allowed_rates(wcn, sta)

...
rcu_read_unlock();

Cheers,

Pontus



More information about the wcn36xx mailing list