From 125de99b08b955bdd15724cacc9cdd2150551656 Mon Sep 17 00:00:00 2001
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Tue, 26 Feb 2013 21:52:59 +0000
Subject: mac80211: fix sending probe requests in client mode, fixes connecting
 to hidden networks (#13056)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35819 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 package/mac80211/patches/300-pending_work.patch    | 68 +++++++++++++++++++++-
 .../540-mac80211_optimize_mcs_rate_mask.patch      |  2 +-
 2 files changed, 68 insertions(+), 2 deletions(-)

(limited to 'package')

diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 1bc32a067..508a674c5 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -357,7 +357,73 @@
  	WLAN_STA_BLOCK_BA,
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -1848,9 +1848,24 @@ netdev_tx_t ieee80211_subif_start_xmit(s
+@@ -1231,34 +1231,40 @@ static bool ieee80211_tx_frags(struct ie
+ 		if (local->queue_stop_reasons[q] ||
+ 		    (!txpending && !skb_queue_empty(&local->pending[q]))) {
+ 			if (unlikely(info->flags &
+-					IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
+-				     local->queue_stop_reasons[q] &
+-					~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
++				     IEEE80211_TX_INTFL_OFFCHAN_TX_OK)) {
++				if (local->queue_stop_reasons[q] &
++				    ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL)) {
++					/*
++					 * Drop off-channel frames if queues
++					 * are stopped for any reason other
++					 * than off-channel operation. Never
++					 * queue them.
++					 */
++					spin_unlock_irqrestore(
++						&local->queue_stop_reason_lock,
++						flags);
++					ieee80211_purge_tx_queue(&local->hw,
++								 skbs);
++					return true;
++				}
++			} else {
++
+ 				/*
+-				 * Drop off-channel frames if queues are stopped
+-				 * for any reason other than off-channel
+-				 * operation. Never queue them.
++				 * Since queue is stopped, queue up frames for
++				 * later transmission from the tx-pending
++				 * tasklet when the queue is woken again.
+ 				 */
+-				spin_unlock_irqrestore(
+-					&local->queue_stop_reason_lock, flags);
+-				ieee80211_purge_tx_queue(&local->hw, skbs);
+-				return true;
++				if (txpending)
++					skb_queue_splice_init(skbs,
++							      &local->pending[q]);
++				else
++					skb_queue_splice_tail_init(skbs,
++								   &local->pending[q]);
++
++				spin_unlock_irqrestore(&local->queue_stop_reason_lock,
++						       flags);
++				return false;
+ 			}
+-
+-			/*
+-			 * Since queue is stopped, queue up frames for later
+-			 * transmission from the tx-pending tasklet when the
+-			 * queue is woken again.
+-			 */
+-			if (txpending)
+-				skb_queue_splice_init(skbs, &local->pending[q]);
+-			else
+-				skb_queue_splice_tail_init(skbs,
+-							   &local->pending[q]);
+-
+-			spin_unlock_irqrestore(&local->queue_stop_reason_lock,
+-					       flags);
+-			return false;
+ 		}
+ 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
+ 
+@@ -1848,9 +1854,24 @@ netdev_tx_t ieee80211_subif_start_xmit(s
  		}
  
  		if (!is_multicast_ether_addr(skb->data)) {
diff --git a/package/mac80211/patches/540-mac80211_optimize_mcs_rate_mask.patch b/package/mac80211/patches/540-mac80211_optimize_mcs_rate_mask.patch
index 370963933..347c92013 100644
--- a/package/mac80211/patches/540-mac80211_optimize_mcs_rate_mask.patch
+++ b/package/mac80211/patches/540-mac80211_optimize_mcs_rate_mask.patch
@@ -69,7 +69,7 @@
  	txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP ||
  		    tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
  		    tx->sdata->vif.type == NL80211_IFTYPE_ADHOC);
-@@ -2505,8 +2507,6 @@ struct sk_buff *ieee80211_beacon_get_tim
+@@ -2511,8 +2513,6 @@ struct sk_buff *ieee80211_beacon_get_tim
  		txrc.max_rate_idx = -1;
  	else
  		txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;
-- 
cgit v1.2.3