diff options
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 29 |
1 files changed, 14 insertions, 15 deletions
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, | |||
581 | static void lbs_set_multicast_list(struct net_device *dev) | 581 | static 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; |