Search Linux Wireless

Re: [PATCH 2/3] mt76: mt7615: add missing code for providing aid info to the mcu

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

 



On Tue, 2020-04-21 at 13:20 +0800, sean.wang@xxxxxxxxxxxx wrote:
> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
> 
> Parameters in station record should be kept as up to date as BSS being
> updated.
> 
> Fixes: a90b4ba1f134 ("mt76: mt7615: provide aid info to the mcu")
> Suggested-by: YF Luo <Yf.Luo@xxxxxxxxxxxx>
> Suggested-by: Lucy Hsu <Lucy.Hsu@xxxxxxxxxxxx>
> Co-developed-by: Soul Huang <Soul.Huang@xxxxxxxxxxxx>
> Signed-off-by: Soul Huang <Soul.Huang@xxxxxxxxxxxx>
> Co-developed-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7615/main.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
> index cdc8babca85a..e5012ad680bb 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
> @@ -497,9 +497,19 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
>  
>  	mutex_lock(&dev->mt76.mutex);
>  
> -	if (changed & BSS_CHANGED_ASSOC)
> +	if (changed & BSS_CHANGED_ASSOC) {
> +		struct ieee80211_sta *sta;
> +
>  		mt7615_mcu_add_bss_info(phy, vif, info->assoc);
>  
> +		rcu_read_lock();
> +		sta = ieee80211_find_sta(vif, vif->bss_conf.bssid);
> +		rcu_read_unlock();
> +
> +		if (sta)
> +			mt7615_mcu_sta_add(dev, vif, sta, info->assoc);
> +	}
> +
how about this -
https://github.com/ryderlee1110/wireless/blob/mt76/drivers/net/wireless/mediatek/mt76/mt7915/main.c#L434

>  	if (changed & BSS_CHANGED_ERP_SLOT) {
>  		int slottime = info->use_short_slot ? 9 : 20;
>  
> @@ -557,7 +567,8 @@ int mt7615_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
>  	mt7615_mac_wtbl_update(dev, idx,
>  			       MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
>  
> -	mt7615_mcu_sta_add(dev, vif, sta, true);
> +	if (vif->type != NL80211_IFTYPE_STATION)
> +		mt7615_mcu_sta_add(dev, vif, sta, true);
>  
>  	return 0;
>  }





[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