diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-10-29 14:52:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 14:52:04 -0400 |
commit | d1f10302568221c20628200bc8baa426c55f61c0 (patch) | |
tree | 5eeb95d847924ec587e5e9a47ea2d2275d37635f /net | |
parent | 9b34f40c20111ba658f88e1669598db494be1fbc (diff) | |
parent | 1724ffbc7439de679d536163e03f54f35574d449 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/aes_cmac.c | 17 | ||||
-rw-r--r-- | net/mac80211/main.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 9 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 9 | ||||
-rw-r--r-- | net/mac80211/trace.h | 34 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 | ||||
-rw-r--r-- | net/wireless/core.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 | ||||
-rw-r--r-- | net/wireless/rdev-ops.h | 18 | ||||
-rw-r--r-- | net/wireless/trace.h | 10 |
10 files changed, 91 insertions, 18 deletions
diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c index a04752e91023..493353534a0f 100644 --- a/net/mac80211/aes_cmac.c +++ b/net/mac80211/aes_cmac.c | |||
@@ -126,3 +126,20 @@ void ieee80211_aes_cmac_key_free(struct crypto_cipher *tfm) | |||
126 | { | 126 | { |
127 | crypto_free_cipher(tfm); | 127 | crypto_free_cipher(tfm); |
128 | } | 128 | } |
129 | |||
130 | void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf, | ||
131 | u8 *k1, u8 *k2) | ||
132 | { | ||
133 | u8 l[AES_BLOCK_SIZE] = {}; | ||
134 | struct ieee80211_key *key = | ||
135 | container_of(keyconf, struct ieee80211_key, conf); | ||
136 | |||
137 | crypto_cipher_encrypt_one(key->u.aes_cmac.tfm, l, l); | ||
138 | |||
139 | memcpy(k1, l, AES_BLOCK_SIZE); | ||
140 | gf_mulx(k1); | ||
141 | |||
142 | memcpy(k2, k1, AES_BLOCK_SIZE); | ||
143 | gf_mulx(k2); | ||
144 | } | ||
145 | EXPORT_SYMBOL(ieee80211_aes_cmac_calculate_k1_k2); | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c42094be2f0b..fd8345c20051 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -751,7 +751,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
751 | if (comb->num_different_channels > 1) | 751 | if (comb->num_different_channels > 1) |
752 | return -EINVAL; | 752 | return -EINVAL; |
753 | } | 753 | } |
754 | 754 | } else { | |
755 | /* | 755 | /* |
756 | * WDS is currently prohibited when channel contexts are used | 756 | * WDS is currently prohibited when channel contexts are used |
757 | * because there's no clear definition of which channel WDS | 757 | * because there's no clear definition of which channel WDS |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 5bed4fd5ee19..a350cab4b339 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -703,8 +703,10 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | |||
703 | ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen, | 703 | ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen, |
704 | &elems); | 704 | &elems); |
705 | 705 | ||
706 | /* ignore beacons from secure mesh peers if our security is off */ | 706 | /* ignore non-mesh or secure / unsecure mismatch */ |
707 | if (elems.rsn_len && sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) | 707 | if ((!elems.mesh_id || !elems.mesh_config) || |
708 | (elems.rsn && sdata->u.mesh.security == IEEE80211_MESH_SEC_NONE) || | ||
709 | (!elems.rsn && sdata->u.mesh.security != IEEE80211_MESH_SEC_NONE)) | ||
708 | return; | 710 | return; |
709 | 711 | ||
710 | if (elems.ds_params && elems.ds_params_len == 1) | 712 | if (elems.ds_params && elems.ds_params_len == 1) |
@@ -717,8 +719,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | |||
717 | if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) | 719 | if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) |
718 | return; | 720 | return; |
719 | 721 | ||
720 | if (elems.mesh_id && elems.mesh_config && | 722 | if (mesh_matches_local(sdata, &elems)) |
721 | mesh_matches_local(sdata, &elems)) | ||
722 | mesh_neighbour_update(sdata, mgmt->sa, &elems); | 723 | mesh_neighbour_update(sdata, mgmt->sa, &elems); |
723 | 724 | ||
724 | if (ifmsh->sync_ops) | 725 | if (ifmsh->sync_ops) |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 861e1c40b1b9..1d1fdf0791f0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2433,7 +2433,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2433 | struct ieee80211_chanctx_conf *chanctx_conf; | 2433 | struct ieee80211_chanctx_conf *chanctx_conf; |
2434 | struct ieee80211_channel *chan; | 2434 | struct ieee80211_channel *chan; |
2435 | u32 changed = 0; | 2435 | u32 changed = 0; |
2436 | bool erp_valid, directed_tim = false; | 2436 | bool erp_valid; |
2437 | u8 erp_value = 0; | 2437 | u8 erp_value = 0; |
2438 | u32 ncrc; | 2438 | u32 ncrc; |
2439 | u8 *bssid; | 2439 | u8 *bssid; |
@@ -2564,11 +2564,10 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2564 | len - baselen, &elems, | 2564 | len - baselen, &elems, |
2565 | care_about_ies, ncrc); | 2565 | care_about_ies, ncrc); |
2566 | 2566 | ||
2567 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) | ||
2568 | directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len, | ||
2569 | ifmgd->aid); | ||
2570 | |||
2571 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { | 2567 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { |
2568 | bool directed_tim = ieee80211_check_tim(elems.tim, | ||
2569 | elems.tim_len, | ||
2570 | ifmgd->aid); | ||
2572 | if (directed_tim) { | 2571 | if (directed_tim) { |
2573 | if (local->hw.conf.dynamic_ps_timeout > 0) { | 2572 | if (local->hw.conf.dynamic_ps_timeout > 0) { |
2574 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { | 2573 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { |
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 629364705f7b..0638541b625f 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h | |||
@@ -315,20 +315,33 @@ TRACE_EVENT(drv_bss_info_changed, | |||
315 | TP_STRUCT__entry( | 315 | TP_STRUCT__entry( |
316 | LOCAL_ENTRY | 316 | LOCAL_ENTRY |
317 | VIF_ENTRY | 317 | VIF_ENTRY |
318 | __field(u32, changed) | ||
318 | __field(bool, assoc) | 319 | __field(bool, assoc) |
320 | __field(bool, ibss_joined) | ||
321 | __field(bool, ibss_creator) | ||
319 | __field(u16, aid) | 322 | __field(u16, aid) |
320 | __field(bool, cts) | 323 | __field(bool, cts) |
321 | __field(bool, shortpre) | 324 | __field(bool, shortpre) |
322 | __field(bool, shortslot) | 325 | __field(bool, shortslot) |
326 | __field(bool, enable_beacon) | ||
323 | __field(u8, dtimper) | 327 | __field(u8, dtimper) |
324 | __field(u16, bcnint) | 328 | __field(u16, bcnint) |
325 | __field(u16, assoc_cap) | 329 | __field(u16, assoc_cap) |
326 | __field(u64, sync_tsf) | 330 | __field(u64, sync_tsf) |
327 | __field(u32, sync_device_ts) | 331 | __field(u32, sync_device_ts) |
328 | __field(u32, basic_rates) | 332 | __field(u32, basic_rates) |
329 | __field(u32, changed) | 333 | __array(int, mcast_rate, IEEE80211_NUM_BANDS) |
330 | __field(bool, enable_beacon) | ||
331 | __field(u16, ht_operation_mode) | 334 | __field(u16, ht_operation_mode) |
335 | __field(s32, cqm_rssi_thold); | ||
336 | __field(s32, cqm_rssi_hyst); | ||
337 | __field(u32, channel_type); | ||
338 | __dynamic_array(u32, arp_addr_list, info->arp_addr_cnt); | ||
339 | __field(bool, arp_filter_enabled); | ||
340 | __field(bool, qos); | ||
341 | __field(bool, idle); | ||
342 | __field(bool, ps); | ||
343 | __dynamic_array(u8, ssid, info->ssid_len); | ||
344 | __field(bool, hidden_ssid); | ||
332 | ), | 345 | ), |
333 | 346 | ||
334 | TP_fast_assign( | 347 | TP_fast_assign( |
@@ -337,17 +350,32 @@ TRACE_EVENT(drv_bss_info_changed, | |||
337 | __entry->changed = changed; | 350 | __entry->changed = changed; |
338 | __entry->aid = info->aid; | 351 | __entry->aid = info->aid; |
339 | __entry->assoc = info->assoc; | 352 | __entry->assoc = info->assoc; |
353 | __entry->ibss_joined = info->ibss_joined; | ||
354 | __entry->ibss_creator = info->ibss_creator; | ||
340 | __entry->shortpre = info->use_short_preamble; | 355 | __entry->shortpre = info->use_short_preamble; |
341 | __entry->cts = info->use_cts_prot; | 356 | __entry->cts = info->use_cts_prot; |
342 | __entry->shortslot = info->use_short_slot; | 357 | __entry->shortslot = info->use_short_slot; |
358 | __entry->enable_beacon = info->enable_beacon; | ||
343 | __entry->dtimper = info->dtim_period; | 359 | __entry->dtimper = info->dtim_period; |
344 | __entry->bcnint = info->beacon_int; | 360 | __entry->bcnint = info->beacon_int; |
345 | __entry->assoc_cap = info->assoc_capability; | 361 | __entry->assoc_cap = info->assoc_capability; |
346 | __entry->sync_tsf = info->sync_tsf; | 362 | __entry->sync_tsf = info->sync_tsf; |
347 | __entry->sync_device_ts = info->sync_device_ts; | 363 | __entry->sync_device_ts = info->sync_device_ts; |
348 | __entry->basic_rates = info->basic_rates; | 364 | __entry->basic_rates = info->basic_rates; |
349 | __entry->enable_beacon = info->enable_beacon; | 365 | memcpy(__entry->mcast_rate, info->mcast_rate, |
366 | sizeof(__entry->mcast_rate)); | ||
350 | __entry->ht_operation_mode = info->ht_operation_mode; | 367 | __entry->ht_operation_mode = info->ht_operation_mode; |
368 | __entry->cqm_rssi_thold = info->cqm_rssi_thold; | ||
369 | __entry->cqm_rssi_hyst = info->cqm_rssi_hyst; | ||
370 | __entry->channel_type = info->channel_type; | ||
371 | memcpy(__get_dynamic_array(arp_addr_list), info->arp_addr_list, | ||
372 | sizeof(u32) * info->arp_addr_cnt); | ||
373 | __entry->arp_filter_enabled = info->arp_filter_enabled; | ||
374 | __entry->qos = info->qos; | ||
375 | __entry->idle = info->idle; | ||
376 | __entry->ps = info->ps; | ||
377 | memcpy(__get_dynamic_array(ssid), info->ssid, info->ssid_len); | ||
378 | __entry->hidden_ssid = info->hidden_ssid; | ||
351 | ), | 379 | ), |
352 | 380 | ||
353 | TP_printk( | 381 | TP_printk( |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 60c8ad10deb1..b3a84746d445 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -821,7 +821,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, | |||
821 | if (elem_parse_failed) | 821 | if (elem_parse_failed) |
822 | elems->parse_error = true; | 822 | elems->parse_error = true; |
823 | else | 823 | else |
824 | set_bit(id, seen_elems); | 824 | __set_bit(id, seen_elems); |
825 | 825 | ||
826 | left -= elen; | 826 | left -= elen; |
827 | pos += elen; | 827 | pos += elen; |
diff --git a/net/wireless/core.c b/net/wireless/core.c index f280f48fbd43..ce1ad776dfb5 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -241,7 +241,7 @@ static int cfg80211_rfkill_set_block(void *data, bool blocked) | |||
241 | case NL80211_IFTYPE_P2P_DEVICE: | 241 | case NL80211_IFTYPE_P2P_DEVICE: |
242 | if (!wdev->p2p_started) | 242 | if (!wdev->p2p_started) |
243 | break; | 243 | break; |
244 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); | 244 | rdev_stop_p2p_device(rdev, wdev); |
245 | wdev->p2p_started = false; | 245 | wdev->p2p_started = false; |
246 | rdev->opencount--; | 246 | rdev->opencount--; |
247 | break; | 247 | break; |
@@ -774,7 +774,7 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev) | |||
774 | case NL80211_IFTYPE_P2P_DEVICE: | 774 | case NL80211_IFTYPE_P2P_DEVICE: |
775 | if (!wdev->p2p_started) | 775 | if (!wdev->p2p_started) |
776 | break; | 776 | break; |
777 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); | 777 | rdev_stop_p2p_device(rdev, wdev); |
778 | wdev->p2p_started = false; | 778 | wdev->p2p_started = false; |
779 | rdev->opencount--; | 779 | rdev->opencount--; |
780 | break; | 780 | break; |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5d3167d71b5f..8c0857815a90 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -6932,7 +6932,7 @@ static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info) | |||
6932 | if (err) | 6932 | if (err) |
6933 | return err; | 6933 | return err; |
6934 | 6934 | ||
6935 | err = rdev->ops->start_p2p_device(&rdev->wiphy, wdev); | 6935 | err = rdev_start_p2p_device(rdev, wdev); |
6936 | if (err) | 6936 | if (err) |
6937 | return err; | 6937 | return err; |
6938 | 6938 | ||
@@ -6958,7 +6958,7 @@ static int nl80211_stop_p2p_device(struct sk_buff *skb, struct genl_info *info) | |||
6958 | if (!wdev->p2p_started) | 6958 | if (!wdev->p2p_started) |
6959 | return 0; | 6959 | return 0; |
6960 | 6960 | ||
6961 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); | 6961 | rdev_stop_p2p_device(rdev, wdev); |
6962 | wdev->p2p_started = false; | 6962 | wdev->p2p_started = false; |
6963 | 6963 | ||
6964 | mutex_lock(&rdev->devlist_mtx); | 6964 | mutex_lock(&rdev->devlist_mtx); |
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h index 4a88a39b1319..eb5f8974e148 100644 --- a/net/wireless/rdev-ops.h +++ b/net/wireless/rdev-ops.h | |||
@@ -858,4 +858,22 @@ static inline struct ieee80211_channel | |||
858 | return ret; | 858 | return ret; |
859 | } | 859 | } |
860 | 860 | ||
861 | static inline int rdev_start_p2p_device(struct cfg80211_registered_device *rdev, | ||
862 | struct wireless_dev *wdev) | ||
863 | { | ||
864 | int ret; | ||
865 | |||
866 | trace_rdev_start_p2p_device(&rdev->wiphy, wdev); | ||
867 | ret = rdev->ops->start_p2p_device(&rdev->wiphy, wdev); | ||
868 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
869 | return ret; | ||
870 | } | ||
871 | |||
872 | static inline void rdev_stop_p2p_device(struct cfg80211_registered_device *rdev, | ||
873 | struct wireless_dev *wdev) | ||
874 | { | ||
875 | trace_rdev_stop_p2p_device(&rdev->wiphy, wdev); | ||
876 | rdev->ops->stop_p2p_device(&rdev->wiphy, wdev); | ||
877 | trace_rdev_return_void(&rdev->wiphy); | ||
878 | } | ||
861 | #endif /* __CFG80211_RDEV_OPS */ | 879 | #endif /* __CFG80211_RDEV_OPS */ |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index 857734c4b357..0ca71caf85fb 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
@@ -1741,6 +1741,16 @@ TRACE_EVENT(rdev_return_channel, | |||
1741 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) | 1741 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) |
1742 | ); | 1742 | ); |
1743 | 1743 | ||
1744 | DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device, | ||
1745 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
1746 | TP_ARGS(wiphy, wdev) | ||
1747 | ); | ||
1748 | |||
1749 | DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device, | ||
1750 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
1751 | TP_ARGS(wiphy, wdev) | ||
1752 | ); | ||
1753 | |||
1744 | /************************************************************* | 1754 | /************************************************************* |
1745 | * cfg80211 exported functions traces * | 1755 | * cfg80211 exported functions traces * |
1746 | *************************************************************/ | 1756 | *************************************************************/ |