void ath9k_deinit_device(struct ath_softc *sc) { struct ieee80211_hw *hw = sc->hw; ath9k_ps_wakeup(sc); wiphy_rfkill_stop_polling(sc->hw->wiphy); ath_deinit_leds(sc); ath9k_ps_restore(sc); ieee80211_unregister_hw(hw); ath_rx_cleanup(sc); ath_tx_cleanup(sc); ath9k_deinit_softc(sc); }
/* * called from both kernel as from this kernel module (error flow on attach) * precondition: perimeter lock is not acquired. */ static void brcms_remove(struct bcma_device *pdev) { struct ieee80211_hw *hw = bcma_get_drvdata(pdev); struct brcms_info *wl = hw->priv; if (wl->wlc) { wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, false); wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); ieee80211_unregister_hw(hw); } brcms_free(wl); bcma_set_drvdata(pdev, NULL); ieee80211_free_hw(hw); }
static int wl_ops_start(struct ieee80211_hw *hw) { struct wl_info *wl = hw->priv; bool blocked; /* struct ieee80211_channel *curchan = hw->conf.channel; */ ieee80211_wake_queues(hw); WL_LOCK(wl); blocked = wl_rfkill_set_hw_state(wl); WL_UNLOCK(wl); if (!blocked) wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); return 0; }
static int brcms_ops_start(struct ieee80211_hw *hw) { struct brcms_info *wl = hw->priv; bool blocked; int err; ieee80211_wake_queues(hw); spin_lock_bh(&wl->lock); blocked = brcms_rfkill_set_hw_state(wl); spin_unlock_bh(&wl->lock); if (!blocked) wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); if (!wl->ucode.bcm43xx_bomminor) { err = brcms_request_fw(wl, wl->wlc->hw->d11core); if (err) { brcms_remove(wl->wlc->hw->d11core); return -ENOENT; } } spin_lock_bh(&wl->lock); /* avoid acknowledging frames before a non-monitor device is added */ wl->mute_tx = true; if (!wl->pub->up) if (!blocked) err = brcms_up(wl); else err = -ERFKILL; else err = -ENODEV; spin_unlock_bh(&wl->lock); if (err != 0) brcms_err(wl->wlc->hw->d11core, "%s: brcms_up() returned %d\n", __func__, err); bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, true); return err; }
/* ======================================================================== Routine Description: UnRegister MAC80211 Module. Arguments: pCB - CFG80211 control block pointer pNetDev - Network device Return Value: NONE Note: ======================================================================== */ VOID CFG80211OS_UnRegister(VOID *pCB, VOID *pNetDevOrg) { struct mt7612u_cfg80211_cb *pCfg80211_CB = (struct mt7612u_cfg80211_cb *)pCB; struct net_device *pNetDev = (struct net_device *)pNetDevOrg; /* unregister */ if (pCfg80211_CB->pCfg80211_Wdev != NULL) { DBGPRINT(RT_DEBUG_ERROR, ("80211> unregister/free wireless device\n")); /* Must unregister, or you will suffer problem when you change regulatory domain by using iw. */ #ifdef RFKILL_HW_SUPPORT wiphy_rfkill_stop_polling(pCfg80211_CB->pCfg80211_Wdev->wiphy); #endif /* RFKILL_HW_SUPPORT */ wiphy_unregister(pCfg80211_CB->pCfg80211_Wdev->wiphy); wiphy_free(pCfg80211_CB->pCfg80211_Wdev->wiphy); kfree(pCfg80211_CB->pCfg80211_Wdev); if (pCfg80211_CB->pCfg80211_Channels != NULL) kfree(pCfg80211_CB->pCfg80211_Channels); if (pCfg80211_CB->pCfg80211_Rates != NULL) kfree(pCfg80211_CB->pCfg80211_Rates); pCfg80211_CB->pCfg80211_Wdev = NULL; pCfg80211_CB->pCfg80211_Channels = NULL; pCfg80211_CB->pCfg80211_Rates = NULL; /* must reset to NULL; or kernel will panic in unregister_netdev */ pNetDev->ieee80211_ptr = NULL; SET_NETDEV_DEV(pNetDev, NULL); } kfree(pCfg80211_CB); }
/* * called from both kernel as from this kernel module. * precondition: perimeter lock is not acquired. */ static void brcms_remove(struct pci_dev *pdev) { struct brcms_info *wl; struct ieee80211_hw *hw; int status; hw = pci_get_drvdata(pdev); wl = HW_TO_WL(hw); if (!wl) { pr_err("wl: brcms_remove: pci_get_drvdata failed\n"); return; } LOCK(wl); status = brcms_c_chipmatch(pdev->vendor, pdev->device); UNLOCK(wl); if (!status) { wiphy_err(wl->wiphy, "wl: brcms_remove: chipmatch " "failed\n"); return; } if (wl->wlc) { wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, false); wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); ieee80211_unregister_hw(hw); LOCK(wl); brcms_down(wl); UNLOCK(wl); } pci_disable_device(pdev); brcms_free(wl); pci_set_drvdata(pdev, NULL); ieee80211_free_hw(hw); }
/* * called from both kernel as from wl_*() * precondition: perimeter lock is not acquired. */ static void wl_remove(struct pci_dev *pdev) { struct wl_info *wl; struct ieee80211_hw *hw; int status; hw = pci_get_drvdata(pdev); wl = HW_TO_WL(hw); if (!wl) { WL_ERROR("wl: wl_remove: pci_get_drvdata failed\n"); return; } WL_LOCK(wl); status = wlc_chipmatch(pdev->vendor, pdev->device); WL_UNLOCK(wl); if (!status) { WL_ERROR("wl: wl_remove: wlc_chipmatch failed\n"); return; } if (wl->wlc) { wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, false); wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); ieee80211_unregister_hw(hw); WL_LOCK(wl); wl_down(wl); WL_UNLOCK(wl); WL_NONE("%s: Down\n", __func__); } pci_disable_device(pdev); wl_free(wl); pci_set_drvdata(pdev, NULL); ieee80211_free_hw(hw); }
void rtl_deinit_rfkill(struct ieee80211_hw *hw) { wiphy_rfkill_stop_polling(hw->wiphy); }
void rtl8187_rfkill_exit(struct ieee80211_hw *hw) { wiphy_rfkill_stop_polling(hw->wiphy); }