diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-11-25 15:47:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-11-25 15:47:18 -0500 |
commit | d5aedd7e1b2f024ced0486aeb730bc56875e5ac9 (patch) | |
tree | 8ba9d15789748952e5e02d7a8a4a8cda0e16ccfd /drivers/net/wireless | |
parent | 517543fd72d577dde2ebd9505dc4abf26d589f9a (diff) | |
parent | 24d47300d118c5909a51b7270276d749cce150a2 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 9df7bc91a26f..c72438bb2faf 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -383,6 +383,14 @@ struct hwsim_radiotap_hdr { | |||
383 | __le16 rt_chbitmask; | 383 | __le16 rt_chbitmask; |
384 | } __packed; | 384 | } __packed; |
385 | 385 | ||
386 | struct hwsim_radiotap_ack_hdr { | ||
387 | struct ieee80211_radiotap_header hdr; | ||
388 | u8 rt_flags; | ||
389 | u8 pad; | ||
390 | __le16 rt_channel; | ||
391 | __le16 rt_chbitmask; | ||
392 | } __packed; | ||
393 | |||
386 | /* MAC80211_HWSIM netlinf family */ | 394 | /* MAC80211_HWSIM netlinf family */ |
387 | static struct genl_family hwsim_genl_family = { | 395 | static struct genl_family hwsim_genl_family = { |
388 | .id = GENL_ID_GENERATE, | 396 | .id = GENL_ID_GENERATE, |
@@ -500,7 +508,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
500 | const u8 *addr) | 508 | const u8 *addr) |
501 | { | 509 | { |
502 | struct sk_buff *skb; | 510 | struct sk_buff *skb; |
503 | struct hwsim_radiotap_hdr *hdr; | 511 | struct hwsim_radiotap_ack_hdr *hdr; |
504 | u16 flags; | 512 | u16 flags; |
505 | struct ieee80211_hdr *hdr11; | 513 | struct ieee80211_hdr *hdr11; |
506 | 514 | ||
@@ -511,14 +519,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
511 | if (skb == NULL) | 519 | if (skb == NULL) |
512 | return; | 520 | return; |
513 | 521 | ||
514 | hdr = (struct hwsim_radiotap_hdr *) skb_put(skb, sizeof(*hdr)); | 522 | hdr = (struct hwsim_radiotap_ack_hdr *) skb_put(skb, sizeof(*hdr)); |
515 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 523 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
516 | hdr->hdr.it_pad = 0; | 524 | hdr->hdr.it_pad = 0; |
517 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); | 525 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); |
518 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | | 526 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | |
519 | (1 << IEEE80211_RADIOTAP_CHANNEL)); | 527 | (1 << IEEE80211_RADIOTAP_CHANNEL)); |
520 | hdr->rt_flags = 0; | 528 | hdr->rt_flags = 0; |
521 | hdr->rt_rate = 0; | 529 | hdr->pad = 0; |
522 | hdr->rt_channel = cpu_to_le16(chan->center_freq); | 530 | hdr->rt_channel = cpu_to_le16(chan->center_freq); |
523 | flags = IEEE80211_CHAN_2GHZ; | 531 | flags = IEEE80211_CHAN_2GHZ; |
524 | hdr->rt_chbitmask = cpu_to_le16(flags); | 532 | hdr->rt_chbitmask = cpu_to_le16(flags); |
@@ -1230,7 +1238,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | |||
1230 | HRTIMER_MODE_REL); | 1238 | HRTIMER_MODE_REL); |
1231 | } else if (!info->enable_beacon) { | 1239 | } else if (!info->enable_beacon) { |
1232 | unsigned int count = 0; | 1240 | unsigned int count = 0; |
1233 | ieee80211_iterate_active_interfaces( | 1241 | ieee80211_iterate_active_interfaces_atomic( |
1234 | data->hw, IEEE80211_IFACE_ITER_NORMAL, | 1242 | data->hw, IEEE80211_IFACE_ITER_NORMAL, |
1235 | mac80211_hwsim_bcn_en_iter, &count); | 1243 | mac80211_hwsim_bcn_en_iter, &count); |
1236 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", | 1244 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", |