Nicolas Escande 2fac830d7e wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
[ Upstream commit 6f6291f09a322c1c1578badac8072d049363f4e6 ]

With a ath9k device I can see that:
	iw phy phy0 interface add mesh0 type mp
	ip link set mesh0 up
	iw dev mesh0 scan

Will start a scan with the Power Management bit set in the Frame Control Field.
This is because we set this bit depending on the nonpeer_pm variable of the mesh
iface sdata and when there are no active links on the interface it remains to
NL80211_MESH_POWER_UNKNOWN.

As soon as links starts to be established, it wil switch to
NL80211_MESH_POWER_ACTIVE as it is the value set by befault on the per sta
nonpeer_pm field.
As we want no power save by default, (as expressed with the per sta ini values),
lets init it to the expected default value of NL80211_MESH_POWER_ACTIVE.

Also please note that we cannot change the default value from userspace prior to
establishing a link as using NL80211_CMD_SET_MESH_CONFIG will not work before
NL80211_CMD_JOIN_MESH has been issued. So too late for our initial scan.

Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Link: https://msgid.link/20240527141759.299411-1-nico.escande@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 46487275e810d1e7c99f36af9fdfae0909c4e200)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
2024-08-24 08:23:55 +00:00
..
2022-04-27 13:15:32 +02:00
2023-08-11 11:33:47 +02:00
2023-06-21 15:38:58 +02:00
2024-04-16 10:30:35 +00:00
2024-06-03 12:29:51 +00:00
2024-06-03 12:47:31 +00:00
2024-06-03 12:47:30 +00:00
2021-06-30 08:48:47 -04:00
2023-06-21 15:38:58 +02:00
2023-06-21 15:38:58 +02:00