Skip to content

Commit 664ba51

Browse files
Malcolm Priestleygregkh
authored andcommitted
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: c126035 ("staging: vt6656: Only call vnt_set_bss_mode on basic rates change.") Cc: stable <[email protected]> Signed-off-by: Malcolm Priestley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 332e0e1 commit 664ba51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/staging/vt6656/main_usb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
625625

626626
priv->op_mode = vif->type;
627627

628-
vnt_set_bss_mode(priv);
629-
630628
/* LED blink on TX */
631629
vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_INTER);
632630

@@ -713,7 +711,6 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
713711
priv->basic_rates = conf->basic_rates;
714712

715713
vnt_update_top_rates(priv);
716-
vnt_set_bss_mode(priv);
717714

718715
dev_dbg(&priv->usb->dev, "basic rates %x\n", conf->basic_rates);
719716
}
@@ -742,11 +739,14 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
742739
priv->short_slot_time = false;
743740

744741
vnt_set_short_slot_time(priv);
745-
vnt_update_ifs(priv);
746742
vnt_set_vga_gain_offset(priv, priv->bb_vga[0]);
747743
vnt_update_pre_ed_threshold(priv, false);
748744
}
749745

746+
if (changed & (BSS_CHANGED_BASIC_RATES | BSS_CHANGED_ERP_PREAMBLE |
747+
BSS_CHANGED_ERP_SLOT))
748+
vnt_set_bss_mode(priv);
749+
750750
if (changed & BSS_CHANGED_TXPOWER)
751751
vnt_rf_setpower(priv, priv->current_rate,
752752
conf->chandef.chan->hw_value);

0 commit comments

Comments
 (0)