diff mbox series

[net] wifi: mac80211: Fix puncturing bitmap handling in __ieee80211_csa_finalize()

Message ID e84a3f80fe536787f7a2c7180507efc36cd14f95.1682358088.git.christophe.jaillet@wanadoo.fr
State New
Headers show
Series [net] wifi: mac80211: Fix puncturing bitmap handling in __ieee80211_csa_finalize() | expand

Commit Message

Christophe JAILLET April 24, 2023, 5:42 p.m. UTC
'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than
an u32.
So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon()
accordingly.

In the commit in Fixes, only ieee80211_start_ap() was updated.

Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.
---
 net/mac80211/cfg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Horman April 24, 2023, 6:14 p.m. UTC | #1
On Mon, Apr 24, 2023 at 07:42:04PM +0200, Christophe JAILLET wrote:
> 'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than
> an u32.
> So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon()
> accordingly.
> 
> In the commit in Fixes, only ieee80211_start_ap() was updated.
> 
> Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
> ---
>  net/mac80211/cfg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Kalle Valo April 28, 2023, 5:04 a.m. UTC | #2
Christophe JAILLET <christophe.jaillet@wanadoo.fr> writes:

> 'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than
> an u32.
> So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon()
> accordingly.
>
> In the commit in Fixes, only ieee80211_start_ap() was updated.
>
> Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

FWIW mac80211 patches go to wireless tree, not net.
Christophe JAILLET April 28, 2023, 8:19 a.m. UTC | #3
Le 28/04/2023 à 07:04, Kalle Valo a écrit :
> Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org> writes:
> 
>> 'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than
>> an u32.
>> So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon()
>> accordingly.
>>
>> In the commit in Fixes, only ieee80211_start_ap() was updated.
>>
>> Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
> 
> FWIW mac80211 patches go to wireless tree, not net.
> 

Hi,

net/<something> or drivers/net/<something> goes to 'net'.
drivers/net/wireless/<something> goes to 'wireless'.

now:
net/mac80211/ goes also to 'wireless' as well.
ath11 and ath12 are special cases that goes to 'ath'.

Based on the get_maintainer.pl, my last patch against drivers/isdn looks 
well suited to deserve a -net-next as well?


without speaking of -next variations.


How many other oddities are there?


I try to make my best to add net or net-next.
I could do the same with wireless. (I guess that there is also a 
wireless-next?)

I can do it when rules are SIMPLE.

Is there a place where ALL these "rules" are described?
Could MAINTAINERS and scripts be instrumented for that?


I DO understand that the easiest it is for maintainers, the better for 
them, but please stop asking for casual contributors to know that and 
follow your, not that easy to find or remember, rules.


I'm tempt not to TRY to put the right branch in the subject of my 
commits anymore, because even when I try to do it right and follow 
simple rules for that, it is not enough and I'm WRONG.


Most of my contributions are related to error handling paths.
The remaining ones are mostly related to number of LoC reduction.

Should my contributions be ignored because of the lack of tools to help 
me target the correct branch, then keep the bugs and keep the LoC.


git log --oneline --author=jaillet --grep Fixes: drivers/net | wc -l
97
git log --oneline --author=jaillet drivers/net | wc -l
341

git log --oneline --author=jaillet --grep Fixes: net | wc -l
7
git log --oneline --author=jaillet net | wc -l
327


No hard feelings, but slightly upset.

:/

CJ
Kalle Valo April 28, 2023, 8:46 a.m. UTC | #4
Christophe JAILLET <christophe.jaillet@wanadoo.fr> writes:

> Le 28/04/2023 à 07:04, Kalle Valo a écrit :
>> Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org> writes:
>>
>>> 'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than
>>> an u32.
>>> So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon()
>>> accordingly.
>>>
>>> In the commit in Fixes, only ieee80211_start_ap() was updated.
>>>
>>> Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap")
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
>>
>> FWIW mac80211 patches go to wireless tree, not net.
>
> net/<something> or drivers/net/<something> goes to 'net'.
> drivers/net/wireless/<something> goes to 'wireless'.
>
> now:
> net/mac80211/ goes also to 'wireless' as well.
> ath11 and ath12 are special cases that goes to 'ath'.
>
> Based on the get_maintainer.pl, my last patch against drivers/isdn
> looks well suited to deserve a -net-next as well?
>
>
> without speaking of -next variations.
>
>
> How many other oddities are there?

Oddities? We have had separate wireless trees for something like 15
years now, so not a new thing :D

But we have also separate trees for most active wireless drivers. For
example, Felix has a tree for mt76, Intel for iwlwifi, I have for
ath9k/ath10k/ath11k/ath12k and so on.

> I try to make my best to add net or net-next.
> I could do the same with wireless. (I guess that there is also a
> wireless-next?)

Yes, there is also wireless-next.

> I can do it when rules are SIMPLE.
>
> Is there a place where ALL these "rules" are described?
> Could MAINTAINERS and scripts be instrumented for that?

The maintainers file should document what tree to use:

QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
M:      Kalle Valo <kvalo@kernel.org>
L:      ath11k@lists.infradead.org
S:      Supported
T:      git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
F:      Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml
F:      drivers/net/wireless/ath/ath11k/

If a wireless driver has no git tree then you can use the tree from the
top level entry:

NETWORKING DRIVERS (WIRELESS)
M:      Kalle Valo <kvalo@kernel.org>
L:      linux-wireless@vger.kernel.org
S:      Maintained
W:      https://wireless.wiki.kernel.org/
Q:      https://patchwork.kernel.org/project/linux-wireless/list/
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
F:      Documentation/devicetree/bindings/net/wireless/
F:      drivers/net/wireless/

But of course some of the entries could be out-of-date. Patches welcome
if you see those :)

> I DO understand that the easiest it is for maintainers, the better for
> them, but please stop asking for casual contributors to know that and
> follow your, not that easy to find or remember, rules.
>
> I'm tempt not to TRY to put the right branch in the subject of my
> commits anymore, because even when I try to do it right and follow
> simple rules for that, it is not enough and I'm WRONG.
>
> Most of my contributions are related to error handling paths.
> The remaining ones are mostly related to number of LoC reduction.
>
> Should my contributions be ignored because of the lack of tools to
> help me target the correct branch, then keep the bugs and keep the
> LoC.

I don't see anyone saying anything about ignoring your fixes, at least I
have always valued your fixes and I hope you can continue submitting
them.

> git log --oneline --author=jaillet --grep Fixes: drivers/net | wc -l
> 97
> git log --oneline --author=jaillet drivers/net | wc -l
> 341
>
> git log --oneline --author=jaillet --grep Fixes: net | wc -l
> 7
> git log --oneline --author=jaillet net | wc -l
> 327
>
> No hard feelings, but slightly upset.

No need to be upset really, this is just coordination between
maintainers so that we don't accidentally take wrong patches. Please
don't take it personally.

If you are not familiar with network trees, I have seen some
contributors just using '-next' without specifying the actual tree and
letting the maintainers deal with what tree to take it. I consider that
as a safe option.
diff mbox series

Patch

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7317e4a5d1ff..c5e5f783f137 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3589,7 +3589,7 @@  void ieee80211_channel_switch_disconnect(struct ieee80211_vif *vif, bool block_t
 EXPORT_SYMBOL(ieee80211_channel_switch_disconnect);
 
 static int ieee80211_set_after_csa_beacon(struct ieee80211_sub_if_data *sdata,
-					  u32 *changed)
+					  u64 *changed)
 {
 	int err;
 
@@ -3632,7 +3632,7 @@  static int ieee80211_set_after_csa_beacon(struct ieee80211_sub_if_data *sdata,
 static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_local *local = sdata->local;
-	u32 changed = 0;
+	u64 changed = 0;
 	int err;
 
 	sdata_assert_lock(sdata);