[RFC v2 2/2] wcn36xx: fix the mesh STA for rejoin

Pontus Fuchs pontus.fuchs at gmail.com
Thu Mar 13 05:12:25 EDT 2014


On 2014-03-13 00:30, Jason Mobarak wrote:
> From: Chun-Yeow Yeoh <yeohchunyeow at gmail.com>
>
> The firmware has triggered the QoS NULL frame to monitor the links
> amongst peer mesh STAs. Once one of the peer mesh STAs is leaving or
> out of the range and no ACK received from the peer mesh STA, the
> firmware will automatically delete the peer mesh STA.
>
> After deleting the mesh STA and adding the mesh STA back with the HAL
> command returning no error, the STA still won't work. Unicast data
> frames is not able to transmit out from the mesh STA.
>
> Now, re-insert the inactivite mesh STA with WCN36XX_HAL_CONFIG_STA_REQ
> command with action field set to update seems to solve the problem.
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow at cozybit.com>
> Signed-off-by: Jason Mobarak <jam at cozybit.com>
> Signed-off-by: Javier Lopez <jlopex at cozybit.com>
> Signed-off-by: Javier Cardona <javier at cozybit.com>
> ---
>

[...]

> @@ -1978,7 +1982,9 @@ static int wcn36xx_smd_delete_sta_context_ind(struct wcn36xx *wcn,
>   {
>   	struct wcn36xx_hal_delete_sta_context_ind_msg *rsp = buf;
>   	struct wcn36xx_vif *tmp;
> -	struct ieee80211_sta *sta;
> +	struct ieee80211_sta *sta = NULL;
> +	struct wcn36xx_sta *sta_priv = NULL;
> +	struct ieee80211_vif *vif = NULL;
>
>   	if (len != sizeof(*rsp)) {
>   		wcn36xx_warn("Corrupted delete sta indication\n");
> @@ -1989,18 +1995,26 @@ static int wcn36xx_smd_delete_sta_context_ind(struct wcn36xx *wcn,
>   		    rsp->addr2, rsp->sta_id);
>
>   	list_for_each_entry(tmp, &wcn->vif_list, list) {
> -		rcu_read_lock();
> -		sta = ieee80211_find_sta(wcn36xx_priv_to_vif(tmp), rsp->addr2);
> -		if (sta)
> -			ieee80211_report_low_ack(sta, 0);
> -		rcu_read_unlock();
> -		if (sta)
> -			return 0;
> +        wcn36xx_warn("STA %pM index %d is leaving\n", rsp->addr2, rsp->sta_id);
> +
> +        sta_priv = wcn36xx_find_sta(tmp, rsp->addr2);
> +        if(!sta_priv)
> +            continue;
> +
> +        vif = wcn36xx_priv_to_vif(tmp);
> +        sta = ieee80211_find_sta(vif, rsp->addr2);
> +
> +        if (vif->type == NL80211_IFTYPE_MESH_POINT) {
> +            wcn36xx_smd_config_sta(wcn, vif, sta, 1);
> +        }
> +
> +        return 0;


1) You remove the rcu_read_lock. 2) For AP-mode you remove the call to 
ieee80211_report_low_ack.

Cheers,

Pontus





More information about the wcn36xx mailing list