]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata
authorNicolas Escande <nico.escande@gmail.com>
Mon, 27 May 2024 14:17:59 +0000 (16:17 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 May 2024 13:19:45 +0000 (15:19 +0200)
commit6f6291f09a322c1c1578badac8072d049363f4e6
tree39023225bf9f4f76c977ceb3afb899c8d6f267b4
parentb7d7f11a291830fdf69d3301075dd0fb347ced84
wifi: mac80211: mesh: init nonpeer_pm to active by default in mesh sdata

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>
net/mac80211/mesh.c