]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: clarify BSS probe response vs. beacon data
authorJohannes Berg <johannes.berg@intel.com>
Tue, 12 Aug 2014 18:34:30 +0000 (20:34 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 26 Aug 2014 09:16:01 +0000 (11:16 +0200)
commitaa2222673d52b8828e01806e986de51a8df7f795
tree5a862e85d25ad5cf05e8f47800e20de792592e91
parent68c903e35fbe752cb2b92c0e9e34797d3ab67892
cfg80211: clarify BSS probe response vs. beacon data

There are a few possible cases of where BSS data came from:
 1) only a beacon has been received
 2) only a probe response has been received
 3) the driver didn't report what it received (this happens when
    using cfg80211_inform_bss[_width]())
 4) both probe response and beacon data has been received

Unfortunately, in the userspace API, a few things weren't there:
 a) there was no way to differentiate cases 1) and 4) above
    without comparing the data of the IEs
 b) the TSF was always from the last frame, instead of being
    exposed for beacon/probe response separately like IEs

Fix this by
   i) exporting a new flag attribute that indicates whether or
      not probe response data has been received - this addresses (a)
  ii) exporting a BEACON_TSF attribute that holds the beacon's TSF
      if a beacon has been received
 iii) not exporting the beacon attributes in case (3) above as that
      would just lead userspace into thinking the data actually came
      from a beacon when that isn't clear

To implement this, track inside the IEs struct whether or not it
(definitely) came from a beacon.

Reported-by: William Seto
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/wireless/nl80211.c
net/wireless/scan.c