Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+104 -35
+5 -1
drivers/bluetooth/btusb.c
··· 71 /* Apple MacBookAir3,1, MacBookAir3,2 */ 72 { USB_DEVICE(0x05ac, 0x821b) }, 73 74 /* AVM BlueFRITZ! USB v2.0 */ 75 { USB_DEVICE(0x057c, 0x3800) }, 76 ··· 693 break; 694 695 case HCI_ACLDATA_PKT: 696 - if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1) 697 return -ENODEV; 698 699 urb = usb_alloc_urb(0, GFP_ATOMIC);
··· 71 /* Apple MacBookAir3,1, MacBookAir3,2 */ 72 { USB_DEVICE(0x05ac, 0x821b) }, 73 74 + /* Apple MacBookPro8,2 */ 75 + { USB_DEVICE(0x05ac, 0x821a) }, 76 + 77 /* AVM BlueFRITZ! USB v2.0 */ 78 { USB_DEVICE(0x057c, 0x3800) }, 79 ··· 690 break; 691 692 case HCI_ACLDATA_PKT: 693 + if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 && 694 + hdev->conn_hash.le_num < 1)) 695 return -ENODEV; 696 697 urb = usb_alloc_urb(0, GFP_ATOMIC);
+4
drivers/net/wireless/ath/ath9k/main.c
··· 1048 "Starting driver with initial channel: %d MHz\n", 1049 curchan->center_freq); 1050 1051 mutex_lock(&sc->mutex); 1052 1053 /* setup initial channel */ ··· 1144 1145 mutex_unlock: 1146 mutex_unlock(&sc->mutex); 1147 1148 return r; 1149 }
··· 1048 "Starting driver with initial channel: %d MHz\n", 1049 curchan->center_freq); 1050 1051 + ath9k_ps_wakeup(sc); 1052 + 1053 mutex_lock(&sc->mutex); 1054 1055 /* setup initial channel */ ··· 1142 1143 mutex_unlock: 1144 mutex_unlock(&sc->mutex); 1145 + 1146 + ath9k_ps_restore(sc); 1147 1148 return r; 1149 }
+1
drivers/net/wireless/ath/carl9170/carl9170.h
··· 443 u8 ampdu_len; 444 u8 ampdu_ack_len; 445 bool clear; 446 }; 447 448 struct carl9170_sta_info {
··· 443 u8 ampdu_len; 444 u8 ampdu_ack_len; 445 bool clear; 446 + bool req; 447 }; 448 449 struct carl9170_sta_info {
+1
drivers/net/wireless/ath/carl9170/main.c
··· 1355 tid_info = rcu_dereference(sta_info->agg[tid]); 1356 1357 sta_info->stats[tid].clear = true; 1358 1359 if (tid_info) { 1360 bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE);
··· 1355 tid_info = rcu_dereference(sta_info->agg[tid]); 1356 1357 sta_info->stats[tid].clear = true; 1358 + sta_info->stats[tid].req = false; 1359 1360 if (tid_info) { 1361 bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE);
+7
drivers/net/wireless/ath/carl9170/tx.c
··· 383 384 if (sta_info->stats[tid].clear) { 385 sta_info->stats[tid].clear = false; 386 sta_info->stats[tid].ampdu_len = 0; 387 sta_info->stats[tid].ampdu_ack_len = 0; 388 } ··· 392 if (txinfo->status.rates[0].count == 1) 393 sta_info->stats[tid].ampdu_ack_len++; 394 395 if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { 396 super->s.rix = sta_info->stats[tid].ampdu_len; 397 super->s.cnt = sta_info->stats[tid].ampdu_ack_len; 398 txinfo->flags |= IEEE80211_TX_STAT_AMPDU; 399 sta_info->stats[tid].clear = true; 400 } 401 spin_unlock_bh(&tid_info->lock);
··· 383 384 if (sta_info->stats[tid].clear) { 385 sta_info->stats[tid].clear = false; 386 + sta_info->stats[tid].req = false; 387 sta_info->stats[tid].ampdu_len = 0; 388 sta_info->stats[tid].ampdu_ack_len = 0; 389 } ··· 391 if (txinfo->status.rates[0].count == 1) 392 sta_info->stats[tid].ampdu_ack_len++; 393 394 + if (!(txinfo->flags & IEEE80211_TX_STAT_ACK)) 395 + sta_info->stats[tid].req = true; 396 + 397 if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { 398 super->s.rix = sta_info->stats[tid].ampdu_len; 399 super->s.cnt = sta_info->stats[tid].ampdu_ack_len; 400 txinfo->flags |= IEEE80211_TX_STAT_AMPDU; 401 + if (sta_info->stats[tid].req) 402 + txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; 403 + 404 sta_info->stats[tid].clear = true; 405 } 406 spin_unlock_bh(&tid_info->lock);
+10
drivers/net/wireless/iwlegacy/iwl-core.c
··· 1805 1806 mutex_lock(&priv->mutex); 1807 1808 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; 1809 1810 if (!(interface_modes & BIT(newtype))) { ··· 1841 /* success */ 1842 iwl_legacy_teardown_interface(priv, vif, true); 1843 vif->type = newtype; 1844 err = iwl_legacy_setup_interface(priv, ctx); 1845 WARN_ON(err); 1846 /*
··· 1805 1806 mutex_lock(&priv->mutex); 1807 1808 + if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) { 1809 + /* 1810 + * Huh? But wait ... this can maybe happen when 1811 + * we're in the middle of a firmware restart! 1812 + */ 1813 + err = -EBUSY; 1814 + goto out; 1815 + } 1816 + 1817 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; 1818 1819 if (!(interface_modes & BIT(newtype))) { ··· 1832 /* success */ 1833 iwl_legacy_teardown_interface(priv, vif, true); 1834 vif->type = newtype; 1835 + vif->p2p = newp2p; 1836 err = iwl_legacy_setup_interface(priv, ctx); 1837 WARN_ON(err); 1838 /*
+3 -4
drivers/net/wireless/iwlegacy/iwl3945-base.c
··· 93 struct iwl_mod_params iwl3945_mod_params = { 94 .sw_crypto = 1, 95 .restart_fw = 1, 96 /* the rest are 0 by default */ 97 }; 98 ··· 3961 * "the hard way", rather than using device's scan. 3962 */ 3963 if (iwl3945_mod_params.disable_hw_scan) { 3964 - dev_printk(KERN_DEBUG, &(pdev->dev), 3965 - "sw scan support is deprecated\n"); 3966 iwl3945_hw_ops.hw_scan = NULL; 3967 } 3968 ··· 4280 "using software crypto (default 1 [software])"); 4281 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, 4282 int, S_IRUGO); 4283 - MODULE_PARM_DESC(disable_hw_scan, 4284 - "disable hardware scanning (default 0) (deprecated)"); 4285 #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG 4286 module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); 4287 MODULE_PARM_DESC(debug, "debug output mask");
··· 93 struct iwl_mod_params iwl3945_mod_params = { 94 .sw_crypto = 1, 95 .restart_fw = 1, 96 + .disable_hw_scan = 1, 97 /* the rest are 0 by default */ 98 }; 99 ··· 3960 * "the hard way", rather than using device's scan. 3961 */ 3962 if (iwl3945_mod_params.disable_hw_scan) { 3963 + IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); 3964 iwl3945_hw_ops.hw_scan = NULL; 3965 } 3966 ··· 4280 "using software crypto (default 1 [software])"); 4281 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, 4282 int, S_IRUGO); 4283 + MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); 4284 #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG 4285 module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); 4286 MODULE_PARM_DESC(debug, "debug output mask");
+7 -3
drivers/net/wireless/rt2x00/rt2800usb.c
··· 730 { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, 731 { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, 732 { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, 733 /* Buffalo */ 734 { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, 735 /* Conceptronic */ 736 { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, 737 { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 822 /* Pegatron */ 823 { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, 824 { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, 825 /* Philips */ 826 { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, 827 /* Planex */ ··· 904 { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, 905 /* Sitecom */ 906 { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, 907 /* Zinwell */ 908 { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, 909 #endif ··· 968 { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, 969 { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, 970 { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, 971 - { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, 972 /* Planex */ 973 { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, 974 { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 981 /* Sweex */ 982 { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, 983 { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, 984 - /* Toshiba */ 985 - { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, 986 /* Zyxel */ 987 { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, 988 #endif
··· 730 { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, 731 { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, 732 { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, 733 + { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) }, 734 + { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) }, 735 + { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) }, 736 /* Buffalo */ 737 { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, 738 + { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) }, 739 /* Conceptronic */ 740 { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, 741 { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 818 /* Pegatron */ 819 { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, 820 { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, 821 + { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, 822 /* Philips */ 823 { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, 824 /* Planex */ ··· 899 { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, 900 /* Sitecom */ 901 { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, 902 + /* Toshiba */ 903 + { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, 904 /* Zinwell */ 905 { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, 906 #endif ··· 961 { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, 962 { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, 963 { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, 964 /* Planex */ 965 { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, 966 { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 975 /* Sweex */ 976 { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, 977 { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, 978 /* Zyxel */ 979 { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, 980 #endif
+2
include/net/bluetooth/hci.h
··· 84 HCI_SERVICE_CACHE, 85 HCI_LINK_KEYS, 86 HCI_DEBUG_KEYS, 87 }; 88 89 /* HCI ioctl defines */
··· 84 HCI_SERVICE_CACHE, 85 HCI_LINK_KEYS, 86 HCI_DEBUG_KEYS, 87 + 88 + HCI_RESET, 89 }; 90 91 /* HCI ioctl defines */
+8 -2
net/bluetooth/hci_core.c
··· 186 BT_DBG("%s %ld", hdev->name, opt); 187 188 /* Reset device */ 189 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 190 } 191 ··· 214 /* Mandatory initialization */ 215 216 /* Reset */ 217 - if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) 218 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 219 220 /* Read Local Supported Features */ 221 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); ··· 587 hci_req_cancel(hdev, ENODEV); 588 hci_req_lock(hdev); 589 590 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 591 hci_req_unlock(hdev); 592 return 0; ··· 629 630 /* Drop last sent command */ 631 if (hdev->sent_cmd) { 632 - del_timer_sync(&hdev->cmd_timer); 633 kfree_skb(hdev->sent_cmd); 634 hdev->sent_cmd = NULL; 635 } ··· 1079 1080 BT_ERR("%s command tx timeout", hdev->name); 1081 atomic_set(&hdev->cmd_cnt, 1); 1082 tasklet_schedule(&hdev->cmd_task); 1083 } 1084
··· 186 BT_DBG("%s %ld", hdev->name, opt); 187 188 /* Reset device */ 189 + set_bit(HCI_RESET, &hdev->flags); 190 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 191 } 192 ··· 213 /* Mandatory initialization */ 214 215 /* Reset */ 216 + if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) { 217 + set_bit(HCI_RESET, &hdev->flags); 218 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 219 + } 220 221 /* Read Local Supported Features */ 222 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); ··· 584 hci_req_cancel(hdev, ENODEV); 585 hci_req_lock(hdev); 586 587 + /* Stop timer, it might be running */ 588 + del_timer_sync(&hdev->cmd_timer); 589 + 590 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 591 hci_req_unlock(hdev); 592 return 0; ··· 623 624 /* Drop last sent command */ 625 if (hdev->sent_cmd) { 626 kfree_skb(hdev->sent_cmd); 627 hdev->sent_cmd = NULL; 628 } ··· 1074 1075 BT_ERR("%s command tx timeout", hdev->name); 1076 atomic_set(&hdev->cmd_cnt, 1); 1077 + clear_bit(HCI_RESET, &hdev->flags); 1078 tasklet_schedule(&hdev->cmd_task); 1079 } 1080
+3 -1
net/bluetooth/hci_event.c
··· 183 184 BT_DBG("%s status 0x%x", hdev->name, status); 185 186 hci_req_complete(hdev, HCI_OP_RESET, status); 187 } 188 ··· 1849 if (ev->opcode != HCI_OP_NOP) 1850 del_timer(&hdev->cmd_timer); 1851 1852 - if (ev->ncmd) { 1853 atomic_set(&hdev->cmd_cnt, 1); 1854 if (!skb_queue_empty(&hdev->cmd_q)) 1855 tasklet_schedule(&hdev->cmd_task);
··· 183 184 BT_DBG("%s status 0x%x", hdev->name, status); 185 186 + clear_bit(HCI_RESET, &hdev->flags); 187 + 188 hci_req_complete(hdev, HCI_OP_RESET, status); 189 } 190 ··· 1847 if (ev->opcode != HCI_OP_NOP) 1848 del_timer(&hdev->cmd_timer); 1849 1850 + if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { 1851 atomic_set(&hdev->cmd_cnt, 1); 1852 if (!skb_queue_empty(&hdev->cmd_q)) 1853 tasklet_schedule(&hdev->cmd_task);
+3 -1
net/bluetooth/l2cap_core.c
··· 1116 bt_cb(skb)->tx_seq = pi->next_tx_seq; 1117 pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; 1118 1119 - pi->unacked_frames++; 1120 pi->frames_sent++; 1121 1122 if (skb_queue_is_last(TX_QUEUE(sk), skb))
··· 1116 bt_cb(skb)->tx_seq = pi->next_tx_seq; 1117 pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; 1118 1119 + if (bt_cb(skb)->retries == 1) 1120 + pi->unacked_frames++; 1121 + 1122 pi->frames_sent++; 1123 1124 if (skb_queue_is_last(TX_QUEUE(sk), skb))
+3 -2
net/bluetooth/l2cap_sock.c
··· 923 rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); 924 l2cap_send_cmd(conn, l2cap_pi(sk)->ident, 925 L2CAP_CONN_RSP, sizeof(rsp), &rsp); 926 - } else 927 - l2cap_chan_del(sk, reason); 928 break; 929 930 case BT_CONNECT:
··· 923 rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); 924 l2cap_send_cmd(conn, l2cap_pi(sk)->ident, 925 L2CAP_CONN_RSP, sizeof(rsp), &rsp); 926 + } 927 + 928 + l2cap_chan_del(sk, reason); 929 break; 930 931 case BT_CONNECT:
+2
net/bluetooth/mgmt.c
··· 1230 if (!hdev) 1231 return cmd_status(sk, index, mgmt_op, ENODEV); 1232 1233 if (!test_bit(HCI_UP, &hdev->flags)) { 1234 err = cmd_status(sk, index, mgmt_op, ENETDOWN); 1235 goto failed;
··· 1230 if (!hdev) 1231 return cmd_status(sk, index, mgmt_op, ENODEV); 1232 1233 + hci_dev_lock_bh(hdev); 1234 + 1235 if (!test_bit(HCI_UP, &hdev->flags)) { 1236 err = cmd_status(sk, index, mgmt_op, ENETDOWN); 1237 goto failed;
+4 -3
net/mac80211/key.c
··· 342 if (IS_ERR(key->u.ccmp.tfm)) { 343 err = PTR_ERR(key->u.ccmp.tfm); 344 kfree(key); 345 - key = ERR_PTR(err); 346 } 347 break; 348 case WLAN_CIPHER_SUITE_AES_CMAC: ··· 360 if (IS_ERR(key->u.aes_cmac.tfm)) { 361 err = PTR_ERR(key->u.aes_cmac.tfm); 362 kfree(key); 363 - key = ERR_PTR(err); 364 } 365 break; 366 } ··· 400 { 401 struct ieee80211_key *old_key; 402 int idx, ret; 403 - bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; 404 405 BUG_ON(!sdata); 406 BUG_ON(!key); 407 408 idx = key->conf.keyidx; 409 key->local = sdata->local; 410 key->sdata = sdata;
··· 342 if (IS_ERR(key->u.ccmp.tfm)) { 343 err = PTR_ERR(key->u.ccmp.tfm); 344 kfree(key); 345 + return ERR_PTR(err); 346 } 347 break; 348 case WLAN_CIPHER_SUITE_AES_CMAC: ··· 360 if (IS_ERR(key->u.aes_cmac.tfm)) { 361 err = PTR_ERR(key->u.aes_cmac.tfm); 362 kfree(key); 363 + return ERR_PTR(err); 364 } 365 break; 366 } ··· 400 { 401 struct ieee80211_key *old_key; 402 int idx, ret; 403 + bool pairwise; 404 405 BUG_ON(!sdata); 406 BUG_ON(!key); 407 408 + pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; 409 idx = key->conf.keyidx; 410 key->local = sdata->local; 411 key->sdata = sdata;
+18 -7
net/mac80211/rc80211_minstrel_ht.c
··· 659 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; 660 struct ieee80211_local *local = hw_to_local(mp->hw); 661 u16 sta_cap = sta->ht_cap.cap; 662 int ack_dur; 663 int stbc; 664 int i; 665 666 /* fall back to the old minstrel for legacy stations */ 667 - if (!sta->ht_cap.ht_supported) { 668 - msp->is_ht = false; 669 - memset(&msp->legacy, 0, sizeof(msp->legacy)); 670 - msp->legacy.r = msp->ratelist; 671 - msp->legacy.sample_table = msp->sample_table; 672 - return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); 673 - } 674 675 BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != 676 MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); ··· 721 722 mi->groups[i].supported = 723 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; 724 } 725 } 726 727 static void
··· 659 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; 660 struct ieee80211_local *local = hw_to_local(mp->hw); 661 u16 sta_cap = sta->ht_cap.cap; 662 + int n_supported = 0; 663 int ack_dur; 664 int stbc; 665 int i; 666 667 /* fall back to the old minstrel for legacy stations */ 668 + if (!sta->ht_cap.ht_supported) 669 + goto use_legacy; 670 671 BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != 672 MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); ··· 725 726 mi->groups[i].supported = 727 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; 728 + 729 + if (mi->groups[i].supported) 730 + n_supported++; 731 } 732 + 733 + if (!n_supported) 734 + goto use_legacy; 735 + 736 + return; 737 + 738 + use_legacy: 739 + msp->is_ht = false; 740 + memset(&msp->legacy, 0, sizeof(msp->legacy)); 741 + msp->legacy.r = msp->ratelist; 742 + msp->legacy.sample_table = msp->sample_table; 743 + return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); 744 } 745 746 static void
+2 -1
net/mac80211/rx.c
··· 612 skipped++; 613 continue; 614 } 615 - if (!time_after(jiffies, tid_agg_rx->reorder_time[j] + 616 HT_RX_REORDER_BUF_TIMEOUT)) 617 goto set_release_timer; 618
··· 612 skipped++; 613 continue; 614 } 615 + if (skipped && 616 + !time_after(jiffies, tid_agg_rx->reorder_time[j] + 617 HT_RX_REORDER_BUF_TIMEOUT)) 618 goto set_release_timer; 619
+21 -10
net/wireless/scan.c
··· 124 } 125 126 /* must hold dev->bss_lock! */ 127 void cfg80211_bss_expire(struct cfg80211_registered_device *dev) 128 { 129 struct cfg80211_internal_bss *bss, *tmp; ··· 143 continue; 144 if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) 145 continue; 146 - list_del(&bss->list); 147 - rb_erase(&bss->rbn, &dev->bss_tree); 148 - kref_put(&bss->ref, bss_release); 149 expired = true; 150 } 151 ··· 592 struct cfg80211_internal_bss *res; 593 size_t ielen = len - offsetof(struct ieee80211_mgmt, 594 u.probe_resp.variable); 595 - size_t privsz = wiphy->bss_priv_size; 596 597 if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && 598 (signal < 0 || signal > 100))) 599 return NULL; 600 601 - if (WARN_ON(!mgmt || !wiphy || 602 - len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) 603 return NULL; 604 605 res = kzalloc(sizeof(*res) + privsz + ielen, gfp); 606 if (!res) ··· 676 677 spin_lock_bh(&dev->bss_lock); 678 if (!list_empty(&bss->list)) { 679 - list_del_init(&bss->list); 680 dev->bss_generation++; 681 - rb_erase(&bss->rbn, &dev->bss_tree); 682 - 683 - kref_put(&bss->ref, bss_release); 684 } 685 spin_unlock_bh(&dev->bss_lock); 686 }
··· 124 } 125 126 /* must hold dev->bss_lock! */ 127 + static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev, 128 + struct cfg80211_internal_bss *bss) 129 + { 130 + list_del_init(&bss->list); 131 + rb_erase(&bss->rbn, &dev->bss_tree); 132 + kref_put(&bss->ref, bss_release); 133 + } 134 + 135 + /* must hold dev->bss_lock! */ 136 void cfg80211_bss_expire(struct cfg80211_registered_device *dev) 137 { 138 struct cfg80211_internal_bss *bss, *tmp; ··· 134 continue; 135 if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) 136 continue; 137 + __cfg80211_unlink_bss(dev, bss); 138 expired = true; 139 } 140 ··· 585 struct cfg80211_internal_bss *res; 586 size_t ielen = len - offsetof(struct ieee80211_mgmt, 587 u.probe_resp.variable); 588 + size_t privsz; 589 + 590 + if (WARN_ON(!mgmt)) 591 + return NULL; 592 + 593 + if (WARN_ON(!wiphy)) 594 + return NULL; 595 596 if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && 597 (signal < 0 || signal > 100))) 598 return NULL; 599 600 + if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) 601 return NULL; 602 + 603 + privsz = wiphy->bss_priv_size; 604 605 res = kzalloc(sizeof(*res) + privsz + ielen, gfp); 606 if (!res) ··· 662 663 spin_lock_bh(&dev->bss_lock); 664 if (!list_empty(&bss->list)) { 665 + __cfg80211_unlink_bss(dev, bss); 666 dev->bss_generation++; 667 } 668 spin_unlock_bh(&dev->bss_lock); 669 }