]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - net/wireless/reg.c
cfg80211: Add API to change the indoor regulatory setting
authorIlan peer <ilan.peer@intel.com>
Wed, 4 Mar 2015 05:32:06 +0000 (00:32 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 6 Mar 2015 08:37:47 +0000 (09:37 +0100)
commit05050753602626ed4c46271c689929b625f409e7
tree8ffc7a282eddb39e7a4bc8081675eba2d92e31d0
parent0c4ddcd214f5bc72713473e8383041ab7a2c6bb7
cfg80211: Add API to change the indoor regulatory setting

Previously, the indoor setting configuration assumed that as
long as a station interface is connected, the indoor environment
setting does not change. However, this assumption is problematic
as:

- It is possible that a station interface is connected to a mobile
  AP, e.g., softAP or a P2P GO, where it is possible that both the
  station and the mobile AP move out of the indoor environment making
  the indoor setting invalid. In such a case, user space has no way to
  invalidate the setting.
- A station interface disconnection does not necessarily imply that
  the device is no longer operating in an indoor environment, e.g.,
  it is possible that the station interface is roaming but is still
  stays indoor.

To handle the above, extend the indoor configuration API to allow
user space to indicate a change of indoor settings, and allow it to
indicate weather it controls the indoor setting, such that:

1. If the user space process explicitly indicates that it is going
   to control the indoor setting, do not clear the indoor setting
   internally, unless the socket is released. The user space process
   should use the NL80211_ATTR_SOCKET_OWNER attribute in the command
   to state that it is going to control the indoor setting.
2. Reset the indoor setting when restoring the regulatory settings in
   case it is not owned by a user space process.

Based on the above, a user space tool that continuously monitors the
indoor settings, i.e., tracking power setting, location etc., can
indicate environment changes to the regulatory core.

It should be noted that currently user space is the only provided mechanism
used to hint to the regulatory core over the indoor/outdoor environment --
while the country IEs do have an environment setting this has been completely
ignored by the regulatory core by design for a while now since country IEs
typically can contain bogus data.

Acked-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: ArikX Nemtsov <arik@wizery.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/uapi/linux/nl80211.h
net/wireless/nl80211.c
net/wireless/reg.c
net/wireless/reg.h