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

Commit c1260357 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: Only call vnt_set_bss_mode on basic rates change.



To ensure the bss is always synchronized only call on basic rate
change.

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc32190f
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -637,7 +637,6 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)
{
{
	struct vnt_private *priv = hw->priv;
	struct vnt_private *priv = hw->priv;
	struct ieee80211_conf *conf = &hw->conf;
	struct ieee80211_conf *conf = &hw->conf;
	u8 bb_type;


	if (changed & IEEE80211_CONF_CHANGE_PS) {
	if (changed & IEEE80211_CONF_CHANGE_PS) {
		if (conf->flags & IEEE80211_CONF_PS)
		if (conf->flags & IEEE80211_CONF_PS)
@@ -651,15 +650,9 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)
		vnt_set_channel(priv, conf->chandef.chan->hw_value);
		vnt_set_channel(priv, conf->chandef.chan->hw_value);


		if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
		if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
			bb_type = BB_TYPE_11A;
			priv->bb_type = BB_TYPE_11A;
		else
		else
			bb_type = BB_TYPE_11G;
			priv->bb_type = BB_TYPE_11G;

		if (priv->bb_type != bb_type) {
			priv->bb_type = bb_type;

			vnt_set_bss_mode(priv);
		}
	}
	}


	if (changed & IEEE80211_CONF_CHANGE_POWER) {
	if (changed & IEEE80211_CONF_CHANGE_POWER) {
@@ -690,6 +683,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
		priv->basic_rates = conf->basic_rates;
		priv->basic_rates = conf->basic_rates;


		vnt_update_top_rates(priv);
		vnt_update_top_rates(priv);
		vnt_set_bss_mode(priv);


		dev_dbg(&priv->usb->dev, "basic rates %x\n", conf->basic_rates);
		dev_dbg(&priv->usb->dev, "basic rates %x\n", conf->basic_rates);
	}
	}
@@ -850,7 +844,6 @@ static void vnt_sw_scan_start(struct ieee80211_hw *hw,
{
{
	struct vnt_private *priv = hw->priv;
	struct vnt_private *priv = hw->priv;


	vnt_set_bss_mode(priv);
	/* Set max sensitivity*/
	/* Set max sensitivity*/
	vnt_update_pre_ed_threshold(priv, true);
	vnt_update_pre_ed_threshold(priv, true);
}
}