aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-05-01 17:07:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:27 -0400
commit3df5ee60f1ee559b1417397461891f8b483e8089 (patch)
tree33471400965c9cfeebf18ad47dd5d5eac77fef3d
parent3a4d3af700b3d78904775d9a9efe0858b5e1e955 (diff)
wireless: fix warning introduced by "mac80211: QoS related cleanups"
net/mac80211/wme.c: In function ‘wme_qdiscop_enqueue’: net/mac80211/wme.c:219: warning: comparison is always false due to limited range of data type drivers/net/wireless/p54/p54common.c: In function ‘p54_conf_tx’: drivers/net/wireless/p54/p54common.c:947: warning: comparison is always false due to limited range of data type Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/p54/p54common.c2
-rw-r--r--net/mac80211/wme.c23
2 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 34b91ccd8aec..33d608a60d79 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -944,7 +944,7 @@ static int p54_conf_tx(struct ieee80211_hw *dev, u16 queue,
944 vdcf = (struct p54_tx_control_vdcf *)(((struct p54_control_hdr *) 944 vdcf = (struct p54_tx_control_vdcf *)(((struct p54_control_hdr *)
945 ((void *)priv->cached_vdcf + priv->tx_hdr_len))->data); 945 ((void *)priv->cached_vdcf + priv->tx_hdr_len))->data);
946 946
947 if ((params) && !((queue < 0) || (queue > 4))) { 947 if ((params) && !(queue > 4)) {
948 P54_SET_QUEUE(vdcf->queue[queue], params->aifs, 948 P54_SET_QUEUE(vdcf->queue[queue], params->aifs,
949 params->cw_min, params->cw_max, params->txop); 949 params->cw_min, params->cw_max, params->txop);
950 } else 950 } else
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 5eddf1f32ed9..b1e20ca03ffe 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -216,20 +216,15 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
216 rcu_read_unlock(); 216 rcu_read_unlock();
217 } 217 }
218 218
219 if (unlikely(queue < 0)) { 219 tid = skb->priority & QOS_CONTROL_TAG1D_MASK;
220 kfree_skb(skb); 220 pkt_data->queue = (unsigned int) queue;
221 err = NET_XMIT_DROP; 221 qdisc = q->queues[queue];
222 } else { 222 err = qdisc->enqueue(skb, qdisc);
223 tid = skb->priority & QOS_CONTROL_TAG1D_MASK; 223 if (err == NET_XMIT_SUCCESS) {
224 pkt_data->queue = (unsigned int) queue; 224 qd->q.qlen++;
225 qdisc = q->queues[queue]; 225 qd->bstats.bytes += skb->len;
226 err = qdisc->enqueue(skb, qdisc); 226 qd->bstats.packets++;
227 if (err == NET_XMIT_SUCCESS) { 227 return NET_XMIT_SUCCESS;
228 qd->q.qlen++;
229 qd->bstats.bytes += skb->len;
230 qd->bstats.packets++;
231 return NET_XMIT_SUCCESS;
232 }
233 } 228 }
234 qd->qstats.drops++; 229 qd->qstats.drops++;
235 return err; 230 return err;