Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96d4eaf2 authored by Igor Mitsyanko's avatar Igor Mitsyanko Committed by Kalle Valo
Browse files

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: default avatarIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9e5478b6
Loading
Loading
Loading
Loading
+1 −14
Original line number Original line Diff line number Diff line
@@ -613,8 +613,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
	     struct cfg80211_connect_params *sme)
	     struct cfg80211_connect_params *sme)
{
{
	struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
	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;
	struct qtnf_bss_config *bss_cfg;
	int ret;
	int ret;


@@ -627,18 +625,6 @@ qtnf_connect(struct wiphy *wiphy, struct net_device *dev,
	bss_cfg = &vif->bss_cfg;
	bss_cfg = &vif->bss_cfg;
	memset(bss_cfg, 0, sizeof(*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;
	bss_cfg->ssid_len = sme->ssid_len;
	memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len);
	memcpy(&bss_cfg->ssid, sme->ssid, bss_cfg->ssid_len);
	bss_cfg->auth_type = sme->auth_type;
	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;
		bss_cfg->connect_flags |= QLINK_STA_CONNECT_USE_RRM;


	memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto));
	memcpy(&bss_cfg->crypto, &sme->crypto, sizeof(bss_cfg->crypto));

	if (sme->bssid)
	if (sme->bssid)
		ether_addr_copy(bss_cfg->bssid, sme->bssid);
		ether_addr_copy(bss_cfg->bssid, sme->bssid);
	else
	else
+4 −2
Original line number Original line Diff line number Diff line
@@ -2055,8 +2055,10 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif,


	ether_addr_copy(cmd->bssid, bss_cfg->bssid);
	ether_addr_copy(cmd->bssid, bss_cfg->bssid);


	if (vif->mac->chandef.chan)
	if (sme->channel)
		cmd->channel = cpu_to_le16(vif->mac->chandef.chan->hw_value);
		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);
	cmd->bg_scan_period = cpu_to_le16(bss_cfg->bg_scan_period);