aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/txrx.c
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2009-07-16 14:03:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:21 -0400
commit12f49a79cd32d97a11f864a7b67660438ee3e6c8 (patch)
treee3cb8183abc28d4bc1096a66471dc38af242b7ec /drivers/net/wireless/p54/txrx.c
parent25e83c490be421019997146bdec8645f5bcabcd1 (diff)
p54: remove useless code
This patch removes some useless checks in recv/xmit code. Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/txrx.c')
-rw-r--r--drivers/net/wireless/p54/txrx.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 01eadb1683fa..416400c4ad03 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -87,9 +87,6 @@ static int p54_assign_address(struct p54_common *priv, struct sk_buff *skb)
87 u32 target_addr = priv->rx_start; 87 u32 target_addr = priv->rx_start;
88 u16 len = priv->headroom + skb->len + priv->tailroom + 3; 88 u16 len = priv->headroom + skb->len + priv->tailroom + 3;
89 89
90 if (unlikely(WARN_ON(!skb || !priv)))
91 return -EINVAL;
92
93 info = IEEE80211_SKB_CB(skb); 90 info = IEEE80211_SKB_CB(skb);
94 range = (void *) info->rate_driver_data; 91 range = (void *) info->rate_driver_data;
95 len = (range->extra_len + len) & ~0x3; 92 len = (range->extra_len + len) & ~0x3;
@@ -111,11 +108,6 @@ static int p54_assign_address(struct p54_common *priv, struct sk_buff *skb)
111 range = (void *) info->rate_driver_data; 108 range = (void *) info->rate_driver_data;
112 hole_size = range->start_addr - last_addr; 109 hole_size = range->start_addr - last_addr;
113 110
114 if (!entry->next) {
115 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
116 return -ENOSPC;
117 }
118
119 if (!target_skb && hole_size >= len) { 111 if (!target_skb && hole_size >= len) {
120 target_skb = entry->prev; 112 target_skb = entry->prev;
121 hole_size -= len; 113 hole_size -= len;
@@ -153,9 +145,6 @@ static void p54_tx_pending(struct p54_common *priv)
153 struct sk_buff *skb; 145 struct sk_buff *skb;
154 int ret; 146 int ret;
155 147
156 if (unlikely(WARN_ON(!priv)))
157 return ;
158
159 skb = skb_dequeue(&priv->tx_pending); 148 skb = skb_dequeue(&priv->tx_pending);
160 if (unlikely(!skb)) 149 if (unlikely(!skb))
161 return ; 150 return ;
@@ -219,7 +208,7 @@ static int p54_tx_qos_accounting_alloc(struct p54_common *priv,
219static void p54_tx_qos_accounting_free(struct p54_common *priv, 208static void p54_tx_qos_accounting_free(struct p54_common *priv,
220 struct sk_buff *skb) 209 struct sk_buff *skb)
221{ 210{
222 if (skb && IS_DATA_FRAME(skb)) { 211 if (IS_DATA_FRAME(skb)) {
223 struct p54_hdr *hdr = (void *) skb->data; 212 struct p54_hdr *hdr = (void *) skb->data;
224 struct p54_tx_data *data = (void *) hdr->data; 213 struct p54_tx_data *data = (void *) hdr->data;
225 unsigned long flags; 214 unsigned long flags;
@@ -266,9 +255,6 @@ static struct sk_buff *p54_find_and_unlink_skb(struct p54_common *priv,
266 255
267void p54_tx(struct p54_common *priv, struct sk_buff *skb) 256void p54_tx(struct p54_common *priv, struct sk_buff *skb)
268{ 257{
269 if (unlikely(WARN_ON(!priv)))
270 return ;
271
272 skb_queue_tail(&priv->tx_pending, skb); 258 skb_queue_tail(&priv->tx_pending, skb);
273 p54_tx_pending(priv); 259 p54_tx_pending(priv);
274} 260}