Skip to content

Commit ab10c22

Browse files
committed
nl80211: fix non-split wiphy information
When dumping wiphy information, we try to split the data into many submessages, but for old userspace we still support the old mode where this doesn't happen. However, in this case we were not resetting our state correctly and dumping multiple messages for each wiphy, which would have broken such older userspace. This was broken pretty much immediately afterwards because it only worked in the original commit where non-split dumps didn't have any more data than split dumps... Fixes: fe1abaf ("nl80211: re-add channel width and extended capa advertising") Signed-off-by: Johannes Berg <[email protected]> Link: https://lore.kernel.org/r/20200928130717.3e6d9c6bada2.Ie0f151a8d0d00a8e1e18f6a8c9244dd02496af67@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent f8d504c commit ab10c22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/wireless/nl80211.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -2428,7 +2428,10 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev,
24282428
* case we'll continue with more data in the next round,
24292429
* but break unconditionally so unsplit data stops here.
24302430
*/
2431-
state->split_start++;
2431+
if (state->split)
2432+
state->split_start++;
2433+
else
2434+
state->split_start = 0;
24322435
break;
24332436
case 9:
24342437
if (nl80211_send_mgmt_stypes(msg, mgmt_stypes))

0 commit comments

Comments
 (0)