aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/cmd.c14
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c12
-rw-r--r--drivers/net/wireless/libertas/defs.h10
-rw-r--r--drivers/net/wireless/libertas/host.h1
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h9
-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
9 files changed, 18 insertions, 49 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 59801f103e66..44b918a6c219 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1186,8 +1186,8 @@ static void lbs_submit_command(struct lbs_private *priv,
1186 command == CMD_802_11_AUTHENTICATE) 1186 command == CMD_802_11_AUTHENTICATE)
1187 timeo = 10 * HZ; 1187 timeo = 10 * HZ;
1188 1188
1189 lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n", 1189 lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d\n",
1190 command, le16_to_cpu(cmd->seqnum), cmdsize, jiffies); 1190 command, le16_to_cpu(cmd->seqnum), cmdsize);
1191 lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize); 1191 lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
1192 1192
1193 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize); 1193 ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
@@ -1496,16 +1496,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv,
1496 break; 1496 break;
1497 } 1497 }
1498 1498
1499 case CMD_802_11_PWR_CFG:
1500 cmdptr->command = cpu_to_le16(CMD_802_11_PWR_CFG);
1501 cmdptr->size =
1502 cpu_to_le16(sizeof(struct cmd_ds_802_11_pwr_cfg) +
1503 S_DS_GEN);
1504 memmove(&cmdptr->params.pwrcfg, pdata_buf,
1505 sizeof(struct cmd_ds_802_11_pwr_cfg));
1506
1507 ret = 0;
1508 break;
1509 case CMD_BT_ACCESS: 1499 case CMD_BT_ACCESS:
1510 ret = lbs_cmd_bt_access(cmdptr, cmd_action, pdata_buf); 1500 ret = lbs_cmd_bt_access(cmdptr, cmd_action, pdata_buf);
1511 break; 1501 break;
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 888f92d8afc9..9de9666d495b 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -397,14 +397,6 @@ static inline int handle_cmd_response(struct lbs_private *priv,
397 spin_unlock_irqrestore(&priv->driver_lock, flags); 397 spin_unlock_irqrestore(&priv->driver_lock, flags);
398 break; 398 break;
399 399
400 case CMD_RET(CMD_802_11_PWR_CFG):
401 spin_lock_irqsave(&priv->driver_lock, flags);
402 memmove((void *)priv->cur_cmd->callback_arg, &resp->params.pwrcfg,
403 sizeof(struct cmd_ds_802_11_pwr_cfg));
404 spin_unlock_irqrestore(&priv->driver_lock, flags);
405
406 break;
407
408 case CMD_RET(CMD_GET_TSF): 400 case CMD_RET(CMD_GET_TSF):
409 spin_lock_irqsave(&priv->driver_lock, flags); 401 spin_lock_irqsave(&priv->driver_lock, flags);
410 memcpy((void *)priv->cur_cmd->callback_arg, 402 memcpy((void *)priv->cur_cmd->callback_arg,
@@ -463,8 +455,8 @@ int lbs_process_rx_command(struct lbs_private *priv)
463 respcmd = le16_to_cpu(resp->command); 455 respcmd = le16_to_cpu(resp->command);
464 result = le16_to_cpu(resp->result); 456 result = le16_to_cpu(resp->result);
465 457
466 lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n", 458 lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d\n",
467 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies); 459 respcmd, le16_to_cpu(resp->seqnum), priv->upld_len);
468 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len); 460 lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
469 461
470 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) { 462 if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index 3053cc2160bc..84e8de5e21da 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -53,14 +53,14 @@ do { if ((lbs_debug & (grp)) == (grp)) \
53#endif 53#endif
54 54
55#define lbs_deb_enter(grp) \ 55#define lbs_deb_enter(grp) \
56 LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s():%d\n", __FUNCTION__, __LINE__); 56 LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s()\n", __func__);
57#define lbs_deb_enter_args(grp, fmt, args...) \ 57#define lbs_deb_enter_args(grp, fmt, args...) \
58 LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s(" fmt "):%d\n", __FUNCTION__, ## args, __LINE__); 58 LBS_DEB_LL(grp | LBS_DEB_ENTER, " enter", "%s(" fmt ")\n", __func__, ## args);
59#define lbs_deb_leave(grp) \ 59#define lbs_deb_leave(grp) \
60 LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d\n", __FUNCTION__, __LINE__); 60 LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s()\n", __func__);
61#define lbs_deb_leave_args(grp, fmt, args...) \ 61#define lbs_deb_leave_args(grp, fmt, args...) \
62 LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s():%d, " fmt "\n", \ 62 LBS_DEB_LL(grp | LBS_DEB_LEAVE, " leave", "%s(), " fmt "\n", \
63 __FUNCTION__, __LINE__, ##args); 63 __func__, ##args);
64#define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, " main", fmt, ##args) 64#define lbs_deb_main(fmt, args...) LBS_DEB_LL(LBS_DEB_MAIN, " main", fmt, ##args)
65#define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, " net", fmt, ##args) 65#define lbs_deb_net(fmt, args...) LBS_DEB_LL(LBS_DEB_NET, " net", fmt, ##args)
66#define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, " mesh", fmt, ##args) 66#define lbs_deb_mesh(fmt, args...) LBS_DEB_LL(LBS_DEB_MESH, " mesh", fmt, ##args)
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index aae878b042c0..3915c3144fad 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -84,7 +84,6 @@
84#define CMD_802_11_INACTIVITY_TIMEOUT 0x0067 84#define CMD_802_11_INACTIVITY_TIMEOUT 0x0067
85#define CMD_802_11_SLEEP_PERIOD 0x0068 85#define CMD_802_11_SLEEP_PERIOD 0x0068
86#define CMD_802_11_TPC_CFG 0x0072 86#define CMD_802_11_TPC_CFG 0x0072
87#define CMD_802_11_PWR_CFG 0x0073
88#define CMD_802_11_FW_WAKE_METHOD 0x0074 87#define CMD_802_11_FW_WAKE_METHOD 0x0074
89#define CMD_802_11_SUBSCRIBE_EVENT 0x0075 88#define CMD_802_11_SUBSCRIBE_EVENT 0x0075
90#define CMD_802_11_RATE_ADAPT_RATESET 0x0076 89#define CMD_802_11_RATE_ADAPT_RATESET 0x0076
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index acbcd56831cb..b8e372007bb9 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -609,14 +609,6 @@ struct cmd_ds_802_11_led_ctrl {
609 u8 data[256]; 609 u8 data[256];
610} __attribute__ ((packed)); 610} __attribute__ ((packed));
611 611
612struct cmd_ds_802_11_pwr_cfg {
613 __le16 action;
614 u8 enable;
615 s8 PA_P0;
616 s8 PA_P1;
617 s8 PA_P2;
618} __attribute__ ((packed));
619
620struct cmd_ds_802_11_afc { 612struct cmd_ds_802_11_afc {
621 __le16 afc_auto; 613 __le16 afc_auto;
622 union { 614 union {
@@ -726,7 +718,6 @@ struct cmd_ds_command {
726 struct cmd_ds_802_11d_domain_info domaininforesp; 718 struct cmd_ds_802_11d_domain_info domaininforesp;
727 719
728 struct cmd_ds_802_11_tpc_cfg tpccfg; 720 struct cmd_ds_802_11_tpc_cfg tpccfg;
729 struct cmd_ds_802_11_pwr_cfg pwrcfg;
730 struct cmd_ds_802_11_afc afc; 721 struct cmd_ds_802_11_afc afc;
731 struct cmd_ds_802_11_led_ctrl ledgpio; 722 struct cmd_ds_802_11_led_ctrl ledgpio;
732 723
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