Skip to content

RFC add a KHz component to wireless channels

Thomas Pedersen linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ieee80211: share 802.11 unit conversion helpersinclude/linux/ieee80211.h include/net/regulatory.h+11 -70 replies
2/7cfg80211: express channels with a KHz componentinclude/net/cfg80211.h net/wireless/chan.c net/wireless/reg.c +3 more+202 -694 replies
3/7mac80211: handle channel frequency offsetnet/mac80211/chan.c net/mac80211/main.c net/mac80211/mlme.c +2 more+52 -153 replies
4/7mac80211: add freq_offset to RX statusinclude/net/mac80211.h net/mac80211/mlme.c net/mac80211/rx.c +1 more+16 -42 replies
5/7cfg80211: report frequency in KHz for management RXdrivers/net/wireless/ath/ath6kl/wmi.c drivers/net/wireless/ath/wil6210/wmi.c drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +5 more+20 -130 replies
6/7nl80211: add KHz frequency offset for most wifi commandsinclude/uapi/linux/nl80211.h net/wireless/nl80211.c+87 -343 replies
7/7nl80211: accept scan frequencies in KHzinclude/uapi/linux/nl80211.h net/wireless/nl80211.c+19 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/7] add a KHz component to wireless channels

Hello,

This patchset prepares for adding 802.11ah (S1G) support.

S1G channels, at least in the US, may be centered on a sub-MHz frequency. The current channel structures and nl80211 APIs expect frequencies in units of MHz. To extend the existing functionality and APIs while reducing churn and breakage, we add a KHz offset where needed. This also has the advantage that the KHz offset can be ignored at will (legacy drivers).

Some cfg80211 and nl80211 internals have been converted to handle units of KHz, which is not unprecedented (net/wireless/reg.c), and the collateral damage is localized.

One thing which is still unclear is backward compatibility in nl80211. If a frequency offset is supplied to an older kernel, it'll just silently fail to do the right thing. Likewise, these patches will accept a frequency offset to eg. NL80211_CMD_JOIN_MESH, but not handle it in mac80211. For this case is it sufficient to return an error?

The hostap hwsim tests are still passing on par with HEAD. Before these become PATCH we'd like to add some tests exercising the new nl80211 attributes, but it seems difficult without pulling in the full S1G patchset. Maybe we'll hack up hwsim + regulatory to use the S1G band for regular wifi tests. Suggestions here are welcome.

Thanks for looking.

Thomas Pedersen (7):
ieee80211: share 802.11 unit conversion helpers
cfg80211: express channels with a KHz component
mac80211: handle channel frequency offset
mac80211: add freq_offset to RX status
cfg80211: report frequency in KHz for management RX
nl80211: add KHz frequency offset for most wifi commands
nl80211: accept scan frequencies in KHz

 drivers/net/wireless/ath/ath6kl/wmi.c         |  5 +-
 drivers/net/wireless/ath/wil6210/wmi.c        |  3 +-
 .../broadcom/brcm80211/brcmfmac/p2p.c         |  6 +-
 drivers/net/wireless/marvell/mwifiex/util.c   |  3 +-
 drivers/staging/wilc1000/cfg80211.c           |  2 +-
 include/linux/ieee80211.h                     | 11 +++
 include/net/cfg80211.h                        | 70 ++++++++++++-
 include/net/mac80211.h                        | 10 +-
 include/net/regulatory.h                      |  7 --
 include/uapi/linux/nl80211.h                  | 51 +++++++---
 net/mac80211/chan.c                           |  1 +
 net/mac80211/main.c                           |  8 +-
 net/mac80211/mlme.c                           | 22 +++--
 net/mac80211/rx.c                             |  7 +-
 net/mac80211/scan.c                           |  4 +-
 net/mac80211/trace.h                          | 41 ++++++--
 net/wireless/chan.c                           | 68 +++++++------
 net/wireless/nl80211.c                        | 97 ++++++++++++++-----
 net/wireless/reg.c                            | 40 ++++----
 net/wireless/scan.c                           |  4 +-
 net/wireless/trace.h                          | 21 +++-
 net/wireless/util.c                           | 72 ++++++++++++--
 22 files changed, 406 insertions(+), 147 deletions(-)
Signature · 1 line
2.20.1