aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-05 15:48:51 +0530
committerDmitry Shmidt <dimitrysh@google.com>2015-06-26 13:48:23 -0700
commitc4c95c153ba95d99f19e45668ef94a85187c4bf9 (patch)
treed494f3a544f3f3b67efe3c118b8f864ee12165e6 /include
parent2ecc7f173a30ee7df10240d6944108252a5f5b7d (diff)
downloadedison-v3.10-c4c95c153ba95d99f19e45668ef94a85187c4bf9.tar.gz
nl80211: fix scheduled scan RSSI matchset attribute confusion
The scheduled scan matchsets were intended to be a list of filters, with the found BSS having to pass at least one of them to be passed to the host. When the RSSI attribute was added, however, this was broken and currently wpa_supplicant adds that attribute in its own matchset; however, it doesn't intend that to mean that anything that passes the RSSI filter should be passed to the host, instead it wants it to mean that everything needs to also have higher RSSI. This is semantically problematic because we have a list of filters like [ SSID1, SSID2, SSID3, RSSI ] with no real indication which one should be OR'ed and which one AND'ed. To fix this, move the RSSI filter attribute into each matchset. As we need to stay backward compatible, treat a matchset with only the RSSI attribute as a "default RSSI filter" for all other matchsets, but only if there are other matchsets (an RSSI-only matchset by itself is still desirable.) To make driver implementation easier, keep a global min_rssi_thold for the entire request as well. The only affected driver is ath6kl. I found this when I looked into the code after Raja Mani submitted a patch fixing the n_match_sets calculation to disregard the RSSI, but that patch didn't address the semantic issue. Reported-by: Raja Mani <rmani@qti.qualcomm.com> Acked-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Git-commit: ea73cbce4e1fd93113301532ad98041b119bc85a [kseelam@codeaurora.org: intel wireless driver changes covered in original patch has dependency of other patches present in upstream kernel. So, only intel driver (iwlwifi) changes are skipped and also retained rssi_thold in cfg80211_sched_scan_request structure to retain backward compatibility] CRs-Fixed: 608887 Change-Id: Iffc3e2fca36340163d8ba289baaa992af41a53c8 Signed-off-by: Komal Seelam <kseelam@codeaurora.org> (cherry picked from commit d5b24231be76c54c5aefea222d40fac03fd7f4ee)
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d9681a288ce..ce7dee0f1a3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1268,10 +1268,12 @@ struct cfg80211_scan_request {
/**
* struct cfg80211_match_set - sets of attributes to match
*
- * @ssid: SSID to be matched
+ * @ssid: SSID to be matched; may be zero-length for no match (RSSI only)
+ * @rssi_thold: don't report scan results below this threshold (in s32 dBm)
*/
struct cfg80211_match_set {
struct cfg80211_ssid ssid;
+ s32 rssi_thold;
};
/**
@@ -1293,7 +1295,8 @@ struct cfg80211_match_set {
* @dev: the interface
* @scan_start: start time of the scheduled scan
* @channels: channels to scan
- * @rssi_thold: don't report scan results below this threshold (in s32 dBm)
+ * @min_rssi_thold: for drivers only supporting a single threshold, this
+ * contains the minimum over all matchsets
*/
struct cfg80211_sched_scan_request {
struct cfg80211_ssid *ssids;
@@ -1305,7 +1308,8 @@ struct cfg80211_sched_scan_request {
u32 flags;
struct cfg80211_match_set *match_sets;
int n_match_sets;
- s32 rssi_thold;
+ s32 min_rssi_thold;
+ s32 rssi_thold; /* just for backward compatible */
/* internal */
struct wiphy *wiphy;