Lines Matching refs:wdev
23 u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates) in wfx_rate_mask_to_hw() argument
28 struct ieee80211_supported_band *sband = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; in wfx_rate_mask_to_hw()
33 dev_warn(wdev->dev, "unsupported basic rate\n"); in wfx_rate_mask_to_hw()
43 struct wfx_dev *wdev = container_of(to_delayed_work(work), struct wfx_dev, in wfx_cooling_timeout_work() local
46 wdev->chip_frozen = true; in wfx_cooling_timeout_work()
47 wfx_tx_unlock(wdev); in wfx_cooling_timeout_work()
50 void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd) in wfx_suspend_hot_dev() argument
54 if (cancel_delayed_work(&wdev->cooling_timeout_work)) in wfx_suspend_hot_dev()
55 wfx_tx_unlock(wdev); in wfx_suspend_hot_dev()
58 schedule_delayed_work(&wdev->cooling_timeout_work, 10 * HZ); in wfx_suspend_hot_dev()
59 wfx_tx_lock(wdev); in wfx_suspend_hot_dev()
103 struct wfx_dev *wdev = hw->priv; in wfx_configure_filter() local
117 mutex_lock(&wdev->conf_mutex); in wfx_configure_filter()
118 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { in wfx_configure_filter()
138 dev_dbg(wdev->dev, "do not forward probe request in AP mode\n"); in wfx_configure_filter()
150 mutex_unlock(&wdev->conf_mutex); in wfx_configure_filter()
156 struct ieee80211_conf *conf = &wvif->wdev->hw->conf; in wfx_get_ps_timeout()
161 if (wdev_to_wvif(wvif->wdev, 0)) { in wfx_get_ps_timeout()
162 struct wfx_vif *wvif_ch0 = wdev_to_wvif(wvif->wdev, 0); in wfx_get_ps_timeout()
167 if (wdev_to_wvif(wvif->wdev, 1)) { in wfx_get_ps_timeout()
168 struct wfx_vif *wvif_ch1 = wdev_to_wvif(wvif->wdev, 1); in wfx_get_ps_timeout()
179 dev_info(wvif->wdev->dev, "ignoring requested PS mode"); in wfx_get_ps_timeout()
185 if (wfx_api_older_than(wvif->wdev, 3, 2)) in wfx_get_ps_timeout()
214 dev_warn(wvif->wdev->dev, "timeout while waiting of set_pm_mode_complete\n"); in wfx_update_pm()
222 struct wfx_dev *wdev = hw->priv; in wfx_conf_tx() local
228 mutex_lock(&wdev->conf_mutex); in wfx_conf_tx()
236 mutex_unlock(&wdev->conf_mutex); in wfx_conf_tx()
242 struct wfx_dev *wdev = hw->priv; in wfx_set_rts_threshold() local
245 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) in wfx_set_rts_threshold()
287 struct wfx_dev *wdev = wvif->wdev; in wfx_reset() local
289 wfx_tx_lock_flush(wdev); in wfx_reset()
292 if (wvif_count(wdev) <= 1) in wfx_reset()
294 wfx_tx_unlock(wdev); in wfx_reset()
298 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) in wfx_reset()
343 skb = ieee80211_beacon_get(wvif->wdev->hw, vif, 0); in wfx_upload_ap_templates()
349 skb = ieee80211_proberesp_get(wvif->wdev->hw, vif); in wfx_upload_ap_templates()
360 struct sk_buff *skb = ieee80211_beacon_get(wvif->wdev->hw, vif, 0); in wfx_set_mfp_ap()
386 struct wfx_dev *wdev = wvif->wdev; in wfx_start_ap() local
390 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) in wfx_start_ap()
419 wfx_tx_lock_flush(wvif->wdev); in wfx_join()
421 bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, conf->bssid, NULL, 0, in wfx_join()
424 wfx_tx_unlock(wvif->wdev); in wfx_join()
439 cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); in wfx_join()
453 wfx_tx_unlock(wvif->wdev); in wfx_join()
506 wfx_bh_request_tx(wvif->wdev); in wfx_enable_beacon()
514 struct wfx_dev *wdev = hw->priv; in wfx_bss_info_changed() local
518 mutex_lock(&wdev->conf_mutex); in wfx_bss_info_changed()
533 dev_warn(wdev->dev, "misunderstood change: ASSOC\n"); in wfx_bss_info_changed()
538 dev_warn(wdev->dev, "misunderstood change: BEACON_INFO\n"); in wfx_bss_info_changed()
581 mutex_unlock(&wdev->conf_mutex); in wfx_bss_info_changed()
591 skb = ieee80211_beacon_get_tim(wvif->wdev->hw, vif, &tim_offset, in wfx_update_tim()
623 struct wfx_dev *wdev = hw->priv; in wfx_set_tim() local
625 struct wfx_vif *wvif = wdev_to_wvif(wdev, sta_dev->vif_id); in wfx_set_tim()
628 dev_warn(wdev->dev, "%s: received event for non-existent vif\n", __func__); in wfx_set_tim()
646 while ((wvif_it = wvif_iterate(wvif->wdev, wvif_it)) != NULL) in wfx_suspend_resume_mc()
651 dev_warn(wvif->wdev->dev, "incorrect sequence (%d CAB in queue)", in wfx_suspend_resume_mc()
654 wfx_bh_request_tx(wvif->wdev); in wfx_suspend_resume_mc()
717 struct wfx_dev *wdev = hw->priv; in wfx_add_interface() local
724 mutex_lock(&wdev->conf_mutex); in wfx_add_interface()
732 mutex_unlock(&wdev->conf_mutex); in wfx_add_interface()
736 wvif->wdev = wdev; in wfx_add_interface()
753 for (i = 0; i < ARRAY_SIZE(wdev->vif); i++) { in wfx_add_interface()
754 if (!wdev->vif[i]) { in wfx_add_interface()
755 wdev->vif[i] = vif; in wfx_add_interface()
760 WARN(i == ARRAY_SIZE(wdev->vif), "try to instantiate more vif than supported"); in wfx_add_interface()
764 mutex_unlock(&wdev->conf_mutex); in wfx_add_interface()
767 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { in wfx_add_interface()
769 if (wvif_count(wdev) == 1) in wfx_add_interface()
779 struct wfx_dev *wdev = hw->priv; in wfx_remove_interface() local
785 mutex_lock(&wdev->conf_mutex); in wfx_remove_interface()
793 wdev->vif[wvif->id] = NULL; in wfx_remove_interface()
795 mutex_unlock(&wdev->conf_mutex); in wfx_remove_interface()
798 while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { in wfx_remove_interface()
800 if (wvif_count(wdev) == 1) in wfx_remove_interface()
814 struct wfx_dev *wdev = hw->priv; in wfx_stop() local
816 WARN_ON(!skb_queue_empty_lockless(&wdev->tx_pending)); in wfx_stop()