diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-24 18:01:30 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-24 18:01:30 -0400 |
commit | dde7dc759b777f385fc5df2af691c82eb455c7f3 (patch) | |
tree | 5e8f1fcd10a6b264d60bc8a0503656c0611de222 | |
parent | b422c6cd7e93bb613030f14d7d8a0cc73f115629 (diff) | |
parent | 4c8a9d4bfaf7dbc7d2168494904d79d22cc01db7 (diff) |
Merge remote-tracking branch 'mac80211/master' into mac80211-next
25 files changed, 256 insertions, 179 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 9b20d9ee2719..7f702fe3ecc2 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2369,6 +2369,9 @@ ath5k_tx_complete_poll_work(struct work_struct *work) | |||
2369 | int i; | 2369 | int i; |
2370 | bool needreset = false; | 2370 | bool needreset = false; |
2371 | 2371 | ||
2372 | if (!test_bit(ATH_STAT_STARTED, ah->status)) | ||
2373 | return; | ||
2374 | |||
2372 | mutex_lock(&ah->lock); | 2375 | mutex_lock(&ah->lock); |
2373 | 2376 | ||
2374 | for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) { | 2377 | for (i = 0; i < ARRAY_SIZE(ah->txqs); i++) { |
@@ -2676,6 +2679,7 @@ done: | |||
2676 | mmiowb(); | 2679 | mmiowb(); |
2677 | mutex_unlock(&ah->lock); | 2680 | mutex_unlock(&ah->lock); |
2678 | 2681 | ||
2682 | set_bit(ATH_STAT_STARTED, ah->status); | ||
2679 | ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work, | 2683 | ieee80211_queue_delayed_work(ah->hw, &ah->tx_complete_work, |
2680 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); | 2684 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); |
2681 | 2685 | ||
@@ -2737,6 +2741,7 @@ void ath5k_stop(struct ieee80211_hw *hw) | |||
2737 | 2741 | ||
2738 | ath5k_stop_tasklets(ah); | 2742 | ath5k_stop_tasklets(ah); |
2739 | 2743 | ||
2744 | clear_bit(ATH_STAT_STARTED, ah->status); | ||
2740 | cancel_delayed_work_sync(&ah->tx_complete_work); | 2745 | cancel_delayed_work_sync(&ah->tx_complete_work); |
2741 | 2746 | ||
2742 | if (!ath5k_modparam_no_hw_rfkill_switch) | 2747 | if (!ath5k_modparam_no_hw_rfkill_switch) |
diff --git a/drivers/net/wireless/ath/ath9k/ar9565_1p0_initvals.h b/drivers/net/wireless/ath/ath9k/ar9565_1p0_initvals.h index 0c2ac0c6dc89..e85a8b076c22 100644 --- a/drivers/net/wireless/ath/ath9k/ar9565_1p0_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9565_1p0_initvals.h | |||
@@ -233,9 +233,9 @@ static const u32 ar9565_1p0_baseband_core[][2] = { | |||
233 | {0x00009d10, 0x01834061}, | 233 | {0x00009d10, 0x01834061}, |
234 | {0x00009d14, 0x00c00400}, | 234 | {0x00009d14, 0x00c00400}, |
235 | {0x00009d18, 0x00000000}, | 235 | {0x00009d18, 0x00000000}, |
236 | {0x00009e08, 0x0078230c}, | 236 | {0x00009e08, 0x0038230c}, |
237 | {0x00009e24, 0x990bb515}, | 237 | {0x00009e24, 0x9907b515}, |
238 | {0x00009e28, 0x126f0000}, | 238 | {0x00009e28, 0x126f0600}, |
239 | {0x00009e30, 0x06336f77}, | 239 | {0x00009e30, 0x06336f77}, |
240 | {0x00009e34, 0x6af6532f}, | 240 | {0x00009e34, 0x6af6532f}, |
241 | {0x00009e38, 0x0cc80c00}, | 241 | {0x00009e38, 0x0cc80c00}, |
@@ -337,7 +337,7 @@ static const u32 ar9565_1p0_baseband_core[][2] = { | |||
337 | 337 | ||
338 | static const u32 ar9565_1p0_baseband_postamble[][5] = { | 338 | static const u32 ar9565_1p0_baseband_postamble[][5] = { |
339 | /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ | 339 | /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ |
340 | {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a800d}, | 340 | {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8009}, |
341 | {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a01ae}, | 341 | {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a01ae}, |
342 | {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x63c640da}, | 342 | {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x63c640da}, |
343 | {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x09143c81}, | 343 | {0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x09143c81}, |
@@ -345,9 +345,9 @@ static const u32 ar9565_1p0_baseband_postamble[][5] = { | |||
345 | {0x00009830, 0x0000059c, 0x0000059c, 0x0000059c, 0x0000059c}, | 345 | {0x00009830, 0x0000059c, 0x0000059c, 0x0000059c, 0x0000059c}, |
346 | {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4}, | 346 | {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4}, |
347 | {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0}, | 347 | {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0}, |
348 | {0x00009e04, 0x00802020, 0x00802020, 0x00802020, 0x00802020}, | 348 | {0x00009e04, 0x00802020, 0x00802020, 0x00142020, 0x00142020}, |
349 | {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000d8}, | 349 | {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2}, |
350 | {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec86d2e}, | 350 | {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e}, |
351 | {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3379605e, 0x33795d5e}, | 351 | {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3379605e, 0x33795d5e}, |
352 | {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 352 | {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
353 | {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c}, | 353 | {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c}, |
@@ -450,6 +450,8 @@ static const u32 ar9565_1p0_soc_postamble[][5] = { | |||
450 | 450 | ||
451 | static const u32 ar9565_1p0_Common_rx_gain_table[][2] = { | 451 | static const u32 ar9565_1p0_Common_rx_gain_table[][2] = { |
452 | /* Addr allmodes */ | 452 | /* Addr allmodes */ |
453 | {0x00004050, 0x00300300}, | ||
454 | {0x0000406c, 0x00100000}, | ||
453 | {0x0000a000, 0x00010000}, | 455 | {0x0000a000, 0x00010000}, |
454 | {0x0000a004, 0x00030002}, | 456 | {0x0000a004, 0x00030002}, |
455 | {0x0000a008, 0x00050004}, | 457 | {0x0000a008, 0x00050004}, |
@@ -498,27 +500,27 @@ static const u32 ar9565_1p0_Common_rx_gain_table[][2] = { | |||
498 | {0x0000a0b4, 0x00000000}, | 500 | {0x0000a0b4, 0x00000000}, |
499 | {0x0000a0b8, 0x00000000}, | 501 | {0x0000a0b8, 0x00000000}, |
500 | {0x0000a0bc, 0x00000000}, | 502 | {0x0000a0bc, 0x00000000}, |
501 | {0x0000a0c0, 0x001f0000}, | 503 | {0x0000a0c0, 0x00bf00a0}, |
502 | {0x0000a0c4, 0x01000101}, | 504 | {0x0000a0c4, 0x11a011a1}, |
503 | {0x0000a0c8, 0x011e011f}, | 505 | {0x0000a0c8, 0x11be11bf}, |
504 | {0x0000a0cc, 0x011c011d}, | 506 | {0x0000a0cc, 0x11bc11bd}, |
505 | {0x0000a0d0, 0x02030204}, | 507 | {0x0000a0d0, 0x22632264}, |
506 | {0x0000a0d4, 0x02010202}, | 508 | {0x0000a0d4, 0x22612262}, |
507 | {0x0000a0d8, 0x021f0200}, | 509 | {0x0000a0d8, 0x227f2260}, |
508 | {0x0000a0dc, 0x0302021e}, | 510 | {0x0000a0dc, 0x4322227e}, |
509 | {0x0000a0e0, 0x03000301}, | 511 | {0x0000a0e0, 0x43204321}, |
510 | {0x0000a0e4, 0x031e031f}, | 512 | {0x0000a0e4, 0x433e433f}, |
511 | {0x0000a0e8, 0x0402031d}, | 513 | {0x0000a0e8, 0x4462433d}, |
512 | {0x0000a0ec, 0x04000401}, | 514 | {0x0000a0ec, 0x44604461}, |
513 | {0x0000a0f0, 0x041e041f}, | 515 | {0x0000a0f0, 0x447e447f}, |
514 | {0x0000a0f4, 0x0502041d}, | 516 | {0x0000a0f4, 0x5582447d}, |
515 | {0x0000a0f8, 0x05000501}, | 517 | {0x0000a0f8, 0x55805581}, |
516 | {0x0000a0fc, 0x051e051f}, | 518 | {0x0000a0fc, 0x559e559f}, |
517 | {0x0000a100, 0x06010602}, | 519 | {0x0000a100, 0x66816682}, |
518 | {0x0000a104, 0x061f0600}, | 520 | {0x0000a104, 0x669f6680}, |
519 | {0x0000a108, 0x061d061e}, | 521 | {0x0000a108, 0x669d669e}, |
520 | {0x0000a10c, 0x07020703}, | 522 | {0x0000a10c, 0x77627763}, |
521 | {0x0000a110, 0x07000701}, | 523 | {0x0000a110, 0x77607761}, |
522 | {0x0000a114, 0x00000000}, | 524 | {0x0000a114, 0x00000000}, |
523 | {0x0000a118, 0x00000000}, | 525 | {0x0000a118, 0x00000000}, |
524 | {0x0000a11c, 0x00000000}, | 526 | {0x0000a11c, 0x00000000}, |
@@ -530,27 +532,27 @@ static const u32 ar9565_1p0_Common_rx_gain_table[][2] = { | |||
530 | {0x0000a134, 0x00000000}, | 532 | {0x0000a134, 0x00000000}, |
531 | {0x0000a138, 0x00000000}, | 533 | {0x0000a138, 0x00000000}, |
532 | {0x0000a13c, 0x00000000}, | 534 | {0x0000a13c, 0x00000000}, |
533 | {0x0000a140, 0x001f0000}, | 535 | {0x0000a140, 0x00bf00a0}, |
534 | {0x0000a144, 0x01000101}, | 536 | {0x0000a144, 0x11a011a1}, |
535 | {0x0000a148, 0x011e011f}, | 537 | {0x0000a148, 0x11be11bf}, |
536 | {0x0000a14c, 0x011c011d}, | 538 | {0x0000a14c, 0x11bc11bd}, |
537 | {0x0000a150, 0x02030204}, | 539 | {0x0000a150, 0x22632264}, |
538 | {0x0000a154, 0x02010202}, | 540 | {0x0000a154, 0x22612262}, |
539 | {0x0000a158, 0x021f0200}, | 541 | {0x0000a158, 0x227f2260}, |
540 | {0x0000a15c, 0x0302021e}, | 542 | {0x0000a15c, 0x4322227e}, |
541 | {0x0000a160, 0x03000301}, | 543 | {0x0000a160, 0x43204321}, |
542 | {0x0000a164, 0x031e031f}, | 544 | {0x0000a164, 0x433e433f}, |
543 | {0x0000a168, 0x0402031d}, | 545 | {0x0000a168, 0x4462433d}, |
544 | {0x0000a16c, 0x04000401}, | 546 | {0x0000a16c, 0x44604461}, |
545 | {0x0000a170, 0x041e041f}, | 547 | {0x0000a170, 0x447e447f}, |
546 | {0x0000a174, 0x0502041d}, | 548 | {0x0000a174, 0x5582447d}, |
547 | {0x0000a178, 0x05000501}, | 549 | {0x0000a178, 0x55805581}, |
548 | {0x0000a17c, 0x051e051f}, | 550 | {0x0000a17c, 0x559e559f}, |
549 | {0x0000a180, 0x06010602}, | 551 | {0x0000a180, 0x66816682}, |
550 | {0x0000a184, 0x061f0600}, | 552 | {0x0000a184, 0x669f6680}, |
551 | {0x0000a188, 0x061d061e}, | 553 | {0x0000a188, 0x669d669e}, |
552 | {0x0000a18c, 0x07020703}, | 554 | {0x0000a18c, 0x77e677e7}, |
553 | {0x0000a190, 0x07000701}, | 555 | {0x0000a190, 0x77e477e5}, |
554 | {0x0000a194, 0x00000000}, | 556 | {0x0000a194, 0x00000000}, |
555 | {0x0000a198, 0x00000000}, | 557 | {0x0000a198, 0x00000000}, |
556 | {0x0000a19c, 0x00000000}, | 558 | {0x0000a19c, 0x00000000}, |
@@ -770,7 +772,7 @@ static const u32 ar9565_1p0_Modes_lowest_ob_db_tx_gain_table[][5] = { | |||
770 | 772 | ||
771 | static const u32 ar9565_1p0_pciephy_clkreq_disable_L1[][2] = { | 773 | static const u32 ar9565_1p0_pciephy_clkreq_disable_L1[][2] = { |
772 | /* Addr allmodes */ | 774 | /* Addr allmodes */ |
773 | {0x00018c00, 0x18213ede}, | 775 | {0x00018c00, 0x18212ede}, |
774 | {0x00018c04, 0x000801d8}, | 776 | {0x00018c04, 0x000801d8}, |
775 | {0x00018c08, 0x0003780c}, | 777 | {0x00018c08, 0x0003780c}, |
776 | }; | 778 | }; |
@@ -889,8 +891,8 @@ static const u32 ar9565_1p0_common_wo_xlna_rx_gain_table[][2] = { | |||
889 | {0x0000a180, 0x66816682}, | 891 | {0x0000a180, 0x66816682}, |
890 | {0x0000a184, 0x669f6680}, | 892 | {0x0000a184, 0x669f6680}, |
891 | {0x0000a188, 0x669d669e}, | 893 | {0x0000a188, 0x669d669e}, |
892 | {0x0000a18c, 0x77627763}, | 894 | {0x0000a18c, 0x77e677e7}, |
893 | {0x0000a190, 0x77607761}, | 895 | {0x0000a190, 0x77e477e5}, |
894 | {0x0000a194, 0x00000000}, | 896 | {0x0000a194, 0x00000000}, |
895 | {0x0000a198, 0x00000000}, | 897 | {0x0000a198, 0x00000000}, |
896 | {0x0000a19c, 0x00000000}, | 898 | {0x0000a19c, 0x00000000}, |
@@ -1114,7 +1116,7 @@ static const u32 ar9565_1p0_modes_high_ob_db_tx_gain_table[][5] = { | |||
1114 | {0x0000a2e0, 0xffecec00, 0xffecec00, 0xfd339c84, 0xfd339c84}, | 1116 | {0x0000a2e0, 0xffecec00, 0xffecec00, 0xfd339c84, 0xfd339c84}, |
1115 | {0x0000a2e4, 0xfc0f0000, 0xfc0f0000, 0xfec3e000, 0xfec3e000}, | 1117 | {0x0000a2e4, 0xfc0f0000, 0xfc0f0000, 0xfec3e000, 0xfec3e000}, |
1116 | {0x0000a2e8, 0xfc100000, 0xfc100000, 0xfffc0000, 0xfffc0000}, | 1118 | {0x0000a2e8, 0xfc100000, 0xfc100000, 0xfffc0000, 0xfffc0000}, |
1117 | {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, | 1119 | {0x0000a410, 0x000050d9, 0x000050d9, 0x000050df, 0x000050df}, |
1118 | {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, | 1120 | {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, |
1119 | {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, | 1121 | {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, |
1120 | {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004}, | 1122 | {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004}, |
@@ -1140,13 +1142,13 @@ static const u32 ar9565_1p0_modes_high_ob_db_tx_gain_table[][5] = { | |||
1140 | {0x0000a558, 0x69027f56, 0x69027f56, 0x53001ce5, 0x53001ce5}, | 1142 | {0x0000a558, 0x69027f56, 0x69027f56, 0x53001ce5, 0x53001ce5}, |
1141 | {0x0000a55c, 0x6d029f56, 0x6d029f56, 0x57001ce9, 0x57001ce9}, | 1143 | {0x0000a55c, 0x6d029f56, 0x6d029f56, 0x57001ce9, 0x57001ce9}, |
1142 | {0x0000a560, 0x73049f56, 0x73049f56, 0x5b001ceb, 0x5b001ceb}, | 1144 | {0x0000a560, 0x73049f56, 0x73049f56, 0x5b001ceb, 0x5b001ceb}, |
1143 | {0x0000a564, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1145 | {0x0000a564, 0x7804ff56, 0x7804ff56, 0x60001cf0, 0x60001cf0}, |
1144 | {0x0000a568, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1146 | {0x0000a568, 0x7804ff56, 0x7804ff56, 0x61001cf1, 0x61001cf1}, |
1145 | {0x0000a56c, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1147 | {0x0000a56c, 0x7804ff56, 0x7804ff56, 0x62001cf2, 0x62001cf2}, |
1146 | {0x0000a570, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1148 | {0x0000a570, 0x7804ff56, 0x7804ff56, 0x63001cf3, 0x63001cf3}, |
1147 | {0x0000a574, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1149 | {0x0000a574, 0x7804ff56, 0x7804ff56, 0x64001cf4, 0x64001cf4}, |
1148 | {0x0000a578, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1150 | {0x0000a578, 0x7804ff56, 0x7804ff56, 0x66001ff6, 0x66001ff6}, |
1149 | {0x0000a57c, 0x7804ff56, 0x7804ff56, 0x5d001eec, 0x5d001eec}, | 1151 | {0x0000a57c, 0x7804ff56, 0x7804ff56, 0x66001ff6, 0x66001ff6}, |
1150 | {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1152 | {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
1151 | {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1153 | {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
1152 | {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1154 | {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
@@ -1174,7 +1176,7 @@ static const u32 ar9565_1p0_modes_high_power_tx_gain_table[][5] = { | |||
1174 | {0x0000a2e0, 0xffecec00, 0xffecec00, 0xfd339c84, 0xfd339c84}, | 1176 | {0x0000a2e0, 0xffecec00, 0xffecec00, 0xfd339c84, 0xfd339c84}, |
1175 | {0x0000a2e4, 0xfc0f0000, 0xfc0f0000, 0xfec3e000, 0xfec3e000}, | 1177 | {0x0000a2e4, 0xfc0f0000, 0xfc0f0000, 0xfec3e000, 0xfec3e000}, |
1176 | {0x0000a2e8, 0xfc100000, 0xfc100000, 0xfffc0000, 0xfffc0000}, | 1178 | {0x0000a2e8, 0xfc100000, 0xfc100000, 0xfffc0000, 0xfffc0000}, |
1177 | {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, | 1179 | {0x0000a410, 0x000050d9, 0x000050d9, 0x000050df, 0x000050df}, |
1178 | {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, | 1180 | {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, |
1179 | {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, | 1181 | {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, |
1180 | {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, | 1182 | {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, |
@@ -1200,13 +1202,13 @@ static const u32 ar9565_1p0_modes_high_power_tx_gain_table[][5] = { | |||
1200 | {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5}, | 1202 | {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5}, |
1201 | {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9}, | 1203 | {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9}, |
1202 | {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb}, | 1204 | {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb}, |
1203 | {0x0000a564, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1205 | {0x0000a564, 0x7504ff56, 0x7504ff56, 0x59001cf0, 0x59001cf0}, |
1204 | {0x0000a568, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1206 | {0x0000a568, 0x7504ff56, 0x7504ff56, 0x5a001cf1, 0x5a001cf1}, |
1205 | {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1207 | {0x0000a56c, 0x7504ff56, 0x7504ff56, 0x5b001cf2, 0x5b001cf2}, |
1206 | {0x0000a570, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1208 | {0x0000a570, 0x7504ff56, 0x7504ff56, 0x5c001cf3, 0x5c001cf3}, |
1207 | {0x0000a574, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1209 | {0x0000a574, 0x7504ff56, 0x7504ff56, 0x5d001cf4, 0x5d001cf4}, |
1208 | {0x0000a578, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1210 | {0x0000a578, 0x7504ff56, 0x7504ff56, 0x5f001ff6, 0x5f001ff6}, |
1209 | {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x56001eec, 0x56001eec}, | 1211 | {0x0000a57c, 0x7504ff56, 0x7504ff56, 0x5f001ff6, 0x5f001ff6}, |
1210 | {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1212 | {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
1211 | {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1213 | {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
1212 | {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, | 1214 | {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 6963862a1872..a18414b5948b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -227,13 +227,13 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start) | |||
227 | if (!test_bit(SC_OP_BEACONS, &sc->sc_flags)) | 227 | if (!test_bit(SC_OP_BEACONS, &sc->sc_flags)) |
228 | goto work; | 228 | goto work; |
229 | 229 | ||
230 | ath9k_set_beacon(sc); | ||
231 | |||
232 | if (ah->opmode == NL80211_IFTYPE_STATION && | 230 | if (ah->opmode == NL80211_IFTYPE_STATION && |
233 | test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) { | 231 | test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) { |
234 | spin_lock_irqsave(&sc->sc_pm_lock, flags); | 232 | spin_lock_irqsave(&sc->sc_pm_lock, flags); |
235 | sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON; | 233 | sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON; |
236 | spin_unlock_irqrestore(&sc->sc_pm_lock, flags); | 234 | spin_unlock_irqrestore(&sc->sc_pm_lock, flags); |
235 | } else { | ||
236 | ath9k_set_beacon(sc); | ||
237 | } | 237 | } |
238 | work: | 238 | work: |
239 | ath_restart_work(sc); | 239 | ath_restart_work(sc); |
@@ -1332,6 +1332,7 @@ static int ath9k_sta_add(struct ieee80211_hw *hw, | |||
1332 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1332 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1333 | struct ath_node *an = (struct ath_node *) sta->drv_priv; | 1333 | struct ath_node *an = (struct ath_node *) sta->drv_priv; |
1334 | struct ieee80211_key_conf ps_key = { }; | 1334 | struct ieee80211_key_conf ps_key = { }; |
1335 | int key; | ||
1335 | 1336 | ||
1336 | ath_node_attach(sc, sta, vif); | 1337 | ath_node_attach(sc, sta, vif); |
1337 | 1338 | ||
@@ -1339,7 +1340,9 @@ static int ath9k_sta_add(struct ieee80211_hw *hw, | |||
1339 | vif->type != NL80211_IFTYPE_AP_VLAN) | 1340 | vif->type != NL80211_IFTYPE_AP_VLAN) |
1340 | return 0; | 1341 | return 0; |
1341 | 1342 | ||
1342 | an->ps_key = ath_key_config(common, vif, sta, &ps_key); | 1343 | key = ath_key_config(common, vif, sta, &ps_key); |
1344 | if (key > 0) | ||
1345 | an->ps_key = key; | ||
1343 | 1346 | ||
1344 | return 0; | 1347 | return 0; |
1345 | } | 1348 | } |
@@ -1356,6 +1359,7 @@ static void ath9k_del_ps_key(struct ath_softc *sc, | |||
1356 | return; | 1359 | return; |
1357 | 1360 | ||
1358 | ath_key_delete(common, &ps_key); | 1361 | ath_key_delete(common, &ps_key); |
1362 | an->ps_key = 0; | ||
1359 | } | 1363 | } |
1360 | 1364 | ||
1361 | static int ath9k_sta_remove(struct ieee80211_hw *hw, | 1365 | static int ath9k_sta_remove(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 523355b87659..f7c70b3a6ea9 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -1728,6 +1728,25 @@ drop_recycle_buffer: | |||
1728 | sync_descbuffer_for_device(ring, dmaaddr, ring->rx_buffersize); | 1728 | sync_descbuffer_for_device(ring, dmaaddr, ring->rx_buffersize); |
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | void b43_dma_handle_rx_overflow(struct b43_dmaring *ring) | ||
1732 | { | ||
1733 | int current_slot, previous_slot; | ||
1734 | |||
1735 | B43_WARN_ON(ring->tx); | ||
1736 | |||
1737 | /* Device has filled all buffers, drop all packets and let TCP | ||
1738 | * decrease speed. | ||
1739 | * Decrement RX index by one will let the device to see all slots | ||
1740 | * as free again | ||
1741 | */ | ||
1742 | /* | ||
1743 | *TODO: How to increase rx_drop in mac80211? | ||
1744 | */ | ||
1745 | current_slot = ring->ops->get_current_rxslot(ring); | ||
1746 | previous_slot = prev_slot(ring, current_slot); | ||
1747 | ring->ops->set_current_rxslot(ring, previous_slot); | ||
1748 | } | ||
1749 | |||
1731 | void b43_dma_rx(struct b43_dmaring *ring) | 1750 | void b43_dma_rx(struct b43_dmaring *ring) |
1732 | { | 1751 | { |
1733 | const struct b43_dma_ops *ops = ring->ops; | 1752 | const struct b43_dma_ops *ops = ring->ops; |
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index 9fdd1983079c..df8c8cdcbdb5 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h | |||
@@ -9,7 +9,7 @@ | |||
9 | /* DMA-Interrupt reasons. */ | 9 | /* DMA-Interrupt reasons. */ |
10 | #define B43_DMAIRQ_FATALMASK ((1 << 10) | (1 << 11) | (1 << 12) \ | 10 | #define B43_DMAIRQ_FATALMASK ((1 << 10) | (1 << 11) | (1 << 12) \ |
11 | | (1 << 14) | (1 << 15)) | 11 | | (1 << 14) | (1 << 15)) |
12 | #define B43_DMAIRQ_NONFATALMASK (1 << 13) | 12 | #define B43_DMAIRQ_RDESC_UFLOW (1 << 13) |
13 | #define B43_DMAIRQ_RX_DONE (1 << 16) | 13 | #define B43_DMAIRQ_RX_DONE (1 << 16) |
14 | 14 | ||
15 | /*** 32-bit DMA Engine. ***/ | 15 | /*** 32-bit DMA Engine. ***/ |
@@ -295,6 +295,8 @@ int b43_dma_tx(struct b43_wldev *dev, | |||
295 | void b43_dma_handle_txstatus(struct b43_wldev *dev, | 295 | void b43_dma_handle_txstatus(struct b43_wldev *dev, |
296 | const struct b43_txstatus *status); | 296 | const struct b43_txstatus *status); |
297 | 297 | ||
298 | void b43_dma_handle_rx_overflow(struct b43_dmaring *ring); | ||
299 | |||
298 | void b43_dma_rx(struct b43_dmaring *ring); | 300 | void b43_dma_rx(struct b43_dmaring *ring); |
299 | 301 | ||
300 | void b43_dma_direct_fifo_rx(struct b43_wldev *dev, | 302 | void b43_dma_direct_fifo_rx(struct b43_wldev *dev, |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index d377f77d30b5..6dd07e2ec595 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1902,30 +1902,18 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev) | |||
1902 | } | 1902 | } |
1903 | } | 1903 | } |
1904 | 1904 | ||
1905 | if (unlikely(merged_dma_reason & (B43_DMAIRQ_FATALMASK | | 1905 | if (unlikely(merged_dma_reason & (B43_DMAIRQ_FATALMASK))) { |
1906 | B43_DMAIRQ_NONFATALMASK))) { | 1906 | b43err(dev->wl, |
1907 | if (merged_dma_reason & B43_DMAIRQ_FATALMASK) { | 1907 | "Fatal DMA error: 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X, 0x%08X\n", |
1908 | b43err(dev->wl, "Fatal DMA error: " | 1908 | dma_reason[0], dma_reason[1], |
1909 | "0x%08X, 0x%08X, 0x%08X, " | 1909 | dma_reason[2], dma_reason[3], |
1910 | "0x%08X, 0x%08X, 0x%08X\n", | 1910 | dma_reason[4], dma_reason[5]); |
1911 | dma_reason[0], dma_reason[1], | 1911 | b43err(dev->wl, "This device does not support DMA " |
1912 | dma_reason[2], dma_reason[3], | ||
1913 | dma_reason[4], dma_reason[5]); | ||
1914 | b43err(dev->wl, "This device does not support DMA " | ||
1915 | "on your system. It will now be switched to PIO.\n"); | 1912 | "on your system. It will now be switched to PIO.\n"); |
1916 | /* Fall back to PIO transfers if we get fatal DMA errors! */ | 1913 | /* Fall back to PIO transfers if we get fatal DMA errors! */ |
1917 | dev->use_pio = true; | 1914 | dev->use_pio = true; |
1918 | b43_controller_restart(dev, "DMA error"); | 1915 | b43_controller_restart(dev, "DMA error"); |
1919 | return; | 1916 | return; |
1920 | } | ||
1921 | if (merged_dma_reason & B43_DMAIRQ_NONFATALMASK) { | ||
1922 | b43err(dev->wl, "DMA error: " | ||
1923 | "0x%08X, 0x%08X, 0x%08X, " | ||
1924 | "0x%08X, 0x%08X, 0x%08X\n", | ||
1925 | dma_reason[0], dma_reason[1], | ||
1926 | dma_reason[2], dma_reason[3], | ||
1927 | dma_reason[4], dma_reason[5]); | ||
1928 | } | ||
1929 | } | 1917 | } |
1930 | 1918 | ||
1931 | if (unlikely(reason & B43_IRQ_UCODE_DEBUG)) | 1919 | if (unlikely(reason & B43_IRQ_UCODE_DEBUG)) |
@@ -1944,6 +1932,11 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev) | |||
1944 | handle_irq_noise(dev); | 1932 | handle_irq_noise(dev); |
1945 | 1933 | ||
1946 | /* Check the DMA reason registers for received data. */ | 1934 | /* Check the DMA reason registers for received data. */ |
1935 | if (dma_reason[0] & B43_DMAIRQ_RDESC_UFLOW) { | ||
1936 | if (B43_DEBUG) | ||
1937 | b43warn(dev->wl, "RX descriptor underrun\n"); | ||
1938 | b43_dma_handle_rx_overflow(dev->dma.rx_ring); | ||
1939 | } | ||
1947 | if (dma_reason[0] & B43_DMAIRQ_RX_DONE) { | 1940 | if (dma_reason[0] & B43_DMAIRQ_RX_DONE) { |
1948 | if (b43_using_pio_transfers(dev)) | 1941 | if (b43_using_pio_transfers(dev)) |
1949 | b43_pio_rx(dev->pio.rx_queue); | 1942 | b43_pio_rx(dev->pio.rx_queue); |
@@ -2001,7 +1994,7 @@ static irqreturn_t b43_do_interrupt(struct b43_wldev *dev) | |||
2001 | return IRQ_NONE; | 1994 | return IRQ_NONE; |
2002 | 1995 | ||
2003 | dev->dma_reason[0] = b43_read32(dev, B43_MMIO_DMA0_REASON) | 1996 | dev->dma_reason[0] = b43_read32(dev, B43_MMIO_DMA0_REASON) |
2004 | & 0x0001DC00; | 1997 | & 0x0001FC00; |
2005 | dev->dma_reason[1] = b43_read32(dev, B43_MMIO_DMA1_REASON) | 1998 | dev->dma_reason[1] = b43_read32(dev, B43_MMIO_DMA1_REASON) |
2006 | & 0x0000DC00; | 1999 | & 0x0000DC00; |
2007 | dev->dma_reason[2] = b43_read32(dev, B43_MMIO_DMA2_REASON) | 2000 | dev->dma_reason[2] = b43_read32(dev, B43_MMIO_DMA2_REASON) |
@@ -3130,7 +3123,7 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
3130 | b43_write32(dev, 0x018C, 0x02000000); | 3123 | b43_write32(dev, 0x018C, 0x02000000); |
3131 | } | 3124 | } |
3132 | b43_write32(dev, B43_MMIO_GEN_IRQ_REASON, 0x00004000); | 3125 | b43_write32(dev, B43_MMIO_GEN_IRQ_REASON, 0x00004000); |
3133 | b43_write32(dev, B43_MMIO_DMA0_IRQ_MASK, 0x0001DC00); | 3126 | b43_write32(dev, B43_MMIO_DMA0_IRQ_MASK, 0x0001FC00); |
3134 | b43_write32(dev, B43_MMIO_DMA1_IRQ_MASK, 0x0000DC00); | 3127 | b43_write32(dev, B43_MMIO_DMA1_IRQ_MASK, 0x0000DC00); |
3135 | b43_write32(dev, B43_MMIO_DMA2_IRQ_MASK, 0x0000DC00); | 3128 | b43_write32(dev, B43_MMIO_DMA2_IRQ_MASK, 0x0000DC00); |
3136 | b43_write32(dev, B43_MMIO_DMA3_IRQ_MASK, 0x0001DC00); | 3129 | b43_write32(dev, B43_MMIO_DMA3_IRQ_MASK, 0x0001DC00); |
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index b8f82e688c72..9a95045c97b6 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -5741,8 +5741,7 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length) | |||
5741 | hw->flags = | 5741 | hw->flags = |
5742 | IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_AMPDU_AGGREGATION | | 5742 | IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_AMPDU_AGGREGATION | |
5743 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | IEEE80211_HW_SPECTRUM_MGMT | | 5743 | IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | IEEE80211_HW_SPECTRUM_MGMT | |
5744 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_PS | | 5744 | IEEE80211_HW_SUPPORTS_PS | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
5745 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | ||
5746 | if (il->cfg->sku & IL_SKU_N) | 5745 | if (il->cfg->sku & IL_SKU_N) |
5747 | hw->flags |= | 5746 | hw->flags |= |
5748 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | | 5747 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index dd158ec571fb..11dc7df8bdf9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -84,15 +84,6 @@ static const struct ieee80211_iface_limit iwl_mvm_limits[] = { | |||
84 | .types = BIT(NL80211_IFTYPE_STATION) | | 84 | .types = BIT(NL80211_IFTYPE_STATION) | |
85 | BIT(NL80211_IFTYPE_AP), | 85 | BIT(NL80211_IFTYPE_AP), |
86 | }, | 86 | }, |
87 | { | ||
88 | .max = 1, | ||
89 | .types = BIT(NL80211_IFTYPE_P2P_CLIENT) | | ||
90 | BIT(NL80211_IFTYPE_P2P_GO), | ||
91 | }, | ||
92 | { | ||
93 | .max = 1, | ||
94 | .types = BIT(NL80211_IFTYPE_P2P_DEVICE), | ||
95 | }, | ||
96 | }; | 87 | }; |
97 | 88 | ||
98 | static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = { | 89 | static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = { |
@@ -161,10 +152,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
161 | hw->chanctx_data_size = sizeof(struct iwl_mvm_phy_ctxt); | 152 | hw->chanctx_data_size = sizeof(struct iwl_mvm_phy_ctxt); |
162 | 153 | ||
163 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 154 | hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
164 | BIT(NL80211_IFTYPE_P2P_CLIENT) | | 155 | BIT(NL80211_IFTYPE_AP); |
165 | BIT(NL80211_IFTYPE_AP) | | ||
166 | BIT(NL80211_IFTYPE_P2P_GO) | | ||
167 | BIT(NL80211_IFTYPE_P2P_DEVICE); | ||
168 | 156 | ||
169 | hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY | | 157 | hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY | |
170 | WIPHY_FLAG_DISABLE_BEACON_HINTS | | 158 | WIPHY_FLAG_DISABLE_BEACON_HINTS | |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index b878a32e7a98..69bbf6fdd2d3 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -1723,11 +1723,11 @@ static void mac80211_hwsim_free(void) | |||
1723 | class_destroy(hwsim_class); | 1723 | class_destroy(hwsim_class); |
1724 | } | 1724 | } |
1725 | 1725 | ||
1726 | 1726 | static struct platform_driver mac80211_hwsim_driver = { | |
1727 | static struct device_driver mac80211_hwsim_driver = { | 1727 | .driver = { |
1728 | .name = "mac80211_hwsim", | 1728 | .name = "mac80211_hwsim", |
1729 | .bus = &platform_bus_type, | 1729 | .owner = THIS_MODULE, |
1730 | .owner = THIS_MODULE, | 1730 | }, |
1731 | }; | 1731 | }; |
1732 | 1732 | ||
1733 | static const struct net_device_ops hwsim_netdev_ops = { | 1733 | static const struct net_device_ops hwsim_netdev_ops = { |
@@ -2169,7 +2169,6 @@ static const struct ieee80211_iface_limit hwsim_if_limits[] = { | |||
2169 | #endif | 2169 | #endif |
2170 | BIT(NL80211_IFTYPE_AP) | | 2170 | BIT(NL80211_IFTYPE_AP) | |
2171 | BIT(NL80211_IFTYPE_P2P_GO) }, | 2171 | BIT(NL80211_IFTYPE_P2P_GO) }, |
2172 | { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_DEVICE) }, | ||
2173 | }; | 2172 | }; |
2174 | 2173 | ||
2175 | static struct ieee80211_iface_combination hwsim_if_comb = { | 2174 | static struct ieee80211_iface_combination hwsim_if_comb = { |
@@ -2219,7 +2218,7 @@ static int __init init_mac80211_hwsim(void) | |||
2219 | spin_lock_init(&hwsim_radio_lock); | 2218 | spin_lock_init(&hwsim_radio_lock); |
2220 | INIT_LIST_HEAD(&hwsim_radios); | 2219 | INIT_LIST_HEAD(&hwsim_radios); |
2221 | 2220 | ||
2222 | err = driver_register(&mac80211_hwsim_driver); | 2221 | err = platform_driver_register(&mac80211_hwsim_driver); |
2223 | if (err) | 2222 | if (err) |
2224 | return err; | 2223 | return err; |
2225 | 2224 | ||
@@ -2254,7 +2253,7 @@ static int __init init_mac80211_hwsim(void) | |||
2254 | err = -ENOMEM; | 2253 | err = -ENOMEM; |
2255 | goto failed_drvdata; | 2254 | goto failed_drvdata; |
2256 | } | 2255 | } |
2257 | data->dev->driver = &mac80211_hwsim_driver; | 2256 | data->dev->driver = &mac80211_hwsim_driver.driver; |
2258 | err = device_bind_driver(data->dev); | 2257 | err = device_bind_driver(data->dev); |
2259 | if (err != 0) { | 2258 | if (err != 0) { |
2260 | printk(KERN_DEBUG | 2259 | printk(KERN_DEBUG |
@@ -2295,8 +2294,7 @@ static int __init init_mac80211_hwsim(void) | |||
2295 | BIT(NL80211_IFTYPE_P2P_CLIENT) | | 2294 | BIT(NL80211_IFTYPE_P2P_CLIENT) | |
2296 | BIT(NL80211_IFTYPE_P2P_GO) | | 2295 | BIT(NL80211_IFTYPE_P2P_GO) | |
2297 | BIT(NL80211_IFTYPE_ADHOC) | | 2296 | BIT(NL80211_IFTYPE_ADHOC) | |
2298 | BIT(NL80211_IFTYPE_MESH_POINT) | | 2297 | BIT(NL80211_IFTYPE_MESH_POINT); |
2299 | BIT(NL80211_IFTYPE_P2P_DEVICE); | ||
2300 | 2298 | ||
2301 | hw->flags = IEEE80211_HW_MFP_CAPABLE | | 2299 | hw->flags = IEEE80211_HW_MFP_CAPABLE | |
2302 | IEEE80211_HW_SIGNAL_DBM | | 2300 | IEEE80211_HW_SIGNAL_DBM | |
@@ -2564,7 +2562,7 @@ failed_drvdata: | |||
2564 | failed: | 2562 | failed: |
2565 | mac80211_hwsim_free(); | 2563 | mac80211_hwsim_free(); |
2566 | failed_unregister_driver: | 2564 | failed_unregister_driver: |
2567 | driver_unregister(&mac80211_hwsim_driver); | 2565 | platform_driver_unregister(&mac80211_hwsim_driver); |
2568 | return err; | 2566 | return err; |
2569 | } | 2567 | } |
2570 | module_init(init_mac80211_hwsim); | 2568 | module_init(init_mac80211_hwsim); |
@@ -2577,6 +2575,6 @@ static void __exit exit_mac80211_hwsim(void) | |||
2577 | 2575 | ||
2578 | mac80211_hwsim_free(); | 2576 | mac80211_hwsim_free(); |
2579 | unregister_netdev(hwsim_mon); | 2577 | unregister_netdev(hwsim_mon); |
2580 | driver_unregister(&mac80211_hwsim_driver); | 2578 | platform_driver_unregister(&mac80211_hwsim_driver); |
2581 | } | 2579 | } |
2582 | module_exit(exit_mac80211_hwsim); | 2580 | module_exit(exit_mac80211_hwsim); |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index d3c8ece980d8..e42b266a023a 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -2234,9 +2234,6 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) | |||
2234 | if (wdev->netdev->reg_state == NETREG_REGISTERED) | 2234 | if (wdev->netdev->reg_state == NETREG_REGISTERED) |
2235 | unregister_netdevice(wdev->netdev); | 2235 | unregister_netdevice(wdev->netdev); |
2236 | 2236 | ||
2237 | if (wdev->netdev->reg_state == NETREG_UNREGISTERED) | ||
2238 | free_netdev(wdev->netdev); | ||
2239 | |||
2240 | /* Clear the priv in adapter */ | 2237 | /* Clear the priv in adapter */ |
2241 | priv->netdev = NULL; | 2238 | priv->netdev = NULL; |
2242 | 2239 | ||
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index 74db0d24a579..26755d9acb55 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c | |||
@@ -1191,6 +1191,7 @@ mwifiex_process_hs_config(struct mwifiex_adapter *adapter) | |||
1191 | adapter->if_ops.wakeup(adapter); | 1191 | adapter->if_ops.wakeup(adapter); |
1192 | adapter->hs_activated = false; | 1192 | adapter->hs_activated = false; |
1193 | adapter->is_hs_configured = false; | 1193 | adapter->is_hs_configured = false; |
1194 | adapter->is_suspended = false; | ||
1194 | mwifiex_hs_activated_event(mwifiex_get_priv(adapter, | 1195 | mwifiex_hs_activated_event(mwifiex_get_priv(adapter, |
1195 | MWIFIEX_BSS_ROLE_ANY), | 1196 | MWIFIEX_BSS_ROLE_ANY), |
1196 | false); | 1197 | false); |
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 121443a0f2a1..2eb88ea9acf7 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -655,6 +655,7 @@ void mwifiex_init_priv_params(struct mwifiex_private *priv, | |||
655 | struct net_device *dev) | 655 | struct net_device *dev) |
656 | { | 656 | { |
657 | dev->netdev_ops = &mwifiex_netdev_ops; | 657 | dev->netdev_ops = &mwifiex_netdev_ops; |
658 | dev->destructor = free_netdev; | ||
658 | /* Initialize private structure */ | 659 | /* Initialize private structure */ |
659 | priv->current_key_index = 0; | 660 | priv->current_key_index = 0; |
660 | priv->media_connected = false; | 661 | priv->media_connected = false; |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 311d0b26b81c..1a8a19dbd635 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -96,7 +96,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, | |||
96 | } else { | 96 | } else { |
97 | /* Multicast */ | 97 | /* Multicast */ |
98 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; | 98 | priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; |
99 | if (mcast_list->mode == MWIFIEX_MULTICAST_MODE) { | 99 | if (mcast_list->mode == MWIFIEX_ALL_MULTI_MODE) { |
100 | dev_dbg(priv->adapter->dev, | 100 | dev_dbg(priv->adapter->dev, |
101 | "info: Enabling All Multicast!\n"); | 101 | "info: Enabling All Multicast!\n"); |
102 | priv->curr_pkt_filter |= | 102 | priv->curr_pkt_filter |= |
@@ -108,20 +108,11 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, | |||
108 | dev_dbg(priv->adapter->dev, | 108 | dev_dbg(priv->adapter->dev, |
109 | "info: Set multicast list=%d\n", | 109 | "info: Set multicast list=%d\n", |
110 | mcast_list->num_multicast_addr); | 110 | mcast_list->num_multicast_addr); |
111 | /* Set multicast addresses to firmware */ | 111 | /* Send multicast addresses to firmware */ |
112 | if (old_pkt_filter == priv->curr_pkt_filter) { | 112 | ret = mwifiex_send_cmd_async(priv, |
113 | /* Send request to firmware */ | 113 | HostCmd_CMD_MAC_MULTICAST_ADR, |
114 | ret = mwifiex_send_cmd_async(priv, | 114 | HostCmd_ACT_GEN_SET, 0, |
115 | HostCmd_CMD_MAC_MULTICAST_ADR, | 115 | mcast_list); |
116 | HostCmd_ACT_GEN_SET, 0, | ||
117 | mcast_list); | ||
118 | } else { | ||
119 | /* Send request to firmware */ | ||
120 | ret = mwifiex_send_cmd_async(priv, | ||
121 | HostCmd_CMD_MAC_MULTICAST_ADR, | ||
122 | HostCmd_ACT_GEN_SET, 0, | ||
123 | mcast_list); | ||
124 | } | ||
125 | } | 116 | } |
126 | } | 117 | } |
127 | } | 118 | } |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index c9e6fb7417f6..1f0014bd4d87 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -3053,7 +3053,8 @@ void ieee80211_napi_complete(struct ieee80211_hw *hw); | |||
3053 | * This function may not be called in IRQ context. Calls to this function | 3053 | * This function may not be called in IRQ context. Calls to this function |
3054 | * for a single hardware must be synchronized against each other. Calls to | 3054 | * for a single hardware must be synchronized against each other. Calls to |
3055 | * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be | 3055 | * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be |
3056 | * mixed for a single hardware. | 3056 | * mixed for a single hardware. Must not run concurrently with |
3057 | * ieee80211_tx_status() or ieee80211_tx_status_ni(). | ||
3057 | * | 3058 | * |
3058 | * In process context use instead ieee80211_rx_ni(). | 3059 | * In process context use instead ieee80211_rx_ni(). |
3059 | * | 3060 | * |
@@ -3069,7 +3070,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
3069 | * (internally defers to a tasklet.) | 3070 | * (internally defers to a tasklet.) |
3070 | * | 3071 | * |
3071 | * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not | 3072 | * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not |
3072 | * be mixed for a single hardware. | 3073 | * be mixed for a single hardware.Must not run concurrently with |
3074 | * ieee80211_tx_status() or ieee80211_tx_status_ni(). | ||
3073 | * | 3075 | * |
3074 | * @hw: the hardware this frame came in on | 3076 | * @hw: the hardware this frame came in on |
3075 | * @skb: the buffer to receive, owned by mac80211 after this call | 3077 | * @skb: the buffer to receive, owned by mac80211 after this call |
@@ -3083,7 +3085,8 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
3083 | * (internally disables bottom halves). | 3085 | * (internally disables bottom halves). |
3084 | * | 3086 | * |
3085 | * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may | 3087 | * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may |
3086 | * not be mixed for a single hardware. | 3088 | * not be mixed for a single hardware. Must not run concurrently with |
3089 | * ieee80211_tx_status() or ieee80211_tx_status_ni(). | ||
3087 | * | 3090 | * |
3088 | * @hw: the hardware this frame came in on | 3091 | * @hw: the hardware this frame came in on |
3089 | * @skb: the buffer to receive, owned by mac80211 after this call | 3092 | * @skb: the buffer to receive, owned by mac80211 after this call |
@@ -3206,7 +3209,8 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif, | |||
3206 | * This function may not be called in IRQ context. Calls to this function | 3209 | * This function may not be called in IRQ context. Calls to this function |
3207 | * for a single hardware must be synchronized against each other. Calls | 3210 | * for a single hardware must be synchronized against each other. Calls |
3208 | * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() | 3211 | * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() |
3209 | * may not be mixed for a single hardware. | 3212 | * may not be mixed for a single hardware. Must not run concurrently with |
3213 | * ieee80211_rx() or ieee80211_rx_ni(). | ||
3210 | * | 3214 | * |
3211 | * @hw: the hardware the frame was transmitted by | 3215 | * @hw: the hardware the frame was transmitted by |
3212 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 3216 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index b7cbd4ebf0e0..ba3cd284d104 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1267,6 +1267,7 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); | |||
1267 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); | 1267 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); |
1268 | void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata, | 1268 | void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata, |
1269 | __le16 fc, bool acked); | 1269 | __le16 fc, bool acked); |
1270 | void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata); | ||
1270 | 1271 | ||
1271 | /* IBSS code */ | 1272 | /* IBSS code */ |
1272 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); | 1273 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 60f1ce5e5e52..ceef64426a8d 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -474,6 +474,9 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) | |||
474 | master->control_port_protocol; | 474 | master->control_port_protocol; |
475 | sdata->control_port_no_encrypt = | 475 | sdata->control_port_no_encrypt = |
476 | master->control_port_no_encrypt; | 476 | master->control_port_no_encrypt; |
477 | sdata->vif.cab_queue = master->vif.cab_queue; | ||
478 | memcpy(sdata->vif.hw_queue, master->vif.hw_queue, | ||
479 | sizeof(sdata->vif.hw_queue)); | ||
477 | break; | 480 | break; |
478 | } | 481 | } |
479 | case NL80211_IFTYPE_AP: | 482 | case NL80211_IFTYPE_AP: |
@@ -653,7 +656,11 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) | |||
653 | 656 | ||
654 | ieee80211_recalc_ps(local, -1); | 657 | ieee80211_recalc_ps(local, -1); |
655 | 658 | ||
656 | if (dev) { | 659 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR || |
660 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { | ||
661 | /* XXX: for AP_VLAN, actually track AP queues */ | ||
662 | netif_tx_start_all_queues(dev); | ||
663 | } else if (dev) { | ||
657 | unsigned long flags; | 664 | unsigned long flags; |
658 | int n_acs = IEEE80211_NUM_ACS; | 665 | int n_acs = IEEE80211_NUM_ACS; |
659 | int ac; | 666 | int ac; |
@@ -1696,6 +1703,15 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) | |||
1696 | 1703 | ||
1697 | ASSERT_RTNL(); | 1704 | ASSERT_RTNL(); |
1698 | 1705 | ||
1706 | /* | ||
1707 | * Close all AP_VLAN interfaces first, as otherwise they | ||
1708 | * might be closed while the AP interface they belong to | ||
1709 | * is closed, causing unregister_netdevice_many() to crash. | ||
1710 | */ | ||
1711 | list_for_each_entry(sdata, &local->interfaces, list) | ||
1712 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | ||
1713 | dev_close(sdata->dev); | ||
1714 | |||
1699 | mutex_lock(&local->iflist_mtx); | 1715 | mutex_lock(&local->iflist_mtx); |
1700 | list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) { | 1716 | list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) { |
1701 | list_del(&sdata->list); | 1717 | list_del(&sdata->list); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ef378b9a32ec..1da3d6be8e11 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3325,10 +3325,6 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
3325 | if (WARN_ON_ONCE(!auth_data)) | 3325 | if (WARN_ON_ONCE(!auth_data)) |
3326 | return -EINVAL; | 3326 | return -EINVAL; |
3327 | 3327 | ||
3328 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | ||
3329 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | | ||
3330 | IEEE80211_TX_INTFL_MLME_CONN_TX; | ||
3331 | |||
3332 | auth_data->tries++; | 3328 | auth_data->tries++; |
3333 | 3329 | ||
3334 | if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { | 3330 | if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { |
@@ -3362,6 +3358,10 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
3362 | auth_data->expected_transaction = trans; | 3358 | auth_data->expected_transaction = trans; |
3363 | } | 3359 | } |
3364 | 3360 | ||
3361 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | ||
3362 | tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS | | ||
3363 | IEEE80211_TX_INTFL_MLME_CONN_TX; | ||
3364 | |||
3365 | ieee80211_send_auth(sdata, trans, auth_data->algorithm, status, | 3365 | ieee80211_send_auth(sdata, trans, auth_data->algorithm, status, |
3366 | auth_data->data, auth_data->data_len, | 3366 | auth_data->data, auth_data->data_len, |
3367 | auth_data->bss->bssid, | 3367 | auth_data->bss->bssid, |
@@ -3385,12 +3385,12 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata) | |||
3385 | * will not answer to direct packet in unassociated state. | 3385 | * will not answer to direct packet in unassociated state. |
3386 | */ | 3386 | */ |
3387 | ieee80211_send_probe_req(sdata, NULL, ssidie + 2, ssidie[1], | 3387 | ieee80211_send_probe_req(sdata, NULL, ssidie + 2, ssidie[1], |
3388 | NULL, 0, (u32) -1, true, tx_flags, | 3388 | NULL, 0, (u32) -1, true, 0, |
3389 | auth_data->bss->channel, false); | 3389 | auth_data->bss->channel, false); |
3390 | rcu_read_unlock(); | 3390 | rcu_read_unlock(); |
3391 | } | 3391 | } |
3392 | 3392 | ||
3393 | if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { | 3393 | if (tx_flags == 0) { |
3394 | auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; | 3394 | auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; |
3395 | ifmgd->auth_data->timeout_started = true; | 3395 | ifmgd->auth_data->timeout_started = true; |
3396 | run_again(ifmgd, auth_data->timeout); | 3396 | run_again(ifmgd, auth_data->timeout); |
@@ -3643,6 +3643,31 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) | |||
3643 | } | 3643 | } |
3644 | } | 3644 | } |
3645 | 3645 | ||
3646 | #ifdef CONFIG_PM | ||
3647 | void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) | ||
3648 | { | ||
3649 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
3650 | |||
3651 | mutex_lock(&ifmgd->mtx); | ||
3652 | if (!ifmgd->associated) { | ||
3653 | mutex_unlock(&ifmgd->mtx); | ||
3654 | return; | ||
3655 | } | ||
3656 | |||
3657 | if (sdata->flags & IEEE80211_SDATA_DISCONNECT_RESUME) { | ||
3658 | sdata->flags &= ~IEEE80211_SDATA_DISCONNECT_RESUME; | ||
3659 | mlme_dbg(sdata, "driver requested disconnect after resume\n"); | ||
3660 | ieee80211_sta_connection_lost(sdata, | ||
3661 | ifmgd->associated->bssid, | ||
3662 | WLAN_REASON_UNSPECIFIED, | ||
3663 | true); | ||
3664 | mutex_unlock(&ifmgd->mtx); | ||
3665 | return; | ||
3666 | } | ||
3667 | mutex_unlock(&ifmgd->mtx); | ||
3668 | } | ||
3669 | #endif | ||
3670 | |||
3646 | /* interface setup */ | 3671 | /* interface setup */ |
3647 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) | 3672 | void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) |
3648 | { | 3673 | { |
@@ -4349,7 +4374,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4349 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 4374 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
4350 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; | 4375 | u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; |
4351 | bool tx = !req->local_state_change; | 4376 | bool tx = !req->local_state_change; |
4352 | bool sent_frame = false; | 4377 | bool report_frame = false; |
4353 | 4378 | ||
4354 | mutex_lock(&ifmgd->mtx); | 4379 | mutex_lock(&ifmgd->mtx); |
4355 | 4380 | ||
@@ -4366,7 +4391,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4366 | ieee80211_destroy_auth_data(sdata, false); | 4391 | ieee80211_destroy_auth_data(sdata, false); |
4367 | mutex_unlock(&ifmgd->mtx); | 4392 | mutex_unlock(&ifmgd->mtx); |
4368 | 4393 | ||
4369 | sent_frame = tx; | 4394 | report_frame = true; |
4370 | goto out; | 4395 | goto out; |
4371 | } | 4396 | } |
4372 | 4397 | ||
@@ -4374,12 +4399,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
4374 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { | 4399 | ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { |
4375 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, | 4400 | ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, |
4376 | req->reason_code, tx, frame_buf); | 4401 | req->reason_code, tx, frame_buf); |
4377 | sent_frame = tx; | 4402 | report_frame = true; |
4378 | } | 4403 | } |
4379 | mutex_unlock(&ifmgd->mtx); | 4404 | mutex_unlock(&ifmgd->mtx); |
4380 | 4405 | ||
4381 | out: | 4406 | out: |
4382 | if (sent_frame) | 4407 | if (report_frame) |
4383 | __cfg80211_send_deauth(sdata->dev, frame_buf, | 4408 | __cfg80211_send_deauth(sdata->dev, frame_buf, |
4384 | IEEE80211_DEAUTH_FRAME_LEN); | 4409 | IEEE80211_DEAUTH_FRAME_LEN); |
4385 | 4410 | ||
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 0d51877efdb7..d3f414fe67e0 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -688,8 +688,15 @@ int rate_control_set_rates(struct ieee80211_hw *hw, | |||
688 | struct ieee80211_sta *pubsta, | 688 | struct ieee80211_sta *pubsta, |
689 | struct ieee80211_sta_rates *rates) | 689 | struct ieee80211_sta_rates *rates) |
690 | { | 690 | { |
691 | struct ieee80211_sta_rates *old = rcu_dereference(pubsta->rates); | 691 | struct ieee80211_sta_rates *old; |
692 | 692 | ||
693 | /* | ||
694 | * mac80211 guarantees that this function will not be called | ||
695 | * concurrently, so the following RCU access is safe, even without | ||
696 | * extra locking. This can not be checked easily, so we just set | ||
697 | * the condition to true. | ||
698 | */ | ||
699 | old = rcu_dereference_protected(pubsta->rates, true); | ||
693 | rcu_assign_pointer(pubsta->rates, rates); | 700 | rcu_assign_pointer(pubsta->rates, rates); |
694 | if (old) | 701 | if (old) |
695 | kfree_rcu(old, rcu_head); | 702 | kfree_rcu(old, rcu_head); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 7507f7cdd68c..bdd7b4a719e9 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -3054,6 +3054,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
3054 | * and location updates. Note that mac80211 | 3054 | * and location updates. Note that mac80211 |
3055 | * itself never looks at these frames. | 3055 | * itself never looks at these frames. |
3056 | */ | 3056 | */ |
3057 | if (!multicast && | ||
3058 | !ether_addr_equal(sdata->vif.addr, hdr->addr1)) | ||
3059 | return 0; | ||
3057 | if (ieee80211_is_public_action(hdr, skb->len)) | 3060 | if (ieee80211_is_public_action(hdr, skb->len)) |
3058 | return 1; | 3061 | return 1; |
3059 | if (!ieee80211_is_beacon(hdr->frame_control)) | 3062 | if (!ieee80211_is_beacon(hdr->frame_control)) |
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index 3ed801d90f1e..124b1fdc20d0 100644 --- a/net/mac80211/tkip.c +++ b/net/mac80211/tkip.c | |||
@@ -208,10 +208,10 @@ void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf, | |||
208 | u32 iv32 = get_unaligned_le32(&data[4]); | 208 | u32 iv32 = get_unaligned_le32(&data[4]); |
209 | u16 iv16 = data[2] | (data[0] << 8); | 209 | u16 iv16 = data[2] | (data[0] << 8); |
210 | 210 | ||
211 | spin_lock_bh(&key->u.tkip.txlock); | 211 | spin_lock(&key->u.tkip.txlock); |
212 | ieee80211_compute_tkip_p1k(key, iv32); | 212 | ieee80211_compute_tkip_p1k(key, iv32); |
213 | tkip_mixing_phase2(tk, ctx, iv16, p2k); | 213 | tkip_mixing_phase2(tk, ctx, iv16, p2k); |
214 | spin_unlock_bh(&key->u.tkip.txlock); | 214 | spin_unlock(&key->u.tkip.txlock); |
215 | } | 215 | } |
216 | EXPORT_SYMBOL(ieee80211_get_tkip_p2k); | 216 | EXPORT_SYMBOL(ieee80211_get_tkip_p2k); |
217 | 217 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 707953fd8324..ffdfe4bc89ad 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1714,6 +1714,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1714 | mb(); | 1714 | mb(); |
1715 | local->resuming = false; | 1715 | local->resuming = false; |
1716 | 1716 | ||
1717 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
1718 | if (!ieee80211_sdata_running(sdata)) | ||
1719 | continue; | ||
1720 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | ||
1721 | ieee80211_sta_restart(sdata); | ||
1722 | } | ||
1723 | |||
1717 | mod_timer(&local->sta_cleanup, jiffies + 1); | 1724 | mod_timer(&local->sta_cleanup, jiffies + 1); |
1718 | #else | 1725 | #else |
1719 | WARN_ON(1); | 1726 | WARN_ON(1); |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 68f0c96c0565..58e69d691601 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -639,17 +639,21 @@ int wiphy_register(struct wiphy *wiphy) | |||
639 | * cfg80211_mutex lock | 639 | * cfg80211_mutex lock |
640 | */ | 640 | */ |
641 | res = rfkill_register(rdev->rfkill); | 641 | res = rfkill_register(rdev->rfkill); |
642 | if (res) | 642 | if (res) { |
643 | goto out_rm_dev; | 643 | device_del(&rdev->wiphy.dev); |
644 | |||
645 | mutex_lock(&cfg80211_mutex); | ||
646 | debugfs_remove_recursive(rdev->wiphy.debugfsdir); | ||
647 | list_del_rcu(&rdev->list); | ||
648 | wiphy_regulatory_deregister(wiphy); | ||
649 | mutex_unlock(&cfg80211_mutex); | ||
650 | return res; | ||
651 | } | ||
644 | 652 | ||
645 | rtnl_lock(); | 653 | rtnl_lock(); |
646 | rdev->wiphy.registered = true; | 654 | rdev->wiphy.registered = true; |
647 | rtnl_unlock(); | 655 | rtnl_unlock(); |
648 | return 0; | 656 | return 0; |
649 | |||
650 | out_rm_dev: | ||
651 | device_del(&rdev->wiphy.dev); | ||
652 | return res; | ||
653 | } | 657 | } |
654 | EXPORT_SYMBOL(wiphy_register); | 658 | EXPORT_SYMBOL(wiphy_register); |
655 | 659 | ||
@@ -867,7 +871,6 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev, | |||
867 | #endif | 871 | #endif |
868 | __cfg80211_disconnect(rdev, dev, | 872 | __cfg80211_disconnect(rdev, dev, |
869 | WLAN_REASON_DEAUTH_LEAVING, true); | 873 | WLAN_REASON_DEAUTH_LEAVING, true); |
870 | cfg80211_mlme_down(rdev, dev); | ||
871 | wdev_unlock(wdev); | 874 | wdev_unlock(wdev); |
872 | break; | 875 | break; |
873 | case NL80211_IFTYPE_MESH_POINT: | 876 | case NL80211_IFTYPE_MESH_POINT: |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 14276af7964b..5bcf3a5b6465 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3438,7 +3438,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq, | |||
3438 | (u32)sinfo->rx_bytes)) | 3438 | (u32)sinfo->rx_bytes)) |
3439 | goto nla_put_failure; | 3439 | goto nla_put_failure; |
3440 | if ((sinfo->filled & (STATION_INFO_TX_BYTES | | 3440 | if ((sinfo->filled & (STATION_INFO_TX_BYTES | |
3441 | NL80211_STA_INFO_TX_BYTES64)) && | 3441 | STATION_INFO_TX_BYTES64)) && |
3442 | nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES, | 3442 | nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES, |
3443 | (u32)sinfo->tx_bytes)) | 3443 | (u32)sinfo->tx_bytes)) |
3444 | goto nla_put_failure; | 3444 | goto nla_put_failure; |
@@ -7630,6 +7630,8 @@ static int nl80211_send_wowlan_tcp(struct sk_buff *msg, | |||
7630 | &tcp->payload_tok)) | 7630 | &tcp->payload_tok)) |
7631 | return -ENOBUFS; | 7631 | return -ENOBUFS; |
7632 | 7632 | ||
7633 | nla_nest_end(msg, nl_tcp); | ||
7634 | |||
7633 | return 0; | 7635 | return 0; |
7634 | } | 7636 | } |
7635 | 7637 | ||
@@ -10023,6 +10025,7 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, | |||
10023 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 10025 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
10024 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 10026 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
10025 | netdev->ifindex)) || | 10027 | netdev->ifindex)) || |
10028 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | ||
10026 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || | 10029 | nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) || |
10027 | (sig_dbm && | 10030 | (sig_dbm && |
10028 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || | 10031 | nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) || |
@@ -10063,6 +10066,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, | |||
10063 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || | 10066 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
10064 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, | 10067 | (netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX, |
10065 | netdev->ifindex)) || | 10068 | netdev->ifindex)) || |
10069 | nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) || | ||
10066 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || | 10070 | nla_put(msg, NL80211_ATTR_FRAME, len, buf) || |
10067 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || | 10071 | nla_put_u64(msg, NL80211_ATTR_COOKIE, cookie) || |
10068 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) | 10072 | (ack && nla_put_flag(msg, NL80211_ATTR_ACK))) |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index a9dc5c736df0..3ed35c345cae 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -231,6 +231,9 @@ void cfg80211_conn_work(struct work_struct *work) | |||
231 | mutex_lock(&rdev->sched_scan_mtx); | 231 | mutex_lock(&rdev->sched_scan_mtx); |
232 | 232 | ||
233 | list_for_each_entry(wdev, &rdev->wdev_list, list) { | 233 | list_for_each_entry(wdev, &rdev->wdev_list, list) { |
234 | if (!wdev->netdev) | ||
235 | continue; | ||
236 | |||
234 | wdev_lock(wdev); | 237 | wdev_lock(wdev); |
235 | if (!netif_running(wdev->netdev)) { | 238 | if (!netif_running(wdev->netdev)) { |
236 | wdev_unlock(wdev); | 239 | wdev_unlock(wdev); |
@@ -961,7 +964,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev, | |||
961 | /* was it connected by userspace SME? */ | 964 | /* was it connected by userspace SME? */ |
962 | if (!wdev->conn) { | 965 | if (!wdev->conn) { |
963 | cfg80211_mlme_down(rdev, dev); | 966 | cfg80211_mlme_down(rdev, dev); |
964 | return 0; | 967 | goto disconnect; |
965 | } | 968 | } |
966 | 969 | ||
967 | if (wdev->sme_state == CFG80211_SME_CONNECTING && | 970 | if (wdev->sme_state == CFG80211_SME_CONNECTING && |
@@ -987,6 +990,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev, | |||
987 | return err; | 990 | return err; |
988 | } | 991 | } |
989 | 992 | ||
993 | disconnect: | ||
990 | if (wdev->sme_state == CFG80211_SME_CONNECTED) | 994 | if (wdev->sme_state == CFG80211_SME_CONNECTED) |
991 | __cfg80211_disconnected(dev, NULL, 0, 0, false); | 995 | __cfg80211_disconnected(dev, NULL, 0, 0, false); |
992 | else if (wdev->sme_state == CFG80211_SME_CONNECTING) | 996 | else if (wdev->sme_state == CFG80211_SME_CONNECTING) |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index ecd4fcec3c94..5755bc14abbd 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
@@ -2441,6 +2441,7 @@ TRACE_EVENT(cfg80211_report_wowlan_wakeup, | |||
2441 | TP_STRUCT__entry( | 2441 | TP_STRUCT__entry( |
2442 | WIPHY_ENTRY | 2442 | WIPHY_ENTRY |
2443 | WDEV_ENTRY | 2443 | WDEV_ENTRY |
2444 | __field(bool, non_wireless) | ||
2444 | __field(bool, disconnect) | 2445 | __field(bool, disconnect) |
2445 | __field(bool, magic_pkt) | 2446 | __field(bool, magic_pkt) |
2446 | __field(bool, gtk_rekey_failure) | 2447 | __field(bool, gtk_rekey_failure) |
@@ -2449,20 +2450,22 @@ TRACE_EVENT(cfg80211_report_wowlan_wakeup, | |||
2449 | __field(bool, rfkill_release) | 2450 | __field(bool, rfkill_release) |
2450 | __field(s32, pattern_idx) | 2451 | __field(s32, pattern_idx) |
2451 | __field(u32, packet_len) | 2452 | __field(u32, packet_len) |
2452 | __dynamic_array(u8, packet, wakeup->packet_present_len) | 2453 | __dynamic_array(u8, packet, |
2454 | wakeup ? wakeup->packet_present_len : 0) | ||
2453 | ), | 2455 | ), |
2454 | TP_fast_assign( | 2456 | TP_fast_assign( |
2455 | WIPHY_ASSIGN; | 2457 | WIPHY_ASSIGN; |
2456 | WDEV_ASSIGN; | 2458 | WDEV_ASSIGN; |
2457 | __entry->disconnect = wakeup->disconnect; | 2459 | __entry->non_wireless = !wakeup; |
2458 | __entry->magic_pkt = wakeup->magic_pkt; | 2460 | __entry->disconnect = wakeup ? wakeup->disconnect : false; |
2459 | __entry->gtk_rekey_failure = wakeup->gtk_rekey_failure; | 2461 | __entry->magic_pkt = wakeup ? wakeup->magic_pkt : false; |
2460 | __entry->eap_identity_req = wakeup->eap_identity_req; | 2462 | __entry->gtk_rekey_failure = wakeup ? wakeup->gtk_rekey_failure : false; |
2461 | __entry->four_way_handshake = wakeup->four_way_handshake; | 2463 | __entry->eap_identity_req = wakeup ? wakeup->eap_identity_req : false; |
2462 | __entry->rfkill_release = wakeup->rfkill_release; | 2464 | __entry->four_way_handshake = wakeup ? wakeup->four_way_handshake : false; |
2463 | __entry->pattern_idx = wakeup->pattern_idx; | 2465 | __entry->rfkill_release = wakeup ? wakeup->rfkill_release : false; |
2464 | __entry->packet_len = wakeup->packet_len; | 2466 | __entry->pattern_idx = wakeup ? wakeup->pattern_idx : false; |
2465 | if (wakeup->packet && wakeup->packet_present_len) | 2467 | __entry->packet_len = wakeup ? wakeup->packet_len : false; |
2468 | if (wakeup && wakeup->packet && wakeup->packet_present_len) | ||
2466 | memcpy(__get_dynamic_array(packet), wakeup->packet, | 2469 | memcpy(__get_dynamic_array(packet), wakeup->packet, |
2467 | wakeup->packet_present_len); | 2470 | wakeup->packet_present_len); |
2468 | ), | 2471 | ), |