diff mbox series

[net-next,v1] nl80211/cfg80211: add nla_policy for S1G band

Message ID 20240119093724.7852-1-linma@zju.edu.cn (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v1] nl80211/cfg80211: add nla_policy for S1G band | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1077 this patch: 1077
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1095 this patch: 1095
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1095 this patch: 1095
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-19--15-00 (tests: 402)

Commit Message

Lin Ma Jan. 19, 2024, 9:37 a.m. UTC
Our detector has identified another case of an incomplete policy.
Specifically, the commit df78a0c0b67d ("nl80211: S1G band and channel
definitions") introduced the NL80211_BAND_S1GHZ attribute to
nl80211_band, but it neglected to update the
nl80211_match_band_rssi_policy accordingly.

Similar commits that add new band types, such as the initial
commit 1e1b11b6a111 ("nl80211/cfg80211: Specify band specific min RSSI
thresholds with sched scan"), the commit e548a1c36b11 ("cfg80211: add 6GHz
in code handling array with NUM_NL80211_BANDS entries"), and the
commit 63fa04266629 ("nl80211: Add LC placeholder band definition to
nl80211_band"), all require updates to the policy.
Failure to do so could result in accessing an attribute of unexpected
length in the function nl80211_parse_sched_scan_per_band_rssi.

To resolve this issue, this commit adds the policy for the
NL80211_BAND_S1GHZ attribute.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
---
 net/wireless/nl80211.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lin Ma Jan. 19, 2024, 9:42 a.m. UTC | #1
Hello there,

> Our detector has identified another case of an incomplete policy.
> ...

I mark the net-next tag for this one and a previous sent one in this
morning ([PATCH net-next v1] neighbour: complement nl_ntbl_parm_policy).

Please let me know if such nla_policy complementing should go net instead.

Thanks!

Regards
Lin
Kalle Valo Jan. 19, 2024, 2:56 p.m. UTC | #2
"Lin Ma" <linma@zju.edu.cn> writes:

> Hello there,
>
>> Our detector has identified another case of an incomplete policy.
>> ...
>
> I mark the net-next tag for this one and a previous sent one in this
> morning ([PATCH net-next v1] neighbour: complement nl_ntbl_parm_policy).
>
> Please let me know if such nla_policy complementing should go net instead.

nl80211 patches go to wireless or wireless-next.
Lin Ma Jan. 19, 2024, 3:09 p.m. UTC | #3
Hello Kalle,

> 
> "Lin Ma" <linma@zju.edu.cn> writes:
> 
> > Hello there,
> >
> >> Our detector has identified another case of an incomplete policy.
> >> ...
> >
> > I mark the net-next tag for this one and a previous sent one in this
> > morning ([PATCH net-next v1] neighbour: complement nl_ntbl_parm_policy).
> >
> > Please let me know if such nla_policy complementing should go net instead.
> 
> nl80211 patches go to wireless or wireless-next.
> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

OK I will resend a version with correct one.

Thanks
Lin
diff mbox series

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 60877b532993..980300621a60 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -911,6 +911,7 @@  nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = {
 	[NL80211_BAND_5GHZ] = { .type = NLA_S32 },
 	[NL80211_BAND_6GHZ] = { .type = NLA_S32 },
 	[NL80211_BAND_60GHZ] = { .type = NLA_S32 },
+	[NL80211_BAND_S1GHZ] = { .type = NLA_S32 },
 	[NL80211_BAND_LC]    = { .type = NLA_S32 },
 };