Skip to content

Commit 521c4d9

Browse files
committed
ipw2200: Call netif_*_queue() interfaces properly.
netif_carrier_{on,off}() handles starting and stopping packet flow into the driver. So there is no reason to invoke netif_stop_queue() and netif_wake_queue() in response to link status events. Signed-off-by: David S. Miller <[email protected]>
1 parent 4255589 commit 521c4d9

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

drivers/net/wireless/ipw2200.c

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4972,8 +4972,7 @@ static int ipw_queue_tx_reclaim(struct ipw_priv *priv,
49724972
}
49734973
done:
49744974
if ((ipw_tx_queue_space(q) > q->low_mark) &&
4975-
(qindex >= 0) &&
4976-
(priv->status & STATUS_ASSOCIATED) && netif_running(priv->net_dev))
4975+
(qindex >= 0))
49774976
netif_wake_queue(priv->net_dev);
49784977
used = q->first_empty - q->last_used;
49794978
if (used < 0)
@@ -10154,14 +10153,8 @@ static void init_sys_config(struct ipw_sys_config *sys_config)
1015410153

1015510154
static int ipw_net_open(struct net_device *dev)
1015610155
{
10157-
struct ipw_priv *priv = ieee80211_priv(dev);
1015810156
IPW_DEBUG_INFO("dev->open\n");
10159-
/* we should be verifying the device is ready to be opened */
10160-
mutex_lock(&priv->mutex);
10161-
if (!(priv->status & STATUS_RF_KILL_MASK) &&
10162-
(priv->status & STATUS_ASSOCIATED))
10163-
netif_start_queue(dev);
10164-
mutex_unlock(&priv->mutex);
10157+
netif_start_queue(dev);
1016510158
return 0;
1016610159
}
1016710160

@@ -10481,13 +10474,6 @@ static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb,
1048110474
IPW_DEBUG_TX("dev->xmit(%d bytes)\n", txb->payload_size);
1048210475
spin_lock_irqsave(&priv->lock, flags);
1048310476

10484-
if (!(priv->status & STATUS_ASSOCIATED)) {
10485-
IPW_DEBUG_INFO("Tx attempt while not associated.\n");
10486-
priv->ieee->stats.tx_carrier_errors++;
10487-
netif_stop_queue(dev);
10488-
goto fail_unlock;
10489-
}
10490-
1049110477
#ifdef CONFIG_IPW2200_PROMISCUOUS
1049210478
if (rtap_iface && netif_running(priv->prom_net_dev))
1049310479
ipw_handle_promiscuous_tx(priv, txb);
@@ -10499,10 +10485,6 @@ static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb,
1049910485
spin_unlock_irqrestore(&priv->lock, flags);
1050010486

1050110487
return ret;
10502-
10503-
fail_unlock:
10504-
spin_unlock_irqrestore(&priv->lock, flags);
10505-
return 1;
1050610488
}
1050710489

1050810490
static struct net_device_stats *ipw_net_get_stats(struct net_device *dev)
@@ -10703,13 +10685,6 @@ static void ipw_link_up(struct ipw_priv *priv)
1070310685
priv->last_packet_time = 0;
1070410686

1070510687
netif_carrier_on(priv->net_dev);
10706-
if (netif_queue_stopped(priv->net_dev)) {
10707-
IPW_DEBUG_NOTIF("waking queue\n");
10708-
netif_wake_queue(priv->net_dev);
10709-
} else {
10710-
IPW_DEBUG_NOTIF("starting queue\n");
10711-
netif_start_queue(priv->net_dev);
10712-
}
1071310688

1071410689
cancel_delayed_work(&priv->request_scan);
1071510690
cancel_delayed_work(&priv->request_direct_scan);
@@ -10739,7 +10714,6 @@ static void ipw_link_down(struct ipw_priv *priv)
1073910714
{
1074010715
ipw_led_link_down(priv);
1074110716
netif_carrier_off(priv->net_dev);
10742-
netif_stop_queue(priv->net_dev);
1074310717
notify_wx_assoc_event(priv);
1074410718

1074510719
/* Cancel any queued work ... */
@@ -11419,7 +11393,6 @@ static void ipw_down(struct ipw_priv *priv)
1141911393
/* Clear all bits but the RF Kill */
1142011394
priv->status &= STATUS_RF_KILL_MASK | STATUS_EXIT_PENDING;
1142111395
netif_carrier_off(priv->net_dev);
11422-
netif_stop_queue(priv->net_dev);
1142311396

1142411397
ipw_stop_nic(priv);
1142511398

@@ -11522,7 +11495,6 @@ static int ipw_prom_open(struct net_device *dev)
1152211495

1152311496
IPW_DEBUG_INFO("prom dev->open\n");
1152411497
netif_carrier_off(dev);
11525-
netif_stop_queue(dev);
1152611498

1152711499
if (priv->ieee->iw_mode != IW_MODE_MONITOR) {
1152811500
priv->sys_config.accept_all_data_frames = 1;
@@ -11558,7 +11530,6 @@ static int ipw_prom_stop(struct net_device *dev)
1155811530
static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
1155911531
{
1156011532
IPW_DEBUG_INFO("prom dev->xmit\n");
11561-
netif_stop_queue(dev);
1156211533
return -EOPNOTSUPP;
1156311534
}
1156411535

0 commit comments

Comments
 (0)