Search Linux Wireless

Re: [PATCH 15/15] wifi: cfg80211/mac80211: move puncturing into chandef

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

 



On Mon, 2024-01-29 at 19:34 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
> 
> Aloka originally suggested that puncturing should be part of
> the chandef, so that it's treated correctly. At the time, I
> disagreed and it ended up not part of the chandef, but I've
> now realized that this was wrong. Even for clients, the RX,
> and perhaps more importantly, CCA configuration needs to take
> puncturing into account.
> 
> Move puncturing into the chandef, and adjust all the code
> accordingly. Also add a few tests for puncturing in chandef
> compatibility checking.
> 
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---

[...]

> diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
> index e49360e29faf..876c8d581759 100644
> --- a/drivers/net/wireless/realtek/rtw89/fw.c
> +++ b/drivers/net/wireless/realtek/rtw89/fw.c
> @@ -2495,8 +2495,11 @@ int rtw89_fw_h2c_assoc_cmac_tbl_g7(struct rtw89_dev *rtwdev,
>  	}
>  
>  	if (vif->bss_conf.eht_support) {
> -		h2c->w4 |= le32_encode_bits(~vif->bss_conf.eht_puncturing,
> +		u16 punct = vif->bss_conf.chanreq.oper.punctured;
> +
> +		h2c->w4 |= le32_encode_bits(~punct,
>  					    CCTLINFO_G7_W4_ACT_SUBCH_CBW);
> +		rcu_read_unlock();

We don't deference chanctx to reference puncture value. Instead use the
value from vif->bss_conf.chanreq, so I think we don't need RCU locks, right?

I can prepare a fix for this, but want to confirm if my thinking is correct.


>  		h2c->m4 |= cpu_to_le32(CCTLINFO_G7_W4_ACT_SUBCH_CBW);
>  	}
>  
> 







[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