Lines Matching refs:wl
169 static int b43legacy_ratelimit(struct b43legacy_wl *wl) in b43legacy_ratelimit() argument
171 if (!wl || !wl->current_dev) in b43legacy_ratelimit()
173 if (b43legacy_status(wl->current_dev) < B43legacy_STAT_STARTED) in b43legacy_ratelimit()
180 void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...) in b43legacyinfo() argument
185 if (!b43legacy_ratelimit(wl)) in b43legacyinfo()
194 (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); in b43legacyinfo()
199 void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...) in b43legacyerr() argument
204 if (!b43legacy_ratelimit(wl)) in b43legacyerr()
213 (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); in b43legacyerr()
218 void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...) in b43legacywarn() argument
223 if (!b43legacy_ratelimit(wl)) in b43legacywarn()
232 (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); in b43legacywarn()
238 void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...) in b43legacydbg() argument
249 (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf); in b43legacydbg()
555 const u8 *mac = dev->wl->mac_addr; in b43legacy_write_mac_bssid_templates()
556 const u8 *bssid = dev->wl->bssid; in b43legacy_write_mac_bssid_templates()
587 dev->wl->mac_addr); in b43legacy_upload_card_macaddress()
885 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP)) { in handle_irq_tbtt_indication()
891 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) in handle_irq_tbtt_indication()
978 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(dev->wl->current_beacon); in b43legacy_write_beacon_template()
980 bcn = (const struct ieee80211_mgmt *)(dev->wl->current_beacon->data); in b43legacy_write_beacon_template()
981 len = min_t(size_t, dev->wl->current_beacon->len, in b43legacy_write_beacon_template()
983 rate = ieee80211_get_tx_rate(dev->wl->hw, info)->hw_value; in b43legacy_write_beacon_template()
1040 b43legacywarn(dev->wl, "Did not find a valid TIM IE in the " in b43legacy_write_beacon_template()
1044 b43legacydbg(dev->wl, "Updated beacon template\n"); in b43legacy_write_beacon_template()
1057 dur = ieee80211_generic_frame_duration(dev->wl->hw, in b43legacy_write_probe_resp_plcp()
1058 dev->wl->vif, in b43legacy_write_probe_resp_plcp()
1089 src_size = dev->wl->current_beacon->len; in b43legacy_generate_probe_resp()
1090 src_data = (const u8 *)dev->wl->current_beacon->data; in b43legacy_generate_probe_resp()
1123 dur = ieee80211_generic_frame_duration(dev->wl->hw, in b43legacy_generate_probe_resp()
1124 dev->wl->vif, in b43legacy_generate_probe_resp()
1141 size = dev->wl->current_beacon->len; in b43legacy_write_probe_resp_template()
1168 struct b43legacy_wl *wl = dev->wl; in b43legacy_upload_beacon0() local
1170 if (wl->beacon0_uploaded) in b43legacy_upload_beacon0()
1177 wl->beacon0_uploaded = true; in b43legacy_upload_beacon0()
1182 struct b43legacy_wl *wl = dev->wl; in b43legacy_upload_beacon1() local
1184 if (wl->beacon1_uploaded) in b43legacy_upload_beacon1()
1187 wl->beacon1_uploaded = true; in b43legacy_upload_beacon1()
1192 struct b43legacy_wl *wl = dev->wl; in handle_irq_beacon() local
1195 if (!b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) in handle_irq_beacon()
1214 if (unlikely(wl->beacon_templates_virgin)) { in handle_irq_beacon()
1217 wl->beacon_templates_virgin = false; in handle_irq_beacon()
1240 struct b43legacy_wl *wl = container_of(work, struct b43legacy_wl, in b43legacy_beacon_update_trigger_work() local
1244 mutex_lock(&wl->mutex); in b43legacy_beacon_update_trigger_work()
1245 dev = wl->current_dev; in b43legacy_beacon_update_trigger_work()
1247 spin_lock_irq(&wl->irq_lock); in b43legacy_beacon_update_trigger_work()
1254 spin_unlock_irq(&wl->irq_lock); in b43legacy_beacon_update_trigger_work()
1256 mutex_unlock(&wl->mutex); in b43legacy_beacon_update_trigger_work()
1261 static void b43legacy_update_templates(struct b43legacy_wl *wl) in b43legacy_update_templates() argument
1273 beacon = ieee80211_beacon_get(wl->hw, wl->vif); in b43legacy_update_templates()
1277 if (wl->current_beacon) in b43legacy_update_templates()
1278 dev_kfree_skb_any(wl->current_beacon); in b43legacy_update_templates()
1279 wl->current_beacon = beacon; in b43legacy_update_templates()
1280 wl->beacon0_uploaded = false; in b43legacy_update_templates()
1281 wl->beacon1_uploaded = false; in b43legacy_update_templates()
1282 ieee80211_queue_work(wl->hw, &wl->beacon_update_trigger); in b43legacy_update_templates()
1299 b43legacydbg(dev->wl, "Set beacon interval to %u\n", beacon_int); in b43legacy_set_beacon_int()
1315 spin_lock_irqsave(&dev->wl->irq_lock, flags); in b43legacy_interrupt_tasklet()
1327 b43legacyerr(dev->wl, "MAC transmission error\n"); in b43legacy_interrupt_tasklet()
1330 b43legacyerr(dev->wl, "PHY transmission error\n"); in b43legacy_interrupt_tasklet()
1333 b43legacyerr(dev->wl, "Too many PHY TX errors, " in b43legacy_interrupt_tasklet()
1342 b43legacyerr(dev->wl, "Fatal DMA error: " in b43legacy_interrupt_tasklet()
1350 spin_unlock_irqrestore(&dev->wl->irq_lock, flags); in b43legacy_interrupt_tasklet()
1354 b43legacyerr(dev->wl, "DMA error: " in b43legacy_interrupt_tasklet()
1400 spin_unlock_irqrestore(&dev->wl->irq_lock, flags); in b43legacy_interrupt_tasklet()
1452 spin_lock(&dev->wl->irq_lock); in b43legacy_interrupt_handler()
1492 spin_unlock(&dev->wl->irq_lock); in b43legacy_interrupt_handler()
1509 static void b43legacy_print_fw_helptext(struct b43legacy_wl *wl) in b43legacy_print_fw_helptext() argument
1511 b43legacyerr(wl, "You must go to http://wireless.kernel.org/en/users/" in b43legacy_print_fw_helptext()
1539 b43legacyinfo(dev->wl, "Loading firmware %s\n", path); in do_request_fw()
1546 b43legacyerr(dev->wl, "Unable to load firmware\n"); in do_request_fw()
1558 b43legacyerr(dev->wl, "Firmware file \"%s\" not found " in do_request_fw()
1583 b43legacyerr(dev->wl, "Firmware file \"%s\" format error.\n", path); in do_request_fw()
1588 struct b43legacy_wl *wl);
1593 struct b43legacy_wl *wl = container_of(work, in b43legacy_request_firmware() local
1595 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_request_firmware()
1659 err = ieee80211_register_hw(wl->hw); in b43legacy_request_firmware()
1669 b43legacy_print_fw_helptext(dev->wl); in b43legacy_request_firmware()
1674 b43legacyerr(dev->wl, "No Initial Values firmware file for PHY %u, " in b43legacy_request_firmware()
1685 struct wiphy *wiphy = dev->wl->hw->wiphy; in b43legacy_upload_microcode()
1753 b43legacyerr(dev->wl, "Microcode not responding\n"); in b43legacy_upload_microcode()
1754 b43legacy_print_fw_helptext(dev->wl); in b43legacy_upload_microcode()
1778 b43legacyerr(dev->wl, "YOU ARE TRYING TO LOAD V4 FIRMWARE." in b43legacy_upload_microcode()
1782 b43legacy_print_fw_helptext(dev->wl); in b43legacy_upload_microcode()
1786 b43legacyinfo(dev->wl, "Loading firmware version 0x%X, patch level %u " in b43legacy_upload_microcode()
1865 b43legacyerr(dev->wl, "Initial Values Firmware file-format error.\n"); in b43legacy_write_initvals()
1866 b43legacy_print_fw_helptext(dev->wl); in b43legacy_write_initvals()
1987 spin_lock_irq(&dev->wl->irq_lock); in b43legacy_mac_enable()
1990 spin_unlock_irq(&dev->wl->irq_lock); in b43legacy_mac_enable()
2007 spin_lock_irq(&dev->wl->irq_lock); in b43legacy_mac_suspend()
2009 spin_unlock_irq(&dev->wl->irq_lock); in b43legacy_mac_suspend()
2025 b43legacyerr(dev->wl, "MAC suspend failed\n"); in b43legacy_mac_suspend()
2033 struct b43legacy_wl *wl = dev->wl; in b43legacy_adjust_opmode() local
2047 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) in b43legacy_adjust_opmode()
2049 else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) in b43legacy_adjust_opmode()
2052 if (wl->filter_flags & FIF_CONTROL) in b43legacy_adjust_opmode()
2054 if (wl->filter_flags & FIF_FCSFAIL) in b43legacy_adjust_opmode()
2056 if (wl->filter_flags & FIF_PLCPFAIL) in b43legacy_adjust_opmode()
2058 if (wl->filter_flags & FIF_PROMISC_IN_BSS) in b43legacy_adjust_opmode()
2060 if (wl->filter_flags & FIF_BCN_PRBRESP_PROMISC) in b43legacy_adjust_opmode()
2280 b43legacydbg(dev->wl, "Chip initialized\n"); in b43legacy_chip_init()
2350 struct b43legacy_wl *wl = dev->wl; in b43legacy_periodic_work_handler() local
2353 mutex_lock(&wl->mutex); in b43legacy_periodic_work_handler()
2368 ieee80211_queue_delayed_work(wl->hw, &dev->periodic_work, delay); in b43legacy_periodic_work_handler()
2370 mutex_unlock(&wl->mutex); in b43legacy_periodic_work_handler()
2379 ieee80211_queue_delayed_work(dev->wl->hw, work, 0); in b43legacy_periodic_tasks_setup()
2410 b43legacyerr(dev->wl, "Failed to validate the chipaccess\n"); in b43legacy_validate_chipaccess()
2433 struct b43legacy_wl *wl = (struct b43legacy_wl *)rng->priv; in b43legacy_rng_read() local
2440 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_rng_read()
2441 *data = b43legacy_read16(wl->current_dev, B43legacy_MMIO_RNG); in b43legacy_rng_read()
2442 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_rng_read()
2448 static void b43legacy_rng_exit(struct b43legacy_wl *wl) in b43legacy_rng_exit() argument
2451 if (wl->rng_initialized) in b43legacy_rng_exit()
2452 hwrng_unregister(&wl->rng); in b43legacy_rng_exit()
2456 static int b43legacy_rng_init(struct b43legacy_wl *wl) in b43legacy_rng_init() argument
2461 snprintf(wl->rng_name, ARRAY_SIZE(wl->rng_name), in b43legacy_rng_init()
2462 "%s_%s", KBUILD_MODNAME, wiphy_name(wl->hw->wiphy)); in b43legacy_rng_init()
2463 wl->rng.name = wl->rng_name; in b43legacy_rng_init()
2464 wl->rng.data_read = b43legacy_rng_read; in b43legacy_rng_init()
2465 wl->rng.priv = (unsigned long)wl; in b43legacy_rng_init()
2466 wl->rng_initialized = 1; in b43legacy_rng_init()
2467 err = hwrng_register(&wl->rng); in b43legacy_rng_init()
2469 wl->rng_initialized = 0; in b43legacy_rng_init()
2470 b43legacyerr(wl, "Failed to register the random " in b43legacy_rng_init()
2480 struct b43legacy_wl *wl = container_of(work, struct b43legacy_wl, in b43legacy_tx_work() local
2487 mutex_lock(&wl->mutex); in b43legacy_tx_work()
2488 dev = wl->current_dev; in b43legacy_tx_work()
2490 mutex_unlock(&wl->mutex); in b43legacy_tx_work()
2495 while (skb_queue_len(&wl->tx_queue[queue_num])) { in b43legacy_tx_work()
2496 skb = skb_dequeue(&wl->tx_queue[queue_num]); in b43legacy_tx_work()
2502 wl->tx_queue_stopped[queue_num] = 1; in b43legacy_tx_work()
2503 ieee80211_stop_queue(wl->hw, queue_num); in b43legacy_tx_work()
2504 skb_queue_head(&wl->tx_queue[queue_num], skb); in b43legacy_tx_work()
2513 wl->tx_queue_stopped[queue_num] = 0; in b43legacy_tx_work()
2516 mutex_unlock(&wl->mutex); in b43legacy_tx_work()
2523 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_tx() local
2532 skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); in b43legacy_op_tx()
2533 if (!wl->tx_queue_stopped[skb->queue_mapping]) in b43legacy_op_tx()
2534 ieee80211_queue_work(wl->hw, &wl->tx_work); in b43legacy_op_tx()
2536 ieee80211_stop_queue(wl->hw, skb->queue_mapping); in b43legacy_op_tx()
2549 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_get_stats() local
2552 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_get_stats()
2553 memcpy(stats, &wl->ieee_stats, sizeof(*stats)); in b43legacy_op_get_stats()
2554 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_get_stats()
2572 static int find_wldev_for_phymode(struct b43legacy_wl *wl, in find_wldev_for_phymode() argument
2579 list_for_each_entry(d, &wl->devlist, list) { in find_wldev_for_phymode()
2613 static int b43legacy_switch_phymode(struct b43legacy_wl *wl, in b43legacy_switch_phymode() argument
2622 err = find_wldev_for_phymode(wl, new_mode, &up_dev, &gmode); in b43legacy_switch_phymode()
2624 b43legacyerr(wl, "Could not find a device for %s-PHY mode\n", in b43legacy_switch_phymode()
2628 if ((up_dev == wl->current_dev) && in b43legacy_switch_phymode()
2629 (!!wl->current_dev->phy.gmode == !!gmode)) in b43legacy_switch_phymode()
2632 b43legacydbg(wl, "Reconfiguring PHYmode to %s-PHY\n", in b43legacy_switch_phymode()
2634 down_dev = wl->current_dev; in b43legacy_switch_phymode()
2653 b43legacyerr(wl, "Fatal: Could not initialize device" in b43legacy_switch_phymode()
2662 b43legacyerr(wl, "Fatal: Could not start device for " in b43legacy_switch_phymode()
2673 wl->current_dev = up_dev; in b43legacy_switch_phymode()
2678 wl->current_dev = NULL; in b43legacy_switch_phymode()
2699 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_dev_config() local
2710 mutex_lock(&wl->mutex); in b43legacy_op_dev_config()
2711 dev = wl->current_dev; in b43legacy_op_dev_config()
2733 err = b43legacy_switch_phymode(wl, new_phymode); in b43legacy_op_dev_config()
2740 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_dev_config()
2742 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_dev_config()
2746 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_dev_config()
2755 dev->wl->radiotap_enabled = !!(conf->flags & IEEE80211_CONF_MONITOR); in b43legacy_op_dev_config()
2768 if (wl->radio_enabled != phy->radio_on) { in b43legacy_op_dev_config()
2769 if (wl->radio_enabled) { in b43legacy_op_dev_config()
2771 b43legacyinfo(dev->wl, "Radio turned on by software\n"); in b43legacy_op_dev_config()
2773 b43legacyinfo(dev->wl, "The hardware RF-kill" in b43legacy_op_dev_config()
2779 b43legacyinfo(dev->wl, "Radio turned off by" in b43legacy_op_dev_config()
2784 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_dev_config()
2787 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_dev_config()
2789 mutex_unlock(&wl->mutex); in b43legacy_op_dev_config()
2797 dev->wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]; in b43legacy_update_basic_rates()
2844 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_bss_info_changed() local
2848 mutex_lock(&wl->mutex); in b43legacy_op_bss_info_changed()
2849 B43legacy_WARN_ON(wl->vif != vif); in b43legacy_op_bss_info_changed()
2851 dev = wl->current_dev; in b43legacy_op_bss_info_changed()
2856 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_bss_info_changed()
2858 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_bss_info_changed()
2867 memcpy(wl->bssid, conf->bssid, ETH_ALEN); in b43legacy_op_bss_info_changed()
2869 eth_zero_addr(wl->bssid); in b43legacy_op_bss_info_changed()
2874 (b43legacy_is_mode(wl, NL80211_IFTYPE_AP) || in b43legacy_op_bss_info_changed()
2875 b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC))) in b43legacy_op_bss_info_changed()
2876 b43legacy_update_templates(wl); in b43legacy_op_bss_info_changed()
2881 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_bss_info_changed()
2886 (b43legacy_is_mode(wl, NL80211_IFTYPE_AP) || in b43legacy_op_bss_info_changed()
2887 b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC))) in b43legacy_op_bss_info_changed()
2902 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_bss_info_changed()
2906 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_bss_info_changed()
2908 mutex_unlock(&wl->mutex); in b43legacy_op_bss_info_changed()
2915 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_configure_filter() local
2916 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_op_configure_filter()
2924 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_configure_filter()
2941 wl->filter_flags = *fflags; in b43legacy_op_configure_filter()
2945 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_configure_filter()
2951 struct b43legacy_wl *wl = dev->wl; in b43legacy_wireless_core_stop() local
2961 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_wireless_core_stop()
2964 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_wireless_core_stop()
2969 mutex_unlock(&wl->mutex); in b43legacy_wireless_core_stop()
2973 cancel_work_sync(&wl->tx_work); in b43legacy_wireless_core_stop()
2974 mutex_lock(&wl->mutex); in b43legacy_wireless_core_stop()
2978 while (skb_queue_len(&wl->tx_queue[queue_num])) in b43legacy_wireless_core_stop()
2979 dev_kfree_skb(skb_dequeue(&wl->tx_queue[queue_num])); in b43legacy_wireless_core_stop()
2984 b43legacydbg(wl, "Wireless interface stopped\n"); in b43legacy_wireless_core_stop()
2998 b43legacyerr(dev->wl, "Cannot request IRQ-%d\n", in b43legacy_wireless_core_start()
3003 ieee80211_wake_queues(dev->wl->hw); in b43legacy_wireless_core_start()
3013 b43legacydbg(dev->wl, "Wireless interface started\n"); in b43legacy_wireless_core_start()
3051 b43legacyerr(dev->wl, "FOUND UNSUPPORTED PHY " in b43legacy_phy_versioning()
3056 b43legacydbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n", in b43legacy_phy_versioning()
3093 b43legacyerr(dev->wl, "FOUND UNSUPPORTED RADIO " in b43legacy_phy_versioning()
3098 b43legacydbg(dev->wl, "Found Radio: Manuf 0x%X, Version 0x%X," in b43legacy_phy_versioning()
3183 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle) in b43legacy_set_synth_pu_delay()
3198 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) in b43legacy_set_pretbtt()
3226 b43legacy_rng_exit(dev->wl); in b43legacy_wireless_core_exit()
3236 if (dev->wl->current_beacon) { in b43legacy_wireless_core_exit()
3237 dev_kfree_skb_any(dev->wl->current_beacon); in b43legacy_wireless_core_exit()
3238 dev->wl->current_beacon = NULL; in b43legacy_wireless_core_exit()
3287 struct b43legacy_wl *wl = dev->wl; in b43legacy_wireless_core_init() local
3390 b43legacy_rng_init(wl); in b43legacy_wireless_core_init()
3392 ieee80211_wake_queues(dev->wl->hw); in b43legacy_wireless_core_init()
3415 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_add_interface() local
3428 mutex_lock(&wl->mutex); in b43legacy_op_add_interface()
3429 if (wl->operating) in b43legacy_op_add_interface()
3432 b43legacydbg(wl, "Adding Interface type %d\n", vif->type); in b43legacy_op_add_interface()
3434 dev = wl->current_dev; in b43legacy_op_add_interface()
3435 wl->operating = true; in b43legacy_op_add_interface()
3436 wl->vif = vif; in b43legacy_op_add_interface()
3437 wl->if_type = vif->type; in b43legacy_op_add_interface()
3438 memcpy(wl->mac_addr, vif->addr, ETH_ALEN); in b43legacy_op_add_interface()
3440 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_add_interface()
3445 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_add_interface()
3449 mutex_unlock(&wl->mutex); in b43legacy_op_add_interface()
3457 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_remove_interface() local
3458 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_op_remove_interface()
3461 b43legacydbg(wl, "Removing Interface type %d\n", vif->type); in b43legacy_op_remove_interface()
3463 mutex_lock(&wl->mutex); in b43legacy_op_remove_interface()
3465 B43legacy_WARN_ON(!wl->operating); in b43legacy_op_remove_interface()
3466 B43legacy_WARN_ON(wl->vif != vif); in b43legacy_op_remove_interface()
3467 wl->vif = NULL; in b43legacy_op_remove_interface()
3469 wl->operating = false; in b43legacy_op_remove_interface()
3471 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_remove_interface()
3473 eth_zero_addr(wl->mac_addr); in b43legacy_op_remove_interface()
3475 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_remove_interface()
3477 mutex_unlock(&wl->mutex); in b43legacy_op_remove_interface()
3482 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_start() local
3483 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_op_start()
3490 eth_zero_addr(wl->bssid); in b43legacy_op_start()
3491 eth_zero_addr(wl->mac_addr); in b43legacy_op_start()
3492 wl->filter_flags = 0; in b43legacy_op_start()
3493 wl->beacon0_uploaded = false; in b43legacy_op_start()
3494 wl->beacon1_uploaded = false; in b43legacy_op_start()
3495 wl->beacon_templates_virgin = true; in b43legacy_op_start()
3496 wl->radio_enabled = true; in b43legacy_op_start()
3498 mutex_lock(&wl->mutex); in b43legacy_op_start()
3519 mutex_unlock(&wl->mutex); in b43legacy_op_start()
3526 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_stop() local
3527 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_op_stop()
3529 cancel_work_sync(&(wl->beacon_update_trigger)); in b43legacy_op_stop()
3531 mutex_lock(&wl->mutex); in b43legacy_op_stop()
3535 wl->radio_enabled = false; in b43legacy_op_stop()
3536 mutex_unlock(&wl->mutex); in b43legacy_op_stop()
3542 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_beacon_set_tim() local
3545 spin_lock_irqsave(&wl->irq_lock, flags); in b43legacy_op_beacon_set_tim()
3546 b43legacy_update_templates(wl); in b43legacy_op_beacon_set_tim()
3547 spin_unlock_irqrestore(&wl->irq_lock, flags); in b43legacy_op_beacon_set_tim()
3555 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); in b43legacy_op_get_survey() local
3556 struct b43legacy_wldev *dev = wl->current_dev; in b43legacy_op_get_survey()
3592 struct b43legacy_wl *wl = dev->wl; in b43legacy_chip_reset() local
3596 mutex_lock(&wl->mutex); in b43legacy_chip_reset()
3620 wl->current_dev = NULL; /* Failed to init the dev. */ in b43legacy_chip_reset()
3621 mutex_unlock(&wl->mutex); in b43legacy_chip_reset()
3623 b43legacyerr(wl, "Controller restart FAILED\n"); in b43legacy_chip_reset()
3625 b43legacyinfo(wl, "Controller restarted\n"); in b43legacy_chip_reset()
3632 struct ieee80211_hw *hw = dev->wl->hw; in b43legacy_setup_modes()
3660 struct b43legacy_wl *wl = dev->wl; in b43legacy_wireless_core_attach() local
3677 b43legacyerr(wl, "Bus powerup failed\n"); in b43legacy_wireless_core_attach()
3732 if (!wl->current_dev) in b43legacy_wireless_core_attach()
3733 wl->current_dev = dev; in b43legacy_wireless_core_attach()
3752 struct b43legacy_wl *wl; in b43legacy_one_core_detach() local
3758 wl = wldev->wl; in b43legacy_one_core_detach()
3762 wl->nr_devs--; in b43legacy_one_core_detach()
3768 struct b43legacy_wl *wl) in b43legacy_one_core_attach() argument
3778 wldev->wl = wl; in b43legacy_one_core_attach()
3792 list_add(&wldev->list, &wl->devlist); in b43legacy_one_core_attach()
3793 wl->nr_devs++; in b43legacy_one_core_attach()
3814 struct b43legacy_wl *wl) in b43legacy_wireless_exit() argument
3816 struct ieee80211_hw *hw = wl->hw; in b43legacy_wireless_exit()
3826 struct b43legacy_wl *wl; in b43legacy_wireless_init() local
3832 hw = ieee80211_alloc_hw(sizeof(*wl), &b43legacy_hw_ops); in b43legacy_wireless_init()
3855 wl = hw_to_b43legacy_wl(hw); in b43legacy_wireless_init()
3856 memset(wl, 0, sizeof(*wl)); in b43legacy_wireless_init()
3857 wl->hw = hw; in b43legacy_wireless_init()
3858 spin_lock_init(&wl->irq_lock); in b43legacy_wireless_init()
3859 spin_lock_init(&wl->leds_lock); in b43legacy_wireless_init()
3860 mutex_init(&wl->mutex); in b43legacy_wireless_init()
3861 INIT_LIST_HEAD(&wl->devlist); in b43legacy_wireless_init()
3862 INIT_WORK(&wl->beacon_update_trigger, b43legacy_beacon_update_trigger_work); in b43legacy_wireless_init()
3863 INIT_WORK(&wl->tx_work, b43legacy_tx_work); in b43legacy_wireless_init()
3867 skb_queue_head_init(&wl->tx_queue[queue_num]); in b43legacy_wireless_init()
3868 wl->tx_queue_stopped[queue_num] = 0; in b43legacy_wireless_init()
3871 ssb_set_devtypedata(dev, wl); in b43legacy_wireless_init()
3872 b43legacyinfo(wl, "Broadcom %04X WLAN found (core revision %u)\n", in b43legacy_wireless_init()
3882 struct b43legacy_wl *wl; in b43legacy_probe() local
3886 wl = ssb_get_devtypedata(dev); in b43legacy_probe()
3887 if (!wl) { in b43legacy_probe()
3893 wl = ssb_get_devtypedata(dev); in b43legacy_probe()
3894 B43legacy_WARN_ON(!wl); in b43legacy_probe()
3896 err = b43legacy_one_core_attach(dev, wl); in b43legacy_probe()
3901 INIT_WORK(&wl->firmware_load, b43legacy_request_firmware); in b43legacy_probe()
3902 schedule_work(&wl->firmware_load); in b43legacy_probe()
3909 b43legacy_wireless_exit(dev, wl); in b43legacy_probe()
3915 struct b43legacy_wl *wl = ssb_get_devtypedata(dev); in b43legacy_remove() local
3921 cancel_work_sync(&wl->firmware_load); in b43legacy_remove()
3924 B43legacy_WARN_ON(!wl); in b43legacy_remove()
3927 if (wl->current_dev == wldev) in b43legacy_remove()
3928 ieee80211_unregister_hw(wl->hw); in b43legacy_remove()
3932 if (list_empty(&wl->devlist)) in b43legacy_remove()
3936 b43legacy_wireless_exit(dev, wl); in b43legacy_remove()
3946 b43legacyinfo(dev->wl, "Controller RESET (%s) ...\n", reason); in b43legacy_controller_restart()
3947 ieee80211_queue_work(dev->wl->hw, &dev->restart_work); in b43legacy_controller_restart()
3955 struct b43legacy_wl *wl = wldev->wl; in b43legacy_suspend() local
3957 b43legacydbg(wl, "Suspending...\n"); in b43legacy_suspend()
3959 mutex_lock(&wl->mutex); in b43legacy_suspend()
3965 mutex_unlock(&wl->mutex); in b43legacy_suspend()
3967 b43legacydbg(wl, "Device suspended.\n"); in b43legacy_suspend()
3975 struct b43legacy_wl *wl = wldev->wl; in b43legacy_resume() local
3978 b43legacydbg(wl, "Resuming...\n"); in b43legacy_resume()
3980 mutex_lock(&wl->mutex); in b43legacy_resume()
3984 b43legacyerr(wl, "Resume failed at core init\n"); in b43legacy_resume()
3992 b43legacyerr(wl, "Resume failed at core start\n"); in b43legacy_resume()
3997 b43legacydbg(wl, "Device resumed.\n"); in b43legacy_resume()
3999 mutex_unlock(&wl->mutex); in b43legacy_resume()