Search Linux Wireless

Re: [PATCH v3] mac80211_hwsim: claim CSA support for AP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 22, 2013 at 10:06:26AM +0100, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx>
> 
> Signed-off-by: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx>
> Cc: Simon Wunderlich <siwu@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/mac80211_hwsim.c | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index a11dc7c..cc30acd 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -168,6 +168,7 @@ struct hwsim_vif_priv {
>  	u8 bssid[ETH_ALEN];
>  	bool assoc;
>  	bool bcn_en;
> +	int csa_bcn_cnt;
>  	u16 aid;
>  };
>  
> @@ -1058,6 +1059,18 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
>  
>  	mac80211_hwsim_tx_frame(hw, skb,
>  				rcu_dereference(vif->chanctx_conf)->def.chan);
> +
> +	if (vif->csa_active) {
> +		struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
> +
> +		vp->csa_bcn_cnt++;
> +		if (ieee80211_csa_is_complete(vif)) {
> +			wiphy_debug(hw->wiphy,
> +				    "%s CSA complete after %d beacons\n",
> +				    __func__, vp->csa_bcn_cnt);
> +			ieee80211_csa_finish(vif);
> +		}
> +	}
>  }
>  

Hmm, I thought the CSA code would make ieee80211_beacon_get_tim return
NULL (or do something alike) after the last ieee80211_beacon_get_tim
returned a beacon with a null CSA count until the config is done - but
it seems it doesn't - in that case this change would be race prone.
Did I miss something ?
 
Karl
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux