aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/decl.h2
-rw-r--r--drivers/net/wireless/libertas/dev.h5
-rw-r--r--drivers/net/wireless/libertas/main.c6
-rw-r--r--drivers/net/wireless/libertas/tx.c40
4 files changed, 3 insertions, 50 deletions
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index e255b1915742..b0945140ba1c 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -62,8 +62,6 @@ void lbs_ps_sleep(struct lbs_private *priv, int wait_option);
62void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode); 62void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode);
63void lbs_ps_wakeup(struct lbs_private *priv, int wait_option); 63void lbs_ps_wakeup(struct lbs_private *priv, int wait_option);
64 64
65void lbs_tx_runqueue(struct lbs_private *priv);
66
67struct chan_freq_power *lbs_find_cfp_by_band_and_channel( 65struct chan_freq_power *lbs_find_cfp_by_band_and_channel(
68 struct lbs_private *priv, 66 struct lbs_private *priv,
69 u8 band, 67 u8 band,
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index 21b0d382096b..a9c3adc421b7 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -197,11 +197,6 @@ struct lbs_private {
197 /** Timers */ 197 /** Timers */
198 struct timer_list command_timer; 198 struct timer_list command_timer;
199 199
200 /* TX queue used in PS mode */
201 spinlock_t txqueue_lock;
202 struct sk_buff *tx_queue_ps[NR_TX_QUEUE];
203 unsigned int tx_queue_idx;
204
205 u8 hisregcpy; 200 u8 hisregcpy;
206 201
207 /** current ssid/bssid related parameters*/ 202 /** current ssid/bssid related parameters*/
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 2ff5f1b77b12..c63899518249 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -914,8 +914,6 @@ static int lbs_thread(void *data)
914 */ 914 */
915 if (!list_empty(&priv->cmdpendingq)) 915 if (!list_empty(&priv->cmdpendingq))
916 wake_up_all(&priv->cmd_pending); 916 wake_up_all(&priv->cmd_pending);
917
918 lbs_tx_runqueue(priv);
919 } 917 }
920 918
921 del_timer(&priv->command_timer); 919 del_timer(&priv->command_timer);
@@ -1072,10 +1070,6 @@ static int lbs_init_adapter(struct lbs_private *priv)
1072 1070
1073 mutex_init(&priv->lock); 1071 mutex_init(&priv->lock);
1074 1072
1075 memset(&priv->tx_queue_ps, 0, NR_TX_QUEUE*sizeof(struct sk_buff*));
1076 priv->tx_queue_idx = 0;
1077 spin_lock_init(&priv->txqueue_lock);
1078
1079 setup_timer(&priv->command_timer, command_timer_fn, 1073 setup_timer(&priv->command_timer, command_timer_fn,
1080 (unsigned long)priv); 1074 (unsigned long)priv);
1081 1075
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index 4cb39d33003c..749535e3f770 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -164,41 +164,6 @@ done:
164} 164}
165 165
166 166
167void lbs_tx_runqueue(struct lbs_private *priv)
168{
169 int i;
170
171 spin_lock(&priv->txqueue_lock);
172 for (i = 0; i < priv->tx_queue_idx; i++) {
173 struct sk_buff *skb = priv->tx_queue_ps[i];
174 spin_unlock(&priv->txqueue_lock);
175 SendSinglePacket(priv, skb);
176 spin_lock(&priv->txqueue_lock);
177 }
178 priv->tx_queue_idx = 0;
179 spin_unlock(&priv->txqueue_lock);
180}
181
182static void lbs_tx_queue(struct lbs_private *priv, struct sk_buff *skb)
183{
184
185 spin_lock(&priv->txqueue_lock);
186
187 WARN_ON(priv->tx_queue_idx >= NR_TX_QUEUE);
188 priv->tx_queue_ps[priv->tx_queue_idx++] = skb;
189 if (priv->tx_queue_idx == NR_TX_QUEUE) {
190 netif_stop_queue(priv->dev);
191 if (priv->mesh_dev)
192 netif_stop_queue(priv->mesh_dev);
193 } else {
194 netif_start_queue(priv->dev);
195 if (priv->mesh_dev)
196 netif_start_queue(priv->mesh_dev);
197 }
198
199 spin_unlock(&priv->txqueue_lock);
200}
201
202/** 167/**
203 * @brief This function checks the conditions and sends packet to IF 168 * @brief This function checks the conditions and sends packet to IF
204 * layer if everything is ok. 169 * layer if everything is ok.
@@ -221,8 +186,9 @@ int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb)
221 186
222 if ((priv->psstate == PS_STATE_SLEEP) || 187 if ((priv->psstate == PS_STATE_SLEEP) ||
223 (priv->psstate == PS_STATE_PRE_SLEEP)) { 188 (priv->psstate == PS_STATE_PRE_SLEEP)) {
224 lbs_tx_queue(priv, skb); 189 lbs_pr_alert("TX error: packet xmit in %ssleep mode\n",
225 return ret; 190 priv->psstate == PS_STATE_SLEEP?"":"pre-");
191 goto done;
226 } 192 }
227 193
228 ret = SendSinglePacket(priv, skb); 194 ret = SendSinglePacket(priv, skb);