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