nl80211: fix sched scan match attribute name

It should be NL80211_SCHED_SCAN_MATCH_ATTR_SSID as
documented, not NL80211_ATTR_SCHED_SCAN_MATCH_SSID.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2012-06-13 11:17:11 +02:00
Родитель ac4d82fa01
Коммит 4a4ab0d7c9
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -1963,7 +1963,7 @@ enum nl80211_reg_rule_attr {
enum nl80211_sched_scan_match_attr { enum nl80211_sched_scan_match_attr {
__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID, __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,
NL80211_ATTR_SCHED_SCAN_MATCH_SSID, NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
/* keep last */ /* keep last */
__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@ -1971,6 +1971,9 @@ enum nl80211_sched_scan_match_attr {
__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1
}; };
/* only for backward compatibility */
#define NL80211_ATTR_SCHED_SCAN_MATCH_SSID NL80211_SCHED_SCAN_MATCH_ATTR_SSID
/** /**
* enum nl80211_reg_rule_flags - regulatory rule flags * enum nl80211_reg_rule_flags - regulatory rule flags
* *

Просмотреть файл

@ -250,7 +250,7 @@ nl80211_rekey_policy[NUM_NL80211_REKEY_DATA] = {
static const struct nla_policy static const struct nla_policy
nl80211_match_policy[NL80211_SCHED_SCAN_MATCH_ATTR_MAX + 1] = { nl80211_match_policy[NL80211_SCHED_SCAN_MATCH_ATTR_MAX + 1] = {
[NL80211_ATTR_SCHED_SCAN_MATCH_SSID] = { .type = NLA_BINARY, [NL80211_SCHED_SCAN_MATCH_ATTR_SSID] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_SSID_LEN }, .len = IEEE80211_MAX_SSID_LEN },
}; };
@ -4253,7 +4253,7 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
nla_parse(tb, NL80211_SCHED_SCAN_MATCH_ATTR_MAX, nla_parse(tb, NL80211_SCHED_SCAN_MATCH_ATTR_MAX,
nla_data(attr), nla_len(attr), nla_data(attr), nla_len(attr),
nl80211_match_policy); nl80211_match_policy);
ssid = tb[NL80211_ATTR_SCHED_SCAN_MATCH_SSID]; ssid = tb[NL80211_SCHED_SCAN_MATCH_ATTR_SSID];
if (ssid) { if (ssid) {
if (nla_len(ssid) > IEEE80211_MAX_SSID_LEN) { if (nla_len(ssid) > IEEE80211_MAX_SSID_LEN) {
err = -EINVAL; err = -EINVAL;