diff options
Diffstat (limited to 'drivers/net/wireless/st/cw1200/sta.c')
-rw-r--r-- | drivers/net/wireless/st/cw1200/sta.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c index 321df124d449..26d3614519b1 100644 --- a/drivers/net/wireless/st/cw1200/sta.c +++ b/drivers/net/wireless/st/cw1200/sta.c @@ -606,7 +606,8 @@ void cw1200_configure_filter(struct ieee80211_hw *dev, } int cw1200_conf_tx(struct ieee80211_hw *dev, 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 cw1200_common *priv = dev->priv; int ret = 0; @@ -1208,8 +1209,8 @@ static void cw1200_do_join(struct cw1200_common *priv) struct cfg80211_bss *bss = NULL; struct wsm_protected_mgmt_policy mgmt_policy; struct wsm_join join = { - .mode = conf->ibss_joined ? - WSM_JOIN_MODE_IBSS : WSM_JOIN_MODE_BSS, + .mode = priv->vif->cfg.ibss_joined ? + WSM_JOIN_MODE_IBSS : WSM_JOIN_MODE_BSS, .preamble_type = WSM_JOIN_PREAMBLE_LONG, .probe_for_join = 1, .atim_window = 0, @@ -1230,7 +1231,7 @@ static void cw1200_do_join(struct cw1200_common *priv) bss = cfg80211_get_bss(priv->hw->wiphy, priv->channel, bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); - if (!bss && !conf->ibss_joined) { + if (!bss && !priv->vif->cfg.ibss_joined) { wsm_unlock_tx(priv); return; } @@ -1284,7 +1285,7 @@ static void cw1200_do_join(struct cw1200_common *priv) join.bssid, join.dtim_period, priv->beacon_int); - if (!conf->ibss_joined) { + if (!priv->vif->cfg.ibss_joined) { const u8 *ssidie; rcu_read_lock(); ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); @@ -1302,7 +1303,7 @@ static void cw1200_do_join(struct cw1200_common *priv) } /* Enable asynchronous join calls */ - if (!conf->ibss_joined) { + if (!priv->vif->cfg.ibss_joined) { join.flags |= WSM_JOIN_FLAGS_FORCE; join.flags |= WSM_JOIN_FLAGS_FORCE_WITH_COMPLETE_IND; } @@ -1671,7 +1672,7 @@ static int cw1200_set_tim_impl(struct cw1200_common *priv, bool aid0_bit_set) pr_debug("[AP] mcast: %s.\n", aid0_bit_set ? "ena" : "dis"); skb = ieee80211_beacon_get_tim(priv->hw, priv->vif, - &tim_offset, &tim_length); + &tim_offset, &tim_length, 0); if (!skb) { if (!__cw1200_flush(priv, true)) wsm_unlock_tx(priv); @@ -1796,14 +1797,14 @@ static int cw1200_set_btcoexinfo(struct cw1200_common *priv) void cw1200_bss_info_changed(struct ieee80211_hw *dev, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, - u32 changed) + u64 changed) { struct cw1200_common *priv = dev->priv; bool do_join = false; mutex_lock(&priv->conf_mutex); - pr_debug("BSS CHANGED: %08x\n", changed); + pr_debug("BSS CHANGED: %llx\n", changed); /* TODO: BSS_CHANGED_QOS */ /* TODO: BSS_CHANGED_TXPOWER */ @@ -1813,15 +1814,15 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, int i; pr_debug("[STA] BSS_CHANGED_ARP_FILTER cnt: %d\n", - info->arp_addr_cnt); + vif->cfg.arp_addr_cnt); /* Currently only one IP address is supported by firmware. * In case of more IPs arp filtering will be disabled. */ - if (info->arp_addr_cnt > 0 && - info->arp_addr_cnt <= WSM_MAX_ARP_IP_ADDRTABLE_ENTRIES) { - for (i = 0; i < info->arp_addr_cnt; i++) { - filter.ipv4addrs[i] = info->arp_addr_list[i]; + if (vif->cfg.arp_addr_cnt > 0 && + vif->cfg.arp_addr_cnt <= WSM_MAX_ARP_IP_ADDRTABLE_ENTRIES) { + for (i = 0; i < vif->cfg.arp_addr_cnt; i++) { + filter.ipv4addrs[i] = vif->cfg.arp_addr_list[i]; pr_debug("[STA] addr[%d]: 0x%X\n", i, filter.ipv4addrs[i]); } @@ -1857,7 +1858,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, if (changed & BSS_CHANGED_BEACON_INT) { pr_debug("CHANGED_BEACON_INT\n"); - if (info->ibss_joined) + if (vif->cfg.ibss_joined) do_join = true; else if (priv->join_status == CW1200_JOIN_STATUS_AP) cw1200_update_beaconing(priv); @@ -1882,7 +1883,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, BSS_CHANGED_BASIC_RATES | BSS_CHANGED_HT)) { pr_debug("BSS_CHANGED_ASSOC\n"); - if (info->assoc) { + if (vif->cfg.assoc) { if (priv->join_status < CW1200_JOIN_STATUS_PRE_STA) { ieee80211_connection_loss(vif); mutex_unlock(&priv->conf_mutex); @@ -1894,7 +1895,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, do_join = true; } - if (info->assoc || info->ibss_joined) { + if (vif->cfg.assoc || vif->cfg.ibss_joined) { struct ieee80211_sta *sta = NULL; __le32 htprot = 0; @@ -1904,7 +1905,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, rcu_read_lock(); - if (info->bssid && !info->ibss_joined) + if (info->bssid && !vif->cfg.ibss_joined) sta = ieee80211_find_sta(vif, info->bssid); if (sta) { priv->ht_info.ht_cap = sta->deflink.ht_cap; @@ -1958,7 +1959,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, cancel_work_sync(&priv->unjoin_work); priv->bss_params.beacon_lost_count = priv->cqm_beacon_loss_count; - priv->bss_params.aid = info->aid; + priv->bss_params.aid = vif->cfg.aid; if (priv->join_dtim_period < 1) priv->join_dtim_period = 1; @@ -1973,7 +1974,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, priv->association_mode.basic_rate_set); wsm_set_association_mode(priv, &priv->association_mode); - if (!info->ibss_joined) { + if (!vif->cfg.ibss_joined) { wsm_keep_alive_period(priv, 30 /* sec */); wsm_set_bss_params(priv, &priv->bss_params); priv->setbssparams_done = true; @@ -2203,7 +2204,7 @@ static int cw1200_upload_beacon(struct cw1200_common *priv) frame.rate = WSM_TRANSMIT_RATE_6; frame.skb = ieee80211_beacon_get_tim(priv->hw, priv->vif, - &tim_offset, &tim_len); + &tim_offset, &tim_len, 0); if (!frame.skb) return -ENOMEM; @@ -2330,8 +2331,8 @@ static int cw1200_start_ap(struct cw1200_common *priv) memset(start.ssid, 0, sizeof(start.ssid)); if (!conf->hidden_ssid) { - start.ssid_len = conf->ssid_len; - memcpy(start.ssid, conf->ssid, start.ssid_len); + start.ssid_len = priv->vif->cfg.ssid_len; + memcpy(start.ssid, priv->vif->cfg.ssid, start.ssid_len); } priv->beacon_int = conf->beacon_int; |