|
@@ -236,7 +236,7 @@ static struct conf_drv_settings default_conf = {
|
|
|
.ps_poll_recovery_period = 700,
|
|
|
.bet_enable = CONF_BET_MODE_ENABLE,
|
|
|
.bet_max_consecutive = 50,
|
|
|
- .psm_entry_retries = 5,
|
|
|
+ .psm_entry_retries = 8,
|
|
|
.psm_exit_retries = 16,
|
|
|
.psm_entry_nullfunc_retries = 3,
|
|
|
.psm_entry_hangover_period = 1,
|
|
@@ -2064,6 +2064,7 @@ deinit:
|
|
|
wl->session_counter = 0;
|
|
|
wl->rate_set = CONF_TX_RATE_MASK_BASIC;
|
|
|
wl->vif = NULL;
|
|
|
+ wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT;
|
|
|
wl1271_free_ap_keys(wl);
|
|
|
memset(wl->ap_hlid_map, 0, sizeof(wl->ap_hlid_map));
|
|
|
wl->ap_fw_ps_map = 0;
|
|
@@ -2199,10 +2200,14 @@ out:
|
|
|
|
|
|
static void wl1271_set_band_rate(struct wl1271 *wl)
|
|
|
{
|
|
|
- if (wl->band == IEEE80211_BAND_2GHZ)
|
|
|
+ if (wl->band == IEEE80211_BAND_2GHZ) {
|
|
|
wl->basic_rate_set = wl->conf.tx.basic_rate;
|
|
|
- else
|
|
|
+ wl->rate_set = wl->conf.tx.basic_rate;
|
|
|
+ } else {
|
|
|
wl->basic_rate_set = wl->conf.tx.basic_rate_5;
|
|
|
+ wl->rate_set = wl->conf.tx.basic_rate_5;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
static bool wl12xx_is_roc(struct wl1271 *wl)
|
|
@@ -2653,6 +2658,17 @@ static int wl1271_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
|
|
};
|
|
|
|
|
|
+ /*
|
|
|
+ * A STA set to GEM cipher requires 2 tx spare blocks.
|
|
|
+ * Return to default value when GEM cipher key is removed
|
|
|
+ */
|
|
|
+ if (key_type == KEY_GEM) {
|
|
|
+ if (action == KEY_ADD_OR_REPLACE)
|
|
|
+ wl->tx_spare_blocks = 2;
|
|
|
+ else if (action == KEY_REMOVE)
|
|
|
+ wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT;
|
|
|
+ }
|
|
|
+
|
|
|
addr = sta ? sta->addr : bcast_addr;
|
|
|
|
|
|
if (is_zero_ether_addr(addr)) {
|
|
@@ -3345,19 +3361,6 @@ sta_not_found:
|
|
|
ret = wl1271_acx_conn_monit_params(wl, true);
|
|
|
if (ret < 0)
|
|
|
goto out;
|
|
|
-
|
|
|
- /* If we want to go in PSM but we're not there yet */
|
|
|
- if (test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags) &&
|
|
|
- !test_bit(WL1271_FLAG_PSM, &wl->flags)) {
|
|
|
- enum wl1271_cmd_ps_mode mode;
|
|
|
-
|
|
|
- mode = STATION_POWER_SAVE_MODE;
|
|
|
- ret = wl1271_ps_set_mode(wl, mode,
|
|
|
- wl->basic_rate,
|
|
|
- true);
|
|
|
- if (ret < 0)
|
|
|
- goto out;
|
|
|
- }
|
|
|
} else {
|
|
|
/* use defaults when not associated */
|
|
|
bool was_assoc =
|
|
@@ -3501,6 +3504,19 @@ sta_not_found:
|
|
|
if (ret < 0)
|
|
|
goto out;
|
|
|
}
|
|
|
+
|
|
|
+ /* If we want to go in PSM but we're not there yet */
|
|
|
+ if (test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags) &&
|
|
|
+ !test_bit(WL1271_FLAG_PSM, &wl->flags)) {
|
|
|
+ enum wl1271_cmd_ps_mode mode;
|
|
|
+
|
|
|
+ mode = STATION_POWER_SAVE_MODE;
|
|
|
+ ret = wl1271_ps_set_mode(wl, mode,
|
|
|
+ wl->basic_rate,
|
|
|
+ true);
|
|
|
+ if (ret < 0)
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* Handle new association with HT. Do this after join. */
|
|
@@ -4475,6 +4491,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl)
|
|
|
wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
|
|
BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP);
|
|
|
wl->hw->wiphy->max_scan_ssids = 1;
|
|
|
+ wl->hw->wiphy->max_sched_scan_ssids = 8;
|
|
|
/*
|
|
|
* Maximum length of elements in scanning probe request templates
|
|
|
* should be the maximum length possible for a template, without
|
|
@@ -4599,6 +4616,7 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
|
|
|
wl->sched_scanning = false;
|
|
|
wl->tx_security_seq = 0;
|
|
|
wl->tx_security_last_seq_lsb = 0;
|
|
|
+ wl->tx_spare_blocks = TX_HW_BLOCK_SPARE_DEFAULT;
|
|
|
wl->role_id = WL12XX_INVALID_ROLE_ID;
|
|
|
wl->system_hlid = WL12XX_SYSTEM_HLID;
|
|
|
wl->sta_hlid = WL12XX_INVALID_LINK_ID;
|