RFC Allow MAC change on up interface
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 patch 26 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | RFC: allow mac address change on up ifacedrivers/ include/ include/ +3 more | +37 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/1] Allow MAC change on up interface
This is an example of how a devices MAC address could be changed while the interface is up. Currently RTNL and mac80211 both require the interface be down before changing the MAC.
After poking around a bit I found that some drivers can actually change the MAC while the iface is up. Allowing user space to do this while the iface is up would elminate a few potential race conditions that arise when changing the MAC from user space.
This commit does a few things:
- Adds an EXT_FEATURE that user space can check to see if the driver allows this MAC changing.
- Adds a new NL80211_ATTR for including a "random mac" to CMD_CONNECT. This MAC is passed down the stack and gets set to the net_device's address.
- Set this wiphy extended feature in iwlwifi (just as an example)
- Relax checks in mac80211 which check if the interface is running
- Set IFF_LIVE_ADDR_CHANGE on net_device. Note: I know setting this where I did is likely not the right way to do it, but for this proof-of-concept it works. With guidance I can move this around to a proper place.
James Prestwood (1):
RFC: allow mac address change on up iface
.../net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 ++ include/net/cfg80211.h | 1 + include/uapi/linux/nl80211.h | 3 +++ net/mac80211/iface.c | 5 ++--- net/wireless/nl80211.c | 9 +++++++++ net/wireless/sme.c | 20 +++++++++++++++++++ 6 files changed, 37 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1