diff options
Diffstat (limited to 'drivers/net/wireless/silabs/wfx/sta.c')
-rw-r--r-- | drivers/net/wireless/silabs/wfx/sta.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/drivers/net/wireless/silabs/wfx/sta.c b/drivers/net/wireless/silabs/wfx/sta.c index 329d7f4a2b2e..626dfb4b7a55 100644 --- a/drivers/net/wireless/silabs/wfx/sta.c +++ b/drivers/net/wireless/silabs/wfx/sta.c @@ -156,7 +156,7 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) struct ieee80211_conf *conf = &wvif->wdev->hw->conf; struct ieee80211_vif *vif = wvif_to_vif(wvif); - WARN(!vif->bss_conf.assoc && enable_ps, + WARN(!vif->cfg.assoc && enable_ps, "enable_ps is reliable only if associated"); if (wdev_to_wvif(wvif->wdev, 0)) { struct wfx_vif *wvif_ch0 = wdev_to_wvif(wvif->wdev, 0); @@ -175,7 +175,7 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) /* It is useless to enable PS if channels are the same. */ if (enable_ps) *enable_ps = false; - if (vif->bss_conf.assoc && vif->bss_conf.ps) + if (vif->cfg.assoc && vif->cfg.ps) dev_info(wvif->wdev->dev, "ignoring requested PS mode"); return -1; } @@ -188,8 +188,8 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) return 30; } if (enable_ps) - *enable_ps = vif->bss_conf.ps; - if (vif->bss_conf.assoc && vif->bss_conf.ps) + *enable_ps = vif->cfg.ps; + if (vif->cfg.assoc && vif->cfg.ps) return conf->dynamic_ps_timeout; else return -1; @@ -201,7 +201,7 @@ int wfx_update_pm(struct wfx_vif *wvif) int ps_timeout; bool ps; - if (!vif->bss_conf.assoc) + if (!vif->cfg.assoc) return 0; ps_timeout = wfx_get_ps_timeout(wvif, &ps); if (!ps) @@ -216,7 +216,8 @@ int wfx_update_pm(struct wfx_vif *wvif) } int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - u16 queue, const struct ieee80211_tx_queue_params *params) + unsigned int link_id, u16 queue, + const struct ieee80211_tx_queue_params *params) { struct wfx_dev *wdev = hw->priv; struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; @@ -339,7 +340,7 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) struct ieee80211_vif *vif = wvif_to_vif(wvif); struct sk_buff *skb; - skb = ieee80211_beacon_get(wvif->wdev->hw, vif); + skb = ieee80211_beacon_get(wvif->wdev->hw, vif, 0); if (!skb) return -ENOMEM; wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, API_RATE_INDEX_B_1MBPS); @@ -356,7 +357,7 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) static void wfx_set_mfp_ap(struct wfx_vif *wvif) { struct ieee80211_vif *vif = wvif_to_vif(wvif); - struct sk_buff *skb = ieee80211_beacon_get(wvif->wdev->hw, vif); + struct sk_buff *skb = ieee80211_beacon_get(wvif->wdev->hw, vif, 0); const int ieoffset = offsetof(struct ieee80211_mgmt, u.beacon.variable); const u16 *ptr = (u16 *)cfg80211_find_ie(WLAN_EID_RSN, skb->data + ieoffset, skb->len - ieoffset); @@ -378,7 +379,8 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif) } } -int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; struct wfx_dev *wdev = wvif->wdev; @@ -396,7 +398,8 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) return ret; } -void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; @@ -417,7 +420,7 @@ static void wfx_join(struct wfx_vif *wvif) bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, conf->bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); - if (!bss && !conf->ibss_joined) { + if (!bss && !vif->cfg.ibss_joined) { wfx_tx_unlock(wvif->wdev); return; } @@ -458,7 +461,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *i bool greenfield = false; rcu_read_lock(); /* protect sta */ - if (info->bssid && !info->ibss_joined) + if (info->bssid && !vif->cfg.ibss_joined) sta = ieee80211_find_sta(vif, info->bssid); if (sta && sta->deflink.ht_cap.ht_supported) ampdu_density = sta->deflink.ht_cap.ampdu_density; @@ -471,7 +474,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *i wfx_hif_set_association_mode(wvif, ampdu_density, greenfield, info->use_short_preamble); wfx_hif_keep_alive_period(wvif, 0); /* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use the same value. */ - wfx_hif_set_bss_params(wvif, info->aid, 7); + wfx_hif_set_bss_params(wvif, vif->cfg.aid, 7); wfx_hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); } @@ -506,7 +509,7 @@ static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) } void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_bss_conf *info, u32 changed) + struct ieee80211_bss_conf *info, u64 changed) { struct wfx_dev *wdev = hw->priv; struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; @@ -522,9 +525,9 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } if (changed & BSS_CHANGED_ASSOC) { - if (info->assoc || info->ibss_joined) + if (vif->cfg.assoc || vif->cfg.ibss_joined) wfx_join_finalize(wvif, info); - else if (!info->assoc && vif->type == NL80211_IFTYPE_STATION) + else if (!vif->cfg.assoc && vif->type == NL80211_IFTYPE_STATION) wfx_reset(wvif); else dev_warn(wdev->dev, "misunderstood change: ASSOC\n"); @@ -540,11 +543,11 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (changed & BSS_CHANGED_ARP_FILTER) { for (i = 0; i < HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES; i++) { - __be32 *arp_addr = &info->arp_addr_list[i]; + __be32 *arp_addr = &vif->cfg.arp_addr_list[i]; - if (info->arp_addr_cnt > HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES) + if (vif->cfg.arp_addr_cnt > HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES) arp_addr = NULL; - if (i >= info->arp_addr_cnt) + if (i >= vif->cfg.arp_addr_cnt) arp_addr = NULL; wfx_hif_set_arp_ipv4_filter(wvif, i, arp_addr); } @@ -586,7 +589,7 @@ static int wfx_update_tim(struct wfx_vif *wvif) u8 *tim_ptr; skb = ieee80211_beacon_get_tim(wvif->wdev->hw, vif, &tim_offset, - &tim_length); + &tim_length, 0); if (!skb) return -ENOENT; tim_ptr = skb->data + tim_offset; @@ -680,6 +683,7 @@ void wfx_change_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf * } int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; @@ -692,6 +696,7 @@ int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; |