aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-10 13:21:22 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-10 13:21:22 -0500
commitc4d7099867c7e7ade7693a5ac06f12b3c3cdbf8e (patch)
tree5d5fa21f642c0f4083f35f11ea04c9c86df96f85 /net
parent95e92fd40c967c363ad66b2fd1ce4dcd68132e54 (diff)
parent0f74d82d80e653545f4190c96a25f3b6751a8370 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== For the mac80211 bits, Johannes says: "I have a fix from Javier for mac80211_hwsim when used with wmediumd userspace, and a fix from Felix for buffering in AP mode." For the NFC bits, Samuel says: "This pull request only contains one fix for a regression introduced with commit e29a9e2ae165620d. Without this fix, we can not establish a p2p link in target mode. Only initiator mode works." For the iwlwifi bits, Emmanuel says: "It only includes new device IDs so it's not vital. If you have a pull request to net.git anyway, I'd happy to have this in." ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c23
-rw-r--r--net/nfc/core.c2
2 files changed, 14 insertions, 11 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c558b246ef00..ca7fa7f0613d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -463,7 +463,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
463{ 463{
464 struct sta_info *sta = tx->sta; 464 struct sta_info *sta = tx->sta;
465 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); 465 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
466 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
467 struct ieee80211_local *local = tx->local; 466 struct ieee80211_local *local = tx->local;
468 467
469 if (unlikely(!sta)) 468 if (unlikely(!sta))
@@ -474,15 +473,6 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
474 !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) { 473 !(info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER))) {
475 int ac = skb_get_queue_mapping(tx->skb); 474 int ac = skb_get_queue_mapping(tx->skb);
476 475
477 /* only deauth, disassoc and action are bufferable MMPDUs */
478 if (ieee80211_is_mgmt(hdr->frame_control) &&
479 !ieee80211_is_deauth(hdr->frame_control) &&
480 !ieee80211_is_disassoc(hdr->frame_control) &&
481 !ieee80211_is_action(hdr->frame_control)) {
482 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
483 return TX_CONTINUE;
484 }
485
486 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n", 476 ps_dbg(sta->sdata, "STA %pM aid %d: PS buffer for AC %d\n",
487 sta->sta.addr, sta->sta.aid, ac); 477 sta->sta.addr, sta->sta.aid, ac);
488 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) 478 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER)
@@ -525,9 +515,22 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
525static ieee80211_tx_result debug_noinline 515static ieee80211_tx_result debug_noinline
526ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) 516ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
527{ 517{
518 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
519 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
520
528 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) 521 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
529 return TX_CONTINUE; 522 return TX_CONTINUE;
530 523
524 /* only deauth, disassoc and action are bufferable MMPDUs */
525 if (ieee80211_is_mgmt(hdr->frame_control) &&
526 !ieee80211_is_deauth(hdr->frame_control) &&
527 !ieee80211_is_disassoc(hdr->frame_control) &&
528 !ieee80211_is_action(hdr->frame_control)) {
529 if (tx->flags & IEEE80211_TX_UNICAST)
530 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
531 return TX_CONTINUE;
532 }
533
531 if (tx->flags & IEEE80211_TX_UNICAST) 534 if (tx->flags & IEEE80211_TX_UNICAST)
532 return ieee80211_tx_h_unicast_ps_buf(tx); 535 return ieee80211_tx_h_unicast_ps_buf(tx);
533 else 536 else
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 872529105abc..83b9927e7d19 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -384,7 +384,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
384{ 384{
385 dev->dep_link_up = true; 385 dev->dep_link_up = true;
386 386
387 if (!dev->active_target) { 387 if (!dev->active_target && rf_mode == NFC_RF_INITIATOR) {
388 struct nfc_target *target; 388 struct nfc_target *target;
389 389
390 target = nfc_find_target(dev, target_idx); 390 target = nfc_find_target(dev, target_idx);