qtnfmac: do not cache channel info from "connect" command

This makes no sense because real operational channel is choosen based
on AP operation, not on what STA is configured to.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Igor Mitsyanko 2017-09-21 14:34:32 -07:00 committed by Kalle Valo
parent 9e5478b608
commit 96d4eaf20f
2 changed files with 5 additions and 16 deletions

View File

@ -613,8 +613,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme)
{
struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
struct qtnf_wmac *mac = wiphy_priv(wiphy);
struct cfg80211_chan_def chandef;
struct qtnf_bss_config *bss_cfg;
int ret;
@ -627,18 +625,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
bss_cfg = &vif->bss_cfg;
memset(bss_cfg, 0, sizeof(*bss_cfg));
if (sme->channel) {
/* FIXME: need to set proper nl80211_channel_type value */
cfg80211_chandef_create(&chandef, sme->channel,
NL80211_CHAN_HT20);
/* fall-back to minimal safe chandef description */
if (!cfg80211_chandef_valid(&chandef))
cfg80211_chandef_create(&chandef, sme->channel,
NL80211_CHAN_HT20);
memcpy(&mac->chandef, &chandef, sizeof(mac->chandef));
}
bss_cfg->ssid_len = sme->ssid_len;
memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len);
bss_cfg->auth_type = sme->auth_type;
@ -663,6 +649,7 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
bss_cfg->connect_flags |= QLINK_STA_CONNECT_USE_RRM;
memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto));
if (sme->bssid)
ether_addr_copy(bss_cfg->bssid, sme->bssid);
else

View File

@ -2055,8 +2055,10 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif,
ether_addr_copy(cmd->bssid, bss_cfg->bssid);
if (vif->mac->chandef.chan)
cmd->channel = cpu_to_le16(vif->mac->chandef.chan->hw_value);
if (sme->channel)
cmd->channel = cpu_to_le16(sme->channel->hw_value);
else
cmd->channel = 0;
cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period);