aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/libertas/assoc.c8
-rw-r--r--drivers/net/wireless/libertas/cmd.c4
-rw-r--r--drivers/net/wireless/libertas/decl.h2
-rw-r--r--drivers/net/wireless/libertas/dev.h2
-rw-r--r--drivers/net/wireless/libertas/main.c29
5 files changed, 22 insertions, 23 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 707b7ff592ec..54161f1e742a 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -268,11 +268,11 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,
268 268
269 /* enable/disable the MAC's WEP packet filter */ 269 /* enable/disable the MAC's WEP packet filter */
270 if (assoc_req->secinfo.wep_enabled) 270 if (assoc_req->secinfo.wep_enabled)
271 priv->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE; 271 priv->mac_control |= CMD_ACT_MAC_WEP_ENABLE;
272 else 272 else
273 priv->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE; 273 priv->mac_control &= ~CMD_ACT_MAC_WEP_ENABLE;
274 274
275 ret = lbs_set_mac_packet_filter(priv); 275 ret = lbs_set_mac_control(priv);
276 if (ret) 276 if (ret)
277 goto out; 277 goto out;
278 278
@@ -304,7 +304,7 @@ static int assoc_helper_secinfo(struct lbs_private *priv,
304 memcpy(&priv->secinfo, &assoc_req->secinfo, 304 memcpy(&priv->secinfo, &assoc_req->secinfo,
305 sizeof(struct lbs_802_11_security)); 305 sizeof(struct lbs_802_11_security));
306 306
307 ret = lbs_set_mac_packet_filter(priv); 307 ret = lbs_set_mac_control(priv);
308 if (ret) 308 if (ret)
309 goto out; 309 goto out;
310 310
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 84dde09bfbc3..4fcf5e1d98aa 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1286,7 +1286,7 @@ int lbs_set_radio_control(struct lbs_private *priv)
1286 return ret; 1286 return ret;
1287} 1287}
1288 1288
1289int lbs_set_mac_packet_filter(struct lbs_private *priv) 1289int lbs_set_mac_control(struct lbs_private *priv)
1290{ 1290{
1291 int ret = 0; 1291 int ret = 0;
1292 struct cmd_ds_mac_control cmd; 1292 struct cmd_ds_mac_control cmd;
@@ -1294,7 +1294,7 @@ int lbs_set_mac_packet_filter(struct lbs_private *priv)
1294 lbs_deb_enter(LBS_DEB_CMD); 1294 lbs_deb_enter(LBS_DEB_CMD);
1295 1295
1296 cmd.hdr.size = cpu_to_le16(sizeof(cmd)); 1296 cmd.hdr.size = cpu_to_le16(sizeof(cmd));
1297 cmd.action = cpu_to_le16(priv->currentpacketfilter); 1297 cmd.action = cpu_to_le16(priv->mac_control);
1298 cmd.reserved = 0; 1298 cmd.reserved = 0;
1299 1299
1300 ret = lbs_cmd_with_response(priv, CMD_MAC_CONTROL, &cmd); 1300 ret = lbs_cmd_with_response(priv, CMD_MAC_CONTROL, &cmd);
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 4e22341b4f3d..f0de2a1e918f 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -17,7 +17,7 @@ struct net_device;
17struct cmd_ctrl_node; 17struct cmd_ctrl_node;
18struct cmd_ds_command; 18struct cmd_ds_command;
19 19
20int lbs_set_mac_packet_filter(struct lbs_private *priv); 20int lbs_set_mac_control(struct lbs_private *priv);
21 21
22void lbs_send_tx_feedback(struct lbs_private *priv); 22void lbs_send_tx_feedback(struct lbs_private *priv);
23 23
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index ff2c046ca73f..4122a3223432 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -252,7 +252,7 @@ struct lbs_private {
252 struct sk_buff *currenttxskb; 252 struct sk_buff *currenttxskb;
253 253
254 /** NIC Operation characteristics */ 254 /** NIC Operation characteristics */
255 u16 currentpacketfilter; 255 u16 mac_control;
256 u32 connect_status; 256 u32 connect_status;
257 u32 mesh_connect_status; 257 u32 mesh_connect_status;
258 u16 regioncode; 258 u16 regioncode;
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 2e5bac826c48..37cc05044cd7 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -581,45 +581,45 @@ static int lbs_copy_multicast_address(struct lbs_private *priv,
581static void lbs_set_multicast_list(struct net_device *dev) 581static void lbs_set_multicast_list(struct net_device *dev)
582{ 582{
583 struct lbs_private *priv = dev->priv; 583 struct lbs_private *priv = dev->priv;
584 int oldpacketfilter; 584 int old_mac_control;
585 DECLARE_MAC_BUF(mac); 585 DECLARE_MAC_BUF(mac);
586 586
587 lbs_deb_enter(LBS_DEB_NET); 587 lbs_deb_enter(LBS_DEB_NET);
588 588
589 oldpacketfilter = priv->currentpacketfilter; 589 old_mac_control = priv->mac_control;
590 590
591 if (dev->flags & IFF_PROMISC) { 591 if (dev->flags & IFF_PROMISC) {
592 lbs_deb_net("enable promiscuous mode\n"); 592 lbs_deb_net("enable promiscuous mode\n");
593 priv->currentpacketfilter |= 593 priv->mac_control |=
594 CMD_ACT_MAC_PROMISCUOUS_ENABLE; 594 CMD_ACT_MAC_PROMISCUOUS_ENABLE;
595 priv->currentpacketfilter &= 595 priv->mac_control &=
596 ~(CMD_ACT_MAC_ALL_MULTICAST_ENABLE | 596 ~(CMD_ACT_MAC_ALL_MULTICAST_ENABLE |
597 CMD_ACT_MAC_MULTICAST_ENABLE); 597 CMD_ACT_MAC_MULTICAST_ENABLE);
598 } else { 598 } else {
599 /* Multicast */ 599 /* Multicast */
600 priv->currentpacketfilter &= 600 priv->mac_control &=
601 ~CMD_ACT_MAC_PROMISCUOUS_ENABLE; 601 ~CMD_ACT_MAC_PROMISCUOUS_ENABLE;
602 602
603 if (dev->flags & IFF_ALLMULTI || dev->mc_count > 603 if (dev->flags & IFF_ALLMULTI || dev->mc_count >
604 MRVDRV_MAX_MULTICAST_LIST_SIZE) { 604 MRVDRV_MAX_MULTICAST_LIST_SIZE) {
605 lbs_deb_net( "enabling all multicast\n"); 605 lbs_deb_net( "enabling all multicast\n");
606 priv->currentpacketfilter |= 606 priv->mac_control |=
607 CMD_ACT_MAC_ALL_MULTICAST_ENABLE; 607 CMD_ACT_MAC_ALL_MULTICAST_ENABLE;
608 priv->currentpacketfilter &= 608 priv->mac_control &=
609 ~CMD_ACT_MAC_MULTICAST_ENABLE; 609 ~CMD_ACT_MAC_MULTICAST_ENABLE;
610 } else { 610 } else {
611 priv->currentpacketfilter &= 611 priv->mac_control &=
612 ~CMD_ACT_MAC_ALL_MULTICAST_ENABLE; 612 ~CMD_ACT_MAC_ALL_MULTICAST_ENABLE;
613 613
614 if (!dev->mc_count) { 614 if (!dev->mc_count) {
615 lbs_deb_net("no multicast addresses, " 615 lbs_deb_net("no multicast addresses, "
616 "disabling multicast\n"); 616 "disabling multicast\n");
617 priv->currentpacketfilter &= 617 priv->mac_control &=
618 ~CMD_ACT_MAC_MULTICAST_ENABLE; 618 ~CMD_ACT_MAC_MULTICAST_ENABLE;
619 } else { 619 } else {
620 int i; 620 int i;
621 621
622 priv->currentpacketfilter |= 622 priv->mac_control |=
623 CMD_ACT_MAC_MULTICAST_ENABLE; 623 CMD_ACT_MAC_MULTICAST_ENABLE;
624 624
625 priv->nr_of_multicastmacaddr = 625 priv->nr_of_multicastmacaddr =
@@ -642,9 +642,8 @@ static void lbs_set_multicast_list(struct net_device *dev)
642 } 642 }
643 } 643 }
644 644
645 if (priv->currentpacketfilter != oldpacketfilter) { 645 if (priv->mac_control != old_mac_control)
646 lbs_set_mac_packet_filter(priv); 646 lbs_set_mac_control(priv);
647 }
648 647
649 lbs_deb_leave(LBS_DEB_NET); 648 lbs_deb_leave(LBS_DEB_NET);
650} 649}
@@ -945,7 +944,7 @@ static int lbs_setup_firmware(struct lbs_private *priv)
945 goto done; 944 goto done;
946 } 945 }
947 946
948 lbs_set_mac_packet_filter(priv); 947 lbs_set_mac_control(priv);
949 948
950 ret = lbs_get_data_rate(priv); 949 ret = lbs_get_data_rate(priv);
951 if (ret < 0) { 950 if (ret < 0) {
@@ -1036,7 +1035,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
1036 priv->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; 1035 priv->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
1037 priv->mode = IW_MODE_INFRA; 1036 priv->mode = IW_MODE_INFRA;
1038 priv->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; 1037 priv->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;
1039 priv->currentpacketfilter = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON; 1038 priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON;
1040 priv->radioon = RADIO_ON; 1039 priv->radioon = RADIO_ON;
1041 priv->auto_rate = 1; 1040 priv->auto_rate = 1;
1042 priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; 1041 priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;