* [PATCH 1/4] staging: vt6656: vnt_update_ifs set max_min based on short slot time.
@ 2017-04-29 12:03 Malcolm Priestley
2017-04-29 12:03 ` [PATCH 2/4] staging: vt6656: always call vnt_update_ifs on short time change Malcolm Priestley
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Malcolm Priestley @ 2017-04-29 12:03 UTC (permalink / raw)
To: gregkh; +Cc: linux-wireless, devel, Malcolm Priestley
Short slot time is controlled by mac80211 so there is no need to find
odfm rates.
Merge PK_TYPE_11B and PK_TYPE_11GA & PK_TYPE_11GB into one else and
switch on short slot time.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/card.c | 29 ++++++-----------------------
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 0e5a99375099..c61422ea8846 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -359,35 +359,18 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->sifs = C_SIFS_A;
priv->difs = C_SIFS_A + 2 * C_SLOT_SHORT;
max_min = 4;
- } else if (priv->packet_type == PK_TYPE_11B) {
- priv->slot = C_SLOT_LONG;
- priv->sifs = C_SIFS_BG;
- priv->difs = C_SIFS_BG + 2 * C_SLOT_LONG;
- max_min = 5;
- } else {/* PK_TYPE_11GA & PK_TYPE_11GB */
- bool ofdm_rate = false;
- unsigned int ii = 0;
-
+ } else {
priv->sifs = C_SIFS_BG;
- if (priv->short_slot_time)
+ if (priv->short_slot_time) {
priv->slot = C_SLOT_SHORT;
- else
+ max_min = 4;
+ } else {
priv->slot = C_SLOT_LONG;
-
- priv->difs = C_SIFS_BG + 2 * priv->slot;
-
- for (ii = RATE_54M; ii >= RATE_6M; ii--) {
- if (priv->basic_rates & ((u32)(0x1 << ii))) {
- ofdm_rate = true;
- break;
- }
+ max_min = 5;
}
- if (ofdm_rate)
- max_min = 4;
- else
- max_min = 5;
+ priv->difs = C_SIFS_BG + 2 * priv->slot;
}
priv->eifs = C_EIFS;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/4] staging: vt6656: always call vnt_update_ifs on short time change. 2017-04-29 12:03 [PATCH 1/4] staging: vt6656: vnt_update_ifs set max_min based on short slot time Malcolm Priestley @ 2017-04-29 12:03 ` Malcolm Priestley 2017-04-29 12:03 ` [PATCH 3/4] staging: vt6556: vnt_start Fix missing call to vnt_key_init_table Malcolm Priestley 2017-04-29 12:03 ` [PATCH 4/4] staging: vt6656: Only call vnt_set_bss_mode on basic rates change Malcolm Priestley 2 siblings, 0 replies; 4+ messages in thread From: Malcolm Priestley @ 2017-04-29 12:03 UTC (permalink / raw) To: gregkh; +Cc: linux-wireless, devel, Malcolm Priestley short time change needs to synchronize parameters in vnt_update_ifs so a call to the function is always necessary. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> --- drivers/staging/vt6656/main_usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 028f54b453d0..9237930991ca 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -715,6 +715,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->short_slot_time = false; vnt_set_short_slot_time(priv); + vnt_update_ifs(priv); vnt_set_vga_gain_offset(priv, priv->bb_vga[0]); vnt_update_pre_ed_threshold(priv, false); } -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] staging: vt6556: vnt_start Fix missing call to vnt_key_init_table. 2017-04-29 12:03 [PATCH 1/4] staging: vt6656: vnt_update_ifs set max_min based on short slot time Malcolm Priestley 2017-04-29 12:03 ` [PATCH 2/4] staging: vt6656: always call vnt_update_ifs on short time change Malcolm Priestley @ 2017-04-29 12:03 ` Malcolm Priestley 2017-04-29 12:03 ` [PATCH 4/4] staging: vt6656: Only call vnt_set_bss_mode on basic rates change Malcolm Priestley 2 siblings, 0 replies; 4+ messages in thread From: Malcolm Priestley @ 2017-04-29 12:03 UTC (permalink / raw) To: gregkh; +Cc: linux-wireless, devel, Malcolm Priestley, # v3 . 17+ The key table is not intialized correctly without this call. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v3.17+ --- drivers/staging/vt6656/main_usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 9237930991ca..06f7841d44d3 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -513,6 +513,9 @@ static int vnt_start(struct ieee80211_hw *hw) goto free_all; } + if (vnt_key_init_table(priv)) + goto free_all; + priv->int_interval = 1; /* bInterval is set to 1 */ vnt_int_start_interrupt(priv); -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] staging: vt6656: Only call vnt_set_bss_mode on basic rates change. 2017-04-29 12:03 [PATCH 1/4] staging: vt6656: vnt_update_ifs set max_min based on short slot time Malcolm Priestley 2017-04-29 12:03 ` [PATCH 2/4] staging: vt6656: always call vnt_update_ifs on short time change Malcolm Priestley 2017-04-29 12:03 ` [PATCH 3/4] staging: vt6556: vnt_start Fix missing call to vnt_key_init_table Malcolm Priestley @ 2017-04-29 12:03 ` Malcolm Priestley 2 siblings, 0 replies; 4+ messages in thread From: Malcolm Priestley @ 2017-04-29 12:03 UTC (permalink / raw) To: gregkh; +Cc: linux-wireless, devel, Malcolm Priestley To ensure the bss is always synchronized only call on basic rate change. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> --- drivers/staging/vt6656/main_usb.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 06f7841d44d3..095b85567306 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -637,7 +637,6 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) { struct vnt_private *priv = hw->priv; struct ieee80211_conf *conf = &hw->conf; - u8 bb_type; if (changed & IEEE80211_CONF_CHANGE_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); if (conf->chandef.chan->band == NL80211_BAND_5GHZ) - bb_type = BB_TYPE_11A; + priv->bb_type = BB_TYPE_11A; else - bb_type = BB_TYPE_11G; - - if (priv->bb_type != bb_type) { - priv->bb_type = bb_type; - - vnt_set_bss_mode(priv); - } + priv->bb_type = BB_TYPE_11G; } 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; vnt_update_top_rates(priv); + vnt_set_bss_mode(priv); 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; - vnt_set_bss_mode(priv); /* Set max sensitivity*/ vnt_update_pre_ed_threshold(priv, true); } -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-29 12:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-29 12:03 [PATCH 1/4] staging: vt6656: vnt_update_ifs set max_min based on short slot time Malcolm Priestley 2017-04-29 12:03 ` [PATCH 2/4] staging: vt6656: always call vnt_update_ifs on short time change Malcolm Priestley 2017-04-29 12:03 ` [PATCH 3/4] staging: vt6556: vnt_start Fix missing call to vnt_key_init_table Malcolm Priestley 2017-04-29 12:03 ` [PATCH 4/4] staging: vt6656: Only call vnt_set_bss_mode on basic rates change Malcolm Priestley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).