Commit 664ba518 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: Fix calling conditions of vnt_set_bss_mode

vnt_set_bss_mode needs to be called on all changes to BSS_CHANGED_BASIC_RATES,
BSS_CHANGED_ERP_PREAMBLE and BSS_CHANGED_ERP_SLOT

Remove all other calls and vnt_update_ifs which is called in vnt_set_bss_mode.

Fixes an issue that preamble mode is not being updated correctly.

Fixes: c1260357 ("staging: vt6656: Only call vnt_set_bss_mode on basic rates change.")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/44110801-6234-50d8-c583-9388f04b486c@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 332e0e17
...@@ -625,8 +625,6 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -625,8 +625,6 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
priv->op_mode = vif->type; priv->op_mode = vif->type;
vnt_set_bss_mode(priv);
/* LED blink on TX */ /* LED blink on TX */
vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_INTER); vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_INTER);
...@@ -713,7 +711,6 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, ...@@ -713,7 +711,6 @@ 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);
} }
...@@ -742,11 +739,14 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, ...@@ -742,11 +739,14 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
priv->short_slot_time = false; priv->short_slot_time = false;
vnt_set_short_slot_time(priv); vnt_set_short_slot_time(priv);
vnt_update_ifs(priv);
vnt_set_vga_gain_offset(priv, priv->bb_vga[0]); vnt_set_vga_gain_offset(priv, priv->bb_vga[0]);
vnt_update_pre_ed_threshold(priv, false); vnt_update_pre_ed_threshold(priv, false);
} }
if (changed & (BSS_CHANGED_BASIC_RATES | BSS_CHANGED_ERP_PREAMBLE |
BSS_CHANGED_ERP_SLOT))
vnt_set_bss_mode(priv);
if (changed & BSS_CHANGED_TXPOWER) if (changed & BSS_CHANGED_TXPOWER)
vnt_rf_setpower(priv, priv->current_rate, vnt_rf_setpower(priv, priv->current_rate,
conf->chandef.chan->hw_value); conf->chandef.chan->hw_value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment