diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-09-14 13:53:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-14 13:53:49 -0400 |
commit | 9316f0e3c6ba524d8fa14bfded048b252891931a (patch) | |
tree | 60326e5943997bb72aaf2a375f8a20c61ec7bbcd /net | |
parent | 7f2e6a5d8608d0353b017a0fe15502307593734e (diff) | |
parent | 7a5f799becc51c842ec1a3aeb8dd82651aea7036 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 4 | ||||
-rw-r--r-- | net/bluetooth/l2cap_core.c | 11 | ||||
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 2 | ||||
-rw-r--r-- | net/bluetooth/smp.c | 10 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 9 | ||||
-rw-r--r-- | net/mac80211/iface.c | 16 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 4 | ||||
-rw-r--r-- | net/mac80211/rx.c | 2 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 | ||||
-rw-r--r-- | net/wireless/reg.c | 6 | ||||
-rw-r--r-- | net/wireless/scan.c | 2 | ||||
-rw-r--r-- | net/wireless/wext-core.c | 8 |
12 files changed, 44 insertions, 34 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 5ad7da217474..3c094e78dde9 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <net/bluetooth/bluetooth.h> | 29 | #include <net/bluetooth/bluetooth.h> |
30 | #include <net/bluetooth/hci_core.h> | 30 | #include <net/bluetooth/hci_core.h> |
31 | #include <net/bluetooth/a2mp.h> | 31 | #include <net/bluetooth/a2mp.h> |
32 | #include <net/bluetooth/smp.h> | ||
32 | 33 | ||
33 | static void hci_le_connect(struct hci_conn *conn) | 34 | static void hci_le_connect(struct hci_conn *conn) |
34 | { | 35 | { |
@@ -619,6 +620,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
619 | { | 620 | { |
620 | BT_DBG("hcon %p", conn); | 621 | BT_DBG("hcon %p", conn); |
621 | 622 | ||
623 | if (conn->type == LE_LINK) | ||
624 | return smp_conn_security(conn, sec_level); | ||
625 | |||
622 | /* For sdp we don't need the link key. */ | 626 | /* For sdp we don't need the link key. */ |
623 | if (sec_level == BT_SECURITY_SDP) | 627 | if (sec_level == BT_SECURITY_SDP) |
624 | return 1; | 628 | return 1; |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index f0a3ab156ec6..e0abaf3cb6a5 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1216,14 +1216,15 @@ clean: | |||
1216 | static void l2cap_conn_ready(struct l2cap_conn *conn) | 1216 | static void l2cap_conn_ready(struct l2cap_conn *conn) |
1217 | { | 1217 | { |
1218 | struct l2cap_chan *chan; | 1218 | struct l2cap_chan *chan; |
1219 | struct hci_conn *hcon = conn->hcon; | ||
1219 | 1220 | ||
1220 | BT_DBG("conn %p", conn); | 1221 | BT_DBG("conn %p", conn); |
1221 | 1222 | ||
1222 | if (!conn->hcon->out && conn->hcon->type == LE_LINK) | 1223 | if (!hcon->out && hcon->type == LE_LINK) |
1223 | l2cap_le_conn_ready(conn); | 1224 | l2cap_le_conn_ready(conn); |
1224 | 1225 | ||
1225 | if (conn->hcon->out && conn->hcon->type == LE_LINK) | 1226 | if (hcon->out && hcon->type == LE_LINK) |
1226 | smp_conn_security(conn, conn->hcon->pending_sec_level); | 1227 | smp_conn_security(hcon, hcon->pending_sec_level); |
1227 | 1228 | ||
1228 | mutex_lock(&conn->chan_lock); | 1229 | mutex_lock(&conn->chan_lock); |
1229 | 1230 | ||
@@ -1236,8 +1237,8 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) | |||
1236 | continue; | 1237 | continue; |
1237 | } | 1238 | } |
1238 | 1239 | ||
1239 | if (conn->hcon->type == LE_LINK) { | 1240 | if (hcon->type == LE_LINK) { |
1240 | if (smp_conn_security(conn, chan->sec_level)) | 1241 | if (smp_conn_security(hcon, chan->sec_level)) |
1241 | l2cap_chan_ready(chan); | 1242 | l2cap_chan_ready(chan); |
1242 | 1243 | ||
1243 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { | 1244 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 3a6ce73541d9..083f2bf065d4 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -620,7 +620,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch | |||
620 | break; | 620 | break; |
621 | } | 621 | } |
622 | 622 | ||
623 | if (smp_conn_security(conn, sec.level)) | 623 | if (smp_conn_security(conn->hcon, sec.level)) |
624 | break; | 624 | break; |
625 | sk->sk_state = BT_CONFIG; | 625 | sk->sk_state = BT_CONFIG; |
626 | chan->state = BT_CONFIG; | 626 | chan->state = BT_CONFIG; |
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 901a616c8083..8c225ef349cd 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -267,10 +267,10 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send) | |||
267 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, | 267 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, |
268 | hcon->dst_type, reason); | 268 | hcon->dst_type, reason); |
269 | 269 | ||
270 | if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) { | 270 | cancel_delayed_work_sync(&conn->security_timer); |
271 | cancel_delayed_work_sync(&conn->security_timer); | 271 | |
272 | if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) | ||
272 | smp_chan_destroy(conn); | 273 | smp_chan_destroy(conn); |
273 | } | ||
274 | } | 274 | } |
275 | 275 | ||
276 | #define JUST_WORKS 0x00 | 276 | #define JUST_WORKS 0x00 |
@@ -760,9 +760,9 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) | |||
760 | return 0; | 760 | return 0; |
761 | } | 761 | } |
762 | 762 | ||
763 | int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level) | 763 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) |
764 | { | 764 | { |
765 | struct hci_conn *hcon = conn->hcon; | 765 | struct l2cap_conn *conn = hcon->l2cap_data; |
766 | struct smp_chan *smp = conn->smp_chan; | 766 | struct smp_chan *smp = conn->smp_chan; |
767 | __u8 authreq; | 767 | __u8 authreq; |
768 | 768 | ||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 929f897a8ded..03fe6d1cff42 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1389,6 +1389,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1389 | else | 1389 | else |
1390 | memset(next_hop, 0, ETH_ALEN); | 1390 | memset(next_hop, 0, ETH_ALEN); |
1391 | 1391 | ||
1392 | memset(pinfo, 0, sizeof(*pinfo)); | ||
1393 | |||
1392 | pinfo->generation = mesh_paths_generation; | 1394 | pinfo->generation = mesh_paths_generation; |
1393 | 1395 | ||
1394 | pinfo->filled = MPATH_INFO_FRAME_QLEN | | 1396 | pinfo->filled = MPATH_INFO_FRAME_QLEN | |
@@ -1407,7 +1409,6 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1407 | pinfo->discovery_timeout = | 1409 | pinfo->discovery_timeout = |
1408 | jiffies_to_msecs(mpath->discovery_timeout); | 1410 | jiffies_to_msecs(mpath->discovery_timeout); |
1409 | pinfo->discovery_retries = mpath->discovery_retries; | 1411 | pinfo->discovery_retries = mpath->discovery_retries; |
1410 | pinfo->flags = 0; | ||
1411 | if (mpath->flags & MESH_PATH_ACTIVE) | 1412 | if (mpath->flags & MESH_PATH_ACTIVE) |
1412 | pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; | 1413 | pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; |
1413 | if (mpath->flags & MESH_PATH_RESOLVING) | 1414 | if (mpath->flags & MESH_PATH_RESOLVING) |
@@ -1416,10 +1417,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1416 | pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID; | 1417 | pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID; |
1417 | if (mpath->flags & MESH_PATH_FIXED) | 1418 | if (mpath->flags & MESH_PATH_FIXED) |
1418 | pinfo->flags |= NL80211_MPATH_FLAG_FIXED; | 1419 | pinfo->flags |= NL80211_MPATH_FLAG_FIXED; |
1419 | if (mpath->flags & MESH_PATH_RESOLVING) | 1420 | if (mpath->flags & MESH_PATH_RESOLVED) |
1420 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING; | 1421 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVED; |
1421 | |||
1422 | pinfo->flags = mpath->flags; | ||
1423 | } | 1422 | } |
1424 | 1423 | ||
1425 | static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, | 1424 | static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 59f8adc2aa5f..d747da541747 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -278,13 +278,15 @@ static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata) | |||
278 | int n_queues = sdata->local->hw.queues; | 278 | int n_queues = sdata->local->hw.queues; |
279 | int i; | 279 | int i; |
280 | 280 | ||
281 | for (i = 0; i < IEEE80211_NUM_ACS; i++) { | 281 | if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE) { |
282 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] == | 282 | for (i = 0; i < IEEE80211_NUM_ACS; i++) { |
283 | IEEE80211_INVAL_HW_QUEUE)) | 283 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] == |
284 | return -EINVAL; | 284 | IEEE80211_INVAL_HW_QUEUE)) |
285 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] >= | 285 | return -EINVAL; |
286 | n_queues)) | 286 | if (WARN_ON_ONCE(sdata->vif.hw_queue[i] >= |
287 | return -EINVAL; | 287 | n_queues)) |
288 | return -EINVAL; | ||
289 | } | ||
288 | } | 290 | } |
289 | 291 | ||
290 | if ((sdata->vif.type != NL80211_IFTYPE_AP) || | 292 | if ((sdata->vif.type != NL80211_IFTYPE_AP) || |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a8cf70bf1cba..5d77650d4363 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3300,6 +3300,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
3300 | goto out_unlock; | 3300 | goto out_unlock; |
3301 | 3301 | ||
3302 | err_clear: | 3302 | err_clear: |
3303 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3304 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3303 | ifmgd->auth_data = NULL; | 3305 | ifmgd->auth_data = NULL; |
3304 | err_free: | 3306 | err_free: |
3305 | kfree(auth_data); | 3307 | kfree(auth_data); |
@@ -3508,6 +3510,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3508 | err = 0; | 3510 | err = 0; |
3509 | goto out; | 3511 | goto out; |
3510 | err_clear: | 3512 | err_clear: |
3513 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3514 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3511 | ifmgd->assoc_data = NULL; | 3515 | ifmgd->assoc_data = NULL; |
3512 | err_free: | 3516 | err_free: |
3513 | kfree(assoc_data); | 3517 | kfree(assoc_data); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index b382605c5733..61c621e9273f 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -103,7 +103,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local, | |||
103 | return len; | 103 | return len; |
104 | } | 104 | } |
105 | 105 | ||
106 | /** | 106 | /* |
107 | * ieee80211_add_rx_radiotap_header - add radiotap header | 107 | * ieee80211_add_rx_radiotap_header - add radiotap header |
108 | * | 108 | * |
109 | * add a radiotap header containing all the fields which the hardware provided. | 109 | * add a radiotap header containing all the fields which the hardware provided. |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 34eb5c07a567..139946dc8020 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5656,8 +5656,10 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) | |||
5656 | sizeof(connect.ht_capa_mask)); | 5656 | sizeof(connect.ht_capa_mask)); |
5657 | 5657 | ||
5658 | if (info->attrs[NL80211_ATTR_HT_CAPABILITY]) { | 5658 | if (info->attrs[NL80211_ATTR_HT_CAPABILITY]) { |
5659 | if (!info->attrs[NL80211_ATTR_HT_CAPABILITY_MASK]) | 5659 | if (!info->attrs[NL80211_ATTR_HT_CAPABILITY_MASK]) { |
5660 | kfree(connkeys); | ||
5660 | return -EINVAL; | 5661 | return -EINVAL; |
5662 | } | ||
5661 | memcpy(&connect.ht_capa, | 5663 | memcpy(&connect.ht_capa, |
5662 | nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]), | 5664 | nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]), |
5663 | sizeof(connect.ht_capa)); | 5665 | sizeof(connect.ht_capa)); |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2ded3c7fad06..1ad04e54014c 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1949,8 +1949,7 @@ static void restore_regulatory_settings(bool reset_user) | |||
1949 | if (reg_request->initiator != | 1949 | if (reg_request->initiator != |
1950 | NL80211_REGDOM_SET_BY_USER) | 1950 | NL80211_REGDOM_SET_BY_USER) |
1951 | continue; | 1951 | continue; |
1952 | list_del(®_request->list); | 1952 | list_move_tail(®_request->list, &tmp_reg_req_list); |
1953 | list_add_tail(®_request->list, &tmp_reg_req_list); | ||
1954 | } | 1953 | } |
1955 | } | 1954 | } |
1956 | spin_unlock(®_requests_lock); | 1955 | spin_unlock(®_requests_lock); |
@@ -2009,8 +2008,7 @@ static void restore_regulatory_settings(bool reset_user) | |||
2009 | "into the queue\n", | 2008 | "into the queue\n", |
2010 | reg_request->alpha2[0], | 2009 | reg_request->alpha2[0], |
2011 | reg_request->alpha2[1]); | 2010 | reg_request->alpha2[1]); |
2012 | list_del(®_request->list); | 2011 | list_move_tail(®_request->list, ®_requests_list); |
2013 | list_add_tail(®_request->list, ®_requests_list); | ||
2014 | } | 2012 | } |
2015 | spin_unlock(®_requests_lock); | 2013 | spin_unlock(®_requests_lock); |
2016 | 2014 | ||
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 848523a2b22f..9730c9862bdc 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -815,7 +815,7 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
815 | return NULL; | 815 | return NULL; |
816 | 816 | ||
817 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && | 817 | if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && |
818 | (signal < 0 || signal > 100))) | 818 | (signal < 0 || signal > 100))) |
819 | return NULL; | 819 | return NULL; |
820 | 820 | ||
821 | if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) | 821 | if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) |
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index b0eb7aa49b60..c8717c1d082e 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c | |||
@@ -478,13 +478,13 @@ void wireless_send_event(struct net_device * dev, | |||
478 | if (descr->header_type == IW_HEADER_TYPE_POINT) { | 478 | if (descr->header_type == IW_HEADER_TYPE_POINT) { |
479 | /* Check if number of token fits within bounds */ | 479 | /* Check if number of token fits within bounds */ |
480 | if (wrqu->data.length > descr->max_tokens) { | 480 | if (wrqu->data.length > descr->max_tokens) { |
481 | netdev_err(dev, "(WE) : Wireless Event too big (%d)\n", | 481 | netdev_err(dev, "(WE) : Wireless Event (cmd=0x%04X) too big (%d)\n", |
482 | wrqu->data.length); | 482 | cmd, wrqu->data.length); |
483 | return; | 483 | return; |
484 | } | 484 | } |
485 | if (wrqu->data.length < descr->min_tokens) { | 485 | if (wrqu->data.length < descr->min_tokens) { |
486 | netdev_err(dev, "(WE) : Wireless Event too small (%d)\n", | 486 | netdev_err(dev, "(WE) : Wireless Event (cmd=0x%04X) too small (%d)\n", |
487 | wrqu->data.length); | 487 | cmd, wrqu->data.length); |
488 | return; | 488 | return; |
489 | } | 489 | } |
490 | /* Calculate extra_len - extra is NULL for restricted events */ | 490 | /* Calculate extra_len - extra is NULL for restricted events */ |