diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 651807dfb508..7579af27edbd 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -768,13 +768,23 @@ static int zd_op_config_interface(struct ieee80211_hw *hw, | |||
768 | if (!beacon) | 768 | if (!beacon) |
769 | return -ENOMEM; | 769 | return -ENOMEM; |
770 | r = zd_mac_config_beacon(hw, beacon); | 770 | r = zd_mac_config_beacon(hw, beacon); |
771 | kfree_skb(beacon); | ||
772 | |||
771 | if (r < 0) | 773 | if (r < 0) |
772 | return r; | 774 | return r; |
773 | r = zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | | 775 | } |
774 | hw->conf.beacon_int); | 776 | |
777 | if (conf->changed & IEEE80211_IFCC_BEACON_ENABLED) { | ||
778 | u32 interval; | ||
779 | |||
780 | if (conf->enable_beacon) | ||
781 | interval = BCN_MODE_IBSS | hw->conf.beacon_int; | ||
782 | else | ||
783 | interval = 0; | ||
784 | |||
785 | r = zd_set_beacon_interval(&mac->chip, interval); | ||
775 | if (r < 0) | 786 | if (r < 0) |
776 | return r; | 787 | return r; |
777 | kfree_skb(beacon); | ||
778 | } | 788 | } |
779 | } else | 789 | } else |
780 | associated = is_valid_ether_addr(conf->bssid); | 790 | associated = is_valid_ether_addr(conf->bssid); |
@@ -793,10 +803,9 @@ static void zd_process_intr(struct work_struct *work) | |||
793 | struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); | 803 | struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); |
794 | 804 | ||
795 | int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4)); | 805 | int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4)); |
796 | if (int_status & INT_CFG_NEXT_BCN) { | 806 | if (int_status & INT_CFG_NEXT_BCN) |
797 | if (net_ratelimit()) | 807 | dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); |
798 | dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); | 808 | else |
799 | } else | ||
800 | dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n"); | 809 | dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n"); |
801 | 810 | ||
802 | zd_chip_enable_hwint(&mac->chip); | 811 | zd_chip_enable_hwint(&mac->chip); |