mbox series

[v3,0/2] Support for changing address while powered

Message ID 20220826170032.2860883-1-prestwoj@gmail.com (mailing list archive)
Headers show
Series Support for changing address while powered | expand

Message

James Prestwood Aug. 26, 2022, 5 p.m. UTC
v1 -> v2:
 - Renamed the flag from 'LIVE' to 'POWERED'. Live can be interpreted
   differently i.e if it means just IFF_UP/powered or if it means
   connected. POWERED is more accurate to what this feature does.

 - Reworked the logic to check if individual interfaces are busy
   rather than globally. Simply checking local->scanning/roc_list
   was a large hammer, and puts limitations in that aren't needed.
   Now roc_list is traversed and only returns -EBUSY if the actual
   interface has ROC work. Similarly the scanning sdata is checked
   and -EBUSY is returned if it matches the sdata for which the
   address is being changed.

 - Only P2P_CLIENT/STATION iftypes are allowed to do a powered address
   change. I personally see no reason this is needed for other iftypes
   but if we want others to be supported I'm fine adding more.

 - Check return of drv_add_interface

v2 -> v3:
 - Moved address memcpy directly after eth_mac_addr (only if success)

 - Added WARN_ON for drv_add_interface return rather than overwriting
   eth_mac_addr's return.

James Prestwood (2):
  include: nl80211: Add POWERED_ADDR_CHANGE feature
  mac80211: Support POWERED_ADDR_CHANGE feature

 include/uapi/linux/nl80211.h |  9 +++++
 net/mac80211/iface.c         | 71 +++++++++++++++++++++++++++++++++++-
 net/mac80211/main.c          |  2 +
 3 files changed, 80 insertions(+), 2 deletions(-)