Skip to content

Commit 0d05996

Browse files
committed
nl80211: limit band information in non-split data
In non-split data, we shouldn't be adding S1G and 6 GHz data (or future bands) since we're really close to the 4k message size limit. Remove those bands, any modern userspace that can use S1G or 6 GHz should already be using split dumps, and if not then it needs to update. Link: https://lore.kernel.org/r/20210712215329.31444162a2c2.I5555312e4a074c84f8b4e7ad79dc4d1fbfc5126c@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 17109e9 commit 0d05996

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/wireless/nl80211.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,10 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
23512351
goto nla_put_failure;
23522352

23532353
for (band = state->band_start;
2354-
band < NUM_NL80211_BANDS; band++) {
2354+
band < (state->split ?
2355+
NUM_NL80211_BANDS :
2356+
NL80211_BAND_60GHZ + 1);
2357+
band++) {
23552358
struct ieee80211_supported_band *sband;
23562359

23572360
/* omit higher bands for ancient software */

0 commit comments

Comments
 (0)