Search Linux Wireless

Re: [PATCH v3] brcmsmac: AP mode: update beacon when TIM changes

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

 



Hi,

I suggest here some improvements to this patch but I don't have strong
opinion about them so any feedback is appreciated:

-split it into two: one for storing the current vif into brcms_c_info
and also setting it to NULL on remove_interface to avoid dangling
pointers; and an other one for actually updating the beacon; I believe
them to be separate changes.

On Sun, 23 Sep 2018 12:54:25 +0300
Ali MJ Al-Nasrawy <alimjalnasrawy@xxxxxxxxx> wrote: 
> +static int brcms_ops_beacon_set_tim(struct ieee80211_hw *hw,
> +				 struct ieee80211_sta *sta, bool set)
> +{
> +	struct brcms_info *wl = hw->priv;
> +	struct sk_buff *beacon;
> +	u16 tim_offset = 0;
> +
> +	beacon = ieee80211_beacon_get_tim(hw, wl->wlc->vif,
> +					  &tim_offset, NULL);
> +	if (beacon){
> +		spin_lock_bh(&wl->lock);
> +		brcms_c_set_new_beacon(wl->wlc, beacon, tim_offset,
> +
> wl->wlc->vif->bss_conf.dtim_period);
> +		spin_unlock_bh(&wl->lock);
> +	}
> +
> +	return 0;
> +}
> +

-on brcms_ops_beacon_set_tim, include ieee80211_beacon_get_tim call in
the lock context and also check for vif to be null before passing it as
argument.




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

  Powered by Linux