Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

John W. Linville says:

====================
This batch of fixes is intended for the 3.7 stream...

This includes a pull of the Bluetooth tree. Gustavo says:

"A few important fixes to go into 3.7. There is a new hw support by Marcos
Chaparro. Johan added a memory leak fix and hci device index list fix.
Also Marcel fixed a race condition in the device set up that was prevent the
bt monitor to work properly. Last, Paulo Sérgio added a fix to the error
status when pairing for LE fails. This was prevent userspace to work to handle
the failure properly."

Regarding the mac80211 pull, Johannes says:

"I have a locking fix for some SKB queues, a variable initialization to
avoid crashes in a certain failure case, another free_txskb fix from
Felix and another fix from him to avoid calling a stopped driver, a fix
for a (very unlikely) memory leak and a fix to not send null data
packets when resuming while not associated."

Regarding the iwlwifi pull, Johannes says:

"Two more fixes for iwlwifi ... one to use ieee80211_free_txskb(), and
one to check DMA mapping errors, please pull."

On top of that, Johannes also included a wireless regulatory fix
to allow 40 MHz on channels 12 and 13 in world roaming mode. Also,
Hauke Mehrtens fixes a #ifdef typo in brcmfmac.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+73 -25
+1
drivers/bluetooth/ath3k.c
··· 67 67 { USB_DEVICE(0x13d3, 0x3304) }, 68 68 { USB_DEVICE(0x0930, 0x0215) }, 69 69 { USB_DEVICE(0x0489, 0xE03D) }, 70 + { USB_DEVICE(0x0489, 0xE027) }, 70 71 71 72 /* Atheros AR9285 Malbec with sflash firmware */ 72 73 { USB_DEVICE(0x03F0, 0x311D) },
+1
drivers/bluetooth/btusb.c
··· 124 124 { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, 125 125 { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, 126 126 { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, 127 + { USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE }, 127 128 128 129 /* Atheros AR9285 Malbec with sflash firmware */ 129 130 { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
+1 -1
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
··· 4401 4401 4402 4402 static void brcmf_wiphy_pno_params(struct wiphy *wiphy) 4403 4403 { 4404 - #ifndef CONFIG_BRCMFISCAN 4404 + #ifndef CONFIG_BRCMISCAN 4405 4405 /* scheduled scan settings */ 4406 4406 wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; 4407 4407 wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT;
+1 -1
drivers/net/wireless/iwlwifi/dvm/mac80211.c
··· 521 521 ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); 522 522 523 523 if (iwlagn_tx_skb(priv, control->sta, skb)) 524 - dev_kfree_skb_any(skb); 524 + ieee80211_free_txskb(hw, skb); 525 525 } 526 526 527 527 static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw,
+1 -1
drivers/net/wireless/iwlwifi/dvm/main.c
··· 2114 2114 2115 2115 info = IEEE80211_SKB_CB(skb); 2116 2116 iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); 2117 - dev_kfree_skb_any(skb); 2117 + ieee80211_free_txskb(priv->hw, skb); 2118 2118 } 2119 2119 2120 2120 static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
+21 -2
drivers/net/wireless/iwlwifi/pcie/rx.c
··· 321 321 dma_map_page(trans->dev, page, 0, 322 322 PAGE_SIZE << trans_pcie->rx_page_order, 323 323 DMA_FROM_DEVICE); 324 + if (dma_mapping_error(trans->dev, rxb->page_dma)) { 325 + rxb->page = NULL; 326 + spin_lock_irqsave(&rxq->lock, flags); 327 + list_add(&rxb->list, &rxq->rx_used); 328 + spin_unlock_irqrestore(&rxq->lock, flags); 329 + __free_pages(page, trans_pcie->rx_page_order); 330 + return; 331 + } 324 332 /* dma address must be no more than 36 bits */ 325 333 BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); 326 334 /* and also 256 byte aligned! */ ··· 496 488 dma_map_page(trans->dev, rxb->page, 0, 497 489 PAGE_SIZE << trans_pcie->rx_page_order, 498 490 DMA_FROM_DEVICE); 499 - list_add_tail(&rxb->list, &rxq->rx_free); 500 - rxq->free_count++; 491 + if (dma_mapping_error(trans->dev, rxb->page_dma)) { 492 + /* 493 + * free the page(s) as well to not break 494 + * the invariant that the items on the used 495 + * list have no page(s) 496 + */ 497 + __free_pages(rxb->page, trans_pcie->rx_page_order); 498 + rxb->page = NULL; 499 + list_add_tail(&rxb->list, &rxq->rx_used); 500 + } else { 501 + list_add_tail(&rxb->list, &rxq->rx_free); 502 + rxq->free_count++; 503 + } 501 504 } else 502 505 list_add_tail(&rxb->list, &rxq->rx_used); 503 506 spin_unlock_irqrestore(&rxq->lock, flags);
+2 -2
net/bluetooth/hci_core.c
··· 1754 1754 if (hdev->dev_type != HCI_AMP) 1755 1755 set_bit(HCI_AUTO_OFF, &hdev->dev_flags); 1756 1756 1757 - schedule_work(&hdev->power_on); 1758 - 1759 1757 hci_notify(hdev, HCI_DEV_REG); 1760 1758 hci_dev_hold(hdev); 1759 + 1760 + schedule_work(&hdev->power_on); 1761 1761 1762 1762 return id; 1763 1763
+7 -5
net/bluetooth/mgmt.c
··· 326 326 struct hci_dev *d; 327 327 size_t rp_len; 328 328 u16 count; 329 - int i, err; 329 + int err; 330 330 331 331 BT_DBG("sock %p", sk); 332 332 ··· 347 347 return -ENOMEM; 348 348 } 349 349 350 - rp->num_controllers = cpu_to_le16(count); 351 - 352 - i = 0; 350 + count = 0; 353 351 list_for_each_entry(d, &hci_dev_list, list) { 354 352 if (test_bit(HCI_SETUP, &d->dev_flags)) 355 353 continue; ··· 355 357 if (!mgmt_valid_hdev(d)) 356 358 continue; 357 359 358 - rp->index[i++] = cpu_to_le16(d->id); 360 + rp->index[count++] = cpu_to_le16(d->id); 359 361 BT_DBG("Added hci%u", d->id); 360 362 } 363 + 364 + rp->num_controllers = cpu_to_le16(count); 365 + rp_len = sizeof(*rp) + (2 * count); 361 366 362 367 read_unlock(&hci_dev_list_lock); 363 368 ··· 1367 1366 continue; 1368 1367 1369 1368 list_del(&match->list); 1369 + kfree(match); 1370 1370 found++; 1371 1371 } 1372 1372
+1 -1
net/bluetooth/smp.c
··· 267 267 268 268 clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); 269 269 mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, 270 - hcon->dst_type, reason); 270 + hcon->dst_type, HCI_ERROR_AUTH_FAILURE); 271 271 272 272 cancel_delayed_work_sync(&conn->security_timer); 273 273
+3
net/mac80211/cfg.c
··· 2594 2594 else 2595 2595 local->probe_req_reg--; 2596 2596 2597 + if (!local->open_count) 2598 + break; 2599 + 2597 2600 ieee80211_queue_work(&local->hw, &local->reconfig_filter); 2598 2601 break; 2599 2602 default:
+2
net/mac80211/ieee80211_i.h
··· 1314 1314 struct net_device *dev); 1315 1315 netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, 1316 1316 struct net_device *dev); 1317 + void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, 1318 + struct sk_buff_head *skbs); 1317 1319 1318 1320 /* HT */ 1319 1321 void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
+4 -2
net/mac80211/main.c
··· 871 871 local->hw.wiphy->cipher_suites, 872 872 sizeof(u32) * local->hw.wiphy->n_cipher_suites, 873 873 GFP_KERNEL); 874 - if (!suites) 875 - return -ENOMEM; 874 + if (!suites) { 875 + result = -ENOMEM; 876 + goto fail_wiphy_register; 877 + } 876 878 for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { 877 879 u32 suite = local->hw.wiphy->cipher_suites[r]; 878 880 if (suite == WLAN_CIPHER_SUITE_WEP40 ||
+1 -1
net/mac80211/scan.c
··· 917 917 struct cfg80211_sched_scan_request *req) 918 918 { 919 919 struct ieee80211_local *local = sdata->local; 920 - struct ieee80211_sched_scan_ies sched_scan_ies; 920 + struct ieee80211_sched_scan_ies sched_scan_ies = {}; 921 921 int ret, i; 922 922 923 923 mutex_lock(&local->mtx);
+8 -3
net/mac80211/sta_info.c
··· 117 117 118 118 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { 119 119 local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); 120 - __skb_queue_purge(&sta->ps_tx_buf[ac]); 121 - __skb_queue_purge(&sta->tx_filtered[ac]); 120 + ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); 121 + ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); 122 122 } 123 123 124 124 #ifdef CONFIG_MAC80211_MESH ··· 141 141 tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); 142 142 if (!tid_tx) 143 143 continue; 144 - __skb_queue_purge(&tid_tx->pending); 144 + ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); 145 145 kfree(tid_tx); 146 146 } 147 147 ··· 961 961 struct ieee80211_local *local = sdata->local; 962 962 struct sk_buff_head pending; 963 963 int filtered = 0, buffered = 0, ac; 964 + unsigned long flags; 964 965 965 966 clear_sta_flag(sta, WLAN_STA_SP); 966 967 ··· 977 976 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { 978 977 int count = skb_queue_len(&pending), tmp; 979 978 979 + spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags); 980 980 skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); 981 + spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags); 981 982 tmp = skb_queue_len(&pending); 982 983 filtered += tmp - count; 983 984 count = tmp; 984 985 986 + spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags); 985 987 skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); 988 + spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags); 986 989 tmp = skb_queue_len(&pending); 987 990 buffered += tmp - count; 988 991 }
+9
net/mac80211/status.c
··· 668 668 dev_kfree_skb_any(skb); 669 669 } 670 670 EXPORT_SYMBOL(ieee80211_free_txskb); 671 + 672 + void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, 673 + struct sk_buff_head *skbs) 674 + { 675 + struct sk_buff *skb; 676 + 677 + while ((skb = __skb_dequeue(skbs))) 678 + ieee80211_free_txskb(hw, skb); 679 + }
+6 -3
net/mac80211/tx.c
··· 1358 1358 if (tx->skb) 1359 1359 ieee80211_free_txskb(&tx->local->hw, tx->skb); 1360 1360 else 1361 - __skb_queue_purge(&tx->skbs); 1361 + ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); 1362 1362 return -1; 1363 1363 } else if (unlikely(res == TX_QUEUED)) { 1364 1364 I802_DEBUG_INC(tx->local->tx_handlers_queued); ··· 2120 2120 */ 2121 2121 void ieee80211_clear_tx_pending(struct ieee80211_local *local) 2122 2122 { 2123 + struct sk_buff *skb; 2123 2124 int i; 2124 2125 2125 - for (i = 0; i < local->hw.queues; i++) 2126 - skb_queue_purge(&local->pending[i]); 2126 + for (i = 0; i < local->hw.queues; i++) { 2127 + while ((skb = skb_dequeue(&local->pending[i])) != NULL) 2128 + ieee80211_free_txskb(&local->hw, skb); 2129 + } 2127 2130 } 2128 2131 2129 2132 /*
+2
net/mac80211/util.c
··· 1491 1491 list_for_each_entry(sdata, &local->interfaces, list) { 1492 1492 if (sdata->vif.type != NL80211_IFTYPE_STATION) 1493 1493 continue; 1494 + if (!sdata->u.mgd.associated) 1495 + continue; 1494 1496 1495 1497 ieee80211_send_nullfunc(local, sdata, 0); 1496 1498 }
+2 -3
net/wireless/reg.c
··· 141 141 .reg_rules = { 142 142 /* IEEE 802.11b/g, channels 1..11 */ 143 143 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), 144 - /* IEEE 802.11b/g, channels 12..13. No HT40 145 - * channel fits here. */ 146 - REG_RULE(2467-10, 2472+10, 20, 6, 20, 144 + /* IEEE 802.11b/g, channels 12..13. */ 145 + REG_RULE(2467-10, 2472+10, 40, 6, 20, 147 146 NL80211_RRF_PASSIVE_SCAN | 148 147 NL80211_RRF_NO_IBSS), 149 148 /* IEEE 802.11 channel 14 - Only JP enables