aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-26 04:57:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-27 16:03:19 -0400
commitc2b310a73b62f074b0019b940417cafbdbafde41 (patch)
tree186c947bf862262c81ecbc654cbe9a7bf02d50cf /drivers/net/wireless/libertas
parent69dc5d9da5c499c23db7b80217023403da103816 (diff)
libertas: kill useless #define LBS_MONITOR_OFF 0
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/main.c12
-rw-r--r--drivers/net/wireless/libertas/rx.c2
-rw-r--r--drivers/net/wireless/libertas/tx.c5
-rw-r--r--drivers/net/wireless/libertas/wext.h2
4 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 1eb0cb0a82b7..dac72f7af701 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -277,10 +277,10 @@ static ssize_t lbs_rtap_set(struct device *dev,
277 struct lbs_private *priv = to_net_dev(dev)->priv; 277 struct lbs_private *priv = to_net_dev(dev)->priv;
278 278
279 sscanf(buf, "%x", &monitor_mode); 279 sscanf(buf, "%x", &monitor_mode);
280 if (monitor_mode != LBS_MONITOR_OFF) { 280 if (monitor_mode) {
281 if(priv->monitormode == monitor_mode) 281 if (priv->monitormode == monitor_mode)
282 return strlen(buf); 282 return strlen(buf);
283 if (priv->monitormode == LBS_MONITOR_OFF) { 283 if (!priv->monitormode) {
284 if (priv->infra_open || priv->mesh_open) 284 if (priv->infra_open || priv->mesh_open)
285 return -EBUSY; 285 return -EBUSY;
286 if (priv->mode == IW_MODE_INFRA) 286 if (priv->mode == IW_MODE_INFRA)
@@ -293,9 +293,9 @@ static ssize_t lbs_rtap_set(struct device *dev,
293 } 293 }
294 294
295 else { 295 else {
296 if (priv->monitormode == LBS_MONITOR_OFF) 296 if (!priv->monitormode)
297 return strlen(buf); 297 return strlen(buf);
298 priv->monitormode = LBS_MONITOR_OFF; 298 priv->monitormode = 0;
299 lbs_remove_rtap(priv); 299 lbs_remove_rtap(priv);
300 300
301 if (priv->currenttxskb) { 301 if (priv->currenttxskb) {
@@ -392,7 +392,7 @@ static int lbs_dev_open(struct net_device *dev)
392 392
393 spin_lock_irq(&priv->driver_lock); 393 spin_lock_irq(&priv->driver_lock);
394 394
395 if (priv->monitormode != LBS_MONITOR_OFF) { 395 if (priv->monitormode) {
396 ret = -EBUSY; 396 ret = -EBUSY;
397 goto out; 397 goto out;
398 } 398 }
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 149557a478ac..09f023089ea4 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -155,7 +155,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
155 155
156 skb->ip_summed = CHECKSUM_NONE; 156 skb->ip_summed = CHECKSUM_NONE;
157 157
158 if (priv->monitormode != LBS_MONITOR_OFF) 158 if (priv->monitormode)
159 return process_rxed_802_11_packet(priv, skb); 159 return process_rxed_802_11_packet(priv, skb);
160 160
161 p_rx_pkt = (struct rxpackethdr *) skb->data; 161 p_rx_pkt = (struct rxpackethdr *) skb->data;
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index 00d95f75bd89..77f1f9525b81 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -151,7 +151,7 @@ int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
151 151
152 dev->trans_start = jiffies; 152 dev->trans_start = jiffies;
153 153
154 if (priv->monitormode != LBS_MONITOR_OFF) { 154 if (priv->monitormode) {
155 /* Keep the skb to echo it back once Tx feedback is 155 /* Keep the skb to echo it back once Tx feedback is
156 received from FW */ 156 received from FW */
157 skb_orphan(skb); 157 skb_orphan(skb);
@@ -186,8 +186,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv)
186 int txfail; 186 int txfail;
187 int try_count; 187 int try_count;
188 188
189 if (priv->monitormode == LBS_MONITOR_OFF || 189 if (!priv->monitormode || priv->currenttxskb == NULL)
190 priv->currenttxskb == NULL)
191 return; 190 return;
192 191
193 radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data; 192 radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data;
diff --git a/drivers/net/wireless/libertas/wext.h b/drivers/net/wireless/libertas/wext.h
index a563d9a231b6..f0f439a6ab49 100644
--- a/drivers/net/wireless/libertas/wext.h
+++ b/drivers/net/wireless/libertas/wext.h
@@ -15,8 +15,6 @@ struct lbs_ioctl_regrdwr {
15 u32 value; 15 u32 value;
16}; 16};
17 17
18#define LBS_MONITOR_OFF 0
19
20extern struct iw_handler_def lbs_handler_def; 18extern struct iw_handler_def lbs_handler_def;
21extern struct iw_handler_def mesh_handler_def; 19extern struct iw_handler_def mesh_handler_def;
22 20