* [PATCH 1/5] wl12xx: don't disconnect on recovery
@ 2011-08-25 16:04 Eliad Peller
2011-08-25 16:04 ` [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag Eliad Peller
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Eliad Peller @ 2011-08-25 16:04 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
allow full connection recovery by dropping the
beacon_loss notification.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 8324d90..8aff8d4 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1225,9 +1225,6 @@ static void wl1271_recovery_work(struct work_struct *work)
test_bit(WL1271_FLAG_AP_STARTED, &wl->flags))
wl->tx_security_seq += WL1271_TX_SQN_POST_RECOVERY_PADDING;
- if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags))
- ieee80211_connection_loss(wl->vif);
-
/* Prevent spurious TX during FW restart */
ieee80211_stop_queues(wl->hw);
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
@ 2011-08-25 16:04 ` Eliad Peller
2011-08-25 16:04 ` [PATCH 3/5] wl12xx: check for ROC on scan_complete Eliad Peller
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Eliad Peller @ 2011-08-25 16:04 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
When setting the WL1271_SCAN_OPT_PRIORITY_HIGH flag, the
driver requests a scan *now*, and the fw doesn't enter psm
before scanning, which in turn might cause packets loss.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/scan.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index af4ad23..b2e2abd 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -164,9 +164,6 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
goto out;
}
- /* We always use high priority scans */
- scan_options = WL1271_SCAN_OPT_PRIORITY_HIGH;
-
/* No SSIDs means that we have a forced passive scan */
if (passive || wl->scan.req->n_ssids == 0)
scan_options |= WL1271_SCAN_OPT_PASSIVE;
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] wl12xx: check for ROC on scan_complete
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
2011-08-25 16:04 ` [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag Eliad Peller
@ 2011-08-25 16:04 ` Eliad Peller
2011-08-25 16:04 ` [PATCH 4/5] wl12xx: add config_hangover command Eliad Peller
2011-08-25 16:04 ` [PATCH 5/5] wl12xx: don't queue a new dummy packet if one is already pending Eliad Peller
3 siblings, 0 replies; 7+ messages in thread
From: Eliad Peller @ 2011-08-25 16:04 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
When scan completes, and we are not associated, we should start
the dev role and ROC. however, we might already be in this situation
(e.g. if we got disconnected during scan). check for it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/scan.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index b2e2abd..4a4d0d0 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -65,8 +65,9 @@ void wl1271_scan_complete_work(struct work_struct *work)
/* return to ROC if needed */
is_sta = (wl->bss_type == BSS_TYPE_STA_BSS);
is_ibss = (wl->bss_type == BSS_TYPE_IBSS);
- if ((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
- (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) {
+ if (((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
+ (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) &&
+ !test_bit(wl->dev_role_id, wl->roc_map)) {
/* restore remain on channel */
wl12xx_cmd_role_start_dev(wl);
wl12xx_roc(wl, wl->dev_role_id);
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] wl12xx: add config_hangover command
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
2011-08-25 16:04 ` [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag Eliad Peller
2011-08-25 16:04 ` [PATCH 3/5] wl12xx: check for ROC on scan_complete Eliad Peller
@ 2011-08-25 16:04 ` Eliad Peller
2011-08-25 17:48 ` Luciano Coelho
2011-08-25 16:04 ` [PATCH 5/5] wl12xx: don't queue a new dummy packet if one is already pending Eliad Peller
3 siblings, 1 reply; 7+ messages in thread
From: Eliad Peller @ 2011-08-25 16:04 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
Add wl12xx_acx_config_hangover() and respective conf values.
This command configures how long the chip will stay awake
after it was configured to enter psm.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/acx.c | 40 ++++++++++++++++++++++++++++++++++++
drivers/net/wireless/wl12xx/acx.h | 18 ++++++++++++++++
drivers/net/wireless/wl12xx/conf.h | 23 +++++++++++++-------
drivers/net/wireless/wl12xx/init.c | 5 ++++
drivers/net/wireless/wl12xx/main.c | 14 +++++++++++-
5 files changed, 91 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index f2838ae..a325dba 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -1687,3 +1687,43 @@ out:
kfree(acx);
return ret;
}
+
+int wl12xx_acx_config_hangover(struct wl1271 *wl)
+{
+ struct wl12xx_acx_config_hangover *acx;
+ struct conf_hangover_settings *conf = &wl->conf.hangover;
+ int ret;
+
+ wl1271_debug(DEBUG_ACX, "acx config hangover");
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->recover_time = cpu_to_le32(conf->recover_time);
+ acx->hangover_period = conf->hangover_period;
+ acx->dynamic_mode = conf->dynamic_mode;
+ acx->early_termination_mode = conf->early_termination_mode;
+ acx->max_period = conf->max_period;
+ acx->min_period = conf->min_period;
+ acx->increase_delta = conf->increase_delta;
+ acx->decrease_delta = conf->decrease_delta;
+ acx->quiet_time = conf->quiet_time;
+ acx->increase_delta = conf->increase_time;
+ acx->window_size = acx->window_size;
+
+ ret = wl1271_cmd_configure(wl, ACX_CONFIG_HANGOVER, acx,
+ sizeof(*acx));
+
+ if (ret < 0) {
+ wl1271_warning("acx config hangover failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+
+}
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h
index 758c596..556ee4e 100644
--- a/drivers/net/wireless/wl12xx/acx.h
+++ b/drivers/net/wireless/wl12xx/acx.h
@@ -1144,6 +1144,23 @@ struct wl12xx_acx_set_rate_mgmt_params {
u8 padding2[2];
} __packed;
+struct wl12xx_acx_config_hangover {
+ struct acx_header header;
+
+ __le32 recover_time;
+ u8 hangover_period;
+ u8 dynamic_mode;
+ u8 early_termination_mode;
+ u8 max_period;
+ u8 min_period;
+ u8 increase_delta;
+ u8 decrease_delta;
+ u8 quiet_time;
+ u8 increase_time;
+ u8 window_size;
+ u8 padding[2];
+} __packed;
+
enum {
ACX_WAKE_UP_CONDITIONS = 0x0002,
ACX_MEM_CFG = 0x0003,
@@ -1281,5 +1298,6 @@ int wl1271_acx_config_ps(struct wl1271 *wl);
int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
int wl1271_acx_fm_coex(struct wl1271 *wl);
int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl);
+int wl12xx_acx_config_hangover(struct wl1271 *wl);
#endif /* __WL1271_ACX_H__ */
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 82f205c..45428a2 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -916,14 +916,6 @@ struct conf_conn_settings {
u8 psm_entry_nullfunc_retries;
/*
- * Specifies the time to linger in active mode after successfully
- * transmitting the PSM entry null-func frame.
- *
- * Range 0 - 255 TU's
- */
- u8 psm_entry_hangover_period;
-
- /*
*
* Specifies the interval of the connection keep-alive null-func
* frame in ms.
@@ -1236,6 +1228,20 @@ struct conf_rate_policy_settings {
u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
};
+struct conf_hangover_settings {
+ u32 recover_time;
+ u8 hangover_period;
+ u8 dynamic_mode;
+ u8 early_termination_mode;
+ u8 max_period;
+ u8 min_period;
+ u8 increase_delta;
+ u8 decrease_delta;
+ u8 quiet_time;
+ u8 increase_time;
+ u8 window_size;
+};
+
struct conf_drv_settings {
struct conf_sg_settings sg;
struct conf_rx_settings rx;
@@ -1254,6 +1260,7 @@ struct conf_drv_settings {
struct conf_rx_streaming_settings rx_streaming;
struct conf_fwlog fwlog;
struct conf_rate_policy_settings rate;
+ struct conf_hangover_settings hangover;
u8 hci_io_ds;
};
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index b13bebe..09515f5 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -707,6 +707,11 @@ int wl1271_hw_init(struct wl1271 *wl)
if (ret < 0)
goto out_free_memmap;
+ /* configure hangover */
+ ret = wl12xx_acx_config_hangover(wl);
+ if (ret < 0)
+ goto out_free_memmap;
+
return 0;
out_free_memmap:
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 8aff8d4..f1fd991 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -239,7 +239,6 @@ static struct conf_drv_settings default_conf = {
.psm_entry_retries = 8,
.psm_exit_retries = 16,
.psm_entry_nullfunc_retries = 3,
- .psm_entry_hangover_period = 1,
.keep_alive_interval = 55000,
.max_listen_interval = 20,
},
@@ -359,6 +358,19 @@ static struct conf_drv_settings default_conf = {
0x00, 0x00, 0x00,
},
},
+ .hangover = {
+ .recover_time = 0,
+ .hangover_period = 20,
+ .dynamic_mode = 1,
+ .early_termination_mode = 1,
+ .max_period = 20,
+ .min_period = 1,
+ .increase_delta = 1,
+ .decrease_delta = 2,
+ .quiet_time = 4,
+ .increase_time = 1,
+ .window_size = 16,
+ },
};
static char *fwlog_param;
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] wl12xx: don't queue a new dummy packet if one is already pending
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
` (2 preceding siblings ...)
2011-08-25 16:04 ` [PATCH 4/5] wl12xx: add config_hangover command Eliad Peller
@ 2011-08-25 16:04 ` Eliad Peller
3 siblings, 0 replies; 7+ messages in thread
From: Eliad Peller @ 2011-08-25 16:04 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
From: Arik Nemtsov <arik@wizery.com>
The firmware only asks for one dummy packet at a time, but sometimes we
are unable to provide it before a FW timer expires. When this happens,
the FW will re-request the dummy packet. If a packet is still queued in
the driver queues, do nothing in this case.
This prevents spurious dummy packets from clogging up the VO AC.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/main.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index f1fd991..aeb4cc5 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1540,7 +1540,13 @@ out:
int wl1271_tx_dummy_packet(struct wl1271 *wl)
{
unsigned long flags;
- int q = wl1271_tx_get_queue(skb_get_queue_mapping(wl->dummy_packet));
+ int q;
+
+ /* no need to queue a new dummy packet if one is already pending */
+ if (test_bit(WL1271_FLAG_DUMMY_PACKET_PENDING, &wl->flags))
+ return 0;
+
+ q = wl1271_tx_get_queue(skb_get_queue_mapping(wl->dummy_packet));
spin_lock_irqsave(&wl->wl_lock, flags);
set_bit(WL1271_FLAG_DUMMY_PACKET_PENDING, &wl->flags);
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/5] wl12xx: add config_hangover command
2011-08-25 16:04 ` [PATCH 4/5] wl12xx: add config_hangover command Eliad Peller
@ 2011-08-25 17:48 ` Luciano Coelho
2011-08-28 10:33 ` Eliad Peller
0 siblings, 1 reply; 7+ messages in thread
From: Luciano Coelho @ 2011-08-25 17:48 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Thu, 2011-08-25 at 19:04 +0300, Eliad Peller wrote:
> diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
> index f2838ae..a325dba 100644
> --- a/drivers/net/wireless/wl12xx/acx.c
> +++ b/drivers/net/wireless/wl12xx/acx.c
> @@ -1687,3 +1687,43 @@ out:
> kfree(acx);
> return ret;
> }
> +
> +int wl12xx_acx_config_hangover(struct wl1271 *wl)
> +{
> + struct wl12xx_acx_config_hangover *acx;
> + struct conf_hangover_settings *conf = &wl->conf.hangover;
> + int ret;
> +
> + wl1271_debug(DEBUG_ACX, "acx config hangover");
> +
> + acx = kzalloc(sizeof(*acx), GFP_KERNEL);
> + if (!acx) {
> + ret = -ENOMEM;
> + goto out;
> + }
> +
> + acx->recover_time = cpu_to_le32(conf->recover_time);
> + acx->hangover_period = conf->hangover_period;
> + acx->dynamic_mode = conf->dynamic_mode;
> + acx->early_termination_mode = conf->early_termination_mode;
> + acx->max_period = conf->max_period;
> + acx->min_period = conf->min_period;
> + acx->increase_delta = conf->increase_delta;
> + acx->decrease_delta = conf->decrease_delta;
> + acx->quiet_time = conf->quiet_time;
> + acx->increase_delta = conf->increase_time;
Typo, this should be acx->increase_time.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/5] wl12xx: add config_hangover command
2011-08-25 17:48 ` Luciano Coelho
@ 2011-08-28 10:33 ` Eliad Peller
0 siblings, 0 replies; 7+ messages in thread
From: Eliad Peller @ 2011-08-28 10:33 UTC (permalink / raw)
To: Luciano Coelho; +Cc: linux-wireless
On Thu, Aug 25, 2011 at 8:48 PM, Luciano Coelho <coelho@ti.com> wrote:
> On Thu, 2011-08-25 at 19:04 +0300, Eliad Peller wrote:
>> + acx->increase_delta = conf->increase_delta;
>> + acx->decrease_delta = conf->decrease_delta;
>> + acx->quiet_time = conf->quiet_time;
>> + acx->increase_delta = conf->increase_time;
>
> Typo, this should be acx->increase_time.
>
good catch. thanks.
i'll send v2.
Eliad.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-28 10:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 16:04 [PATCH 1/5] wl12xx: don't disconnect on recovery Eliad Peller
2011-08-25 16:04 ` [PATCH 2/5] wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag Eliad Peller
2011-08-25 16:04 ` [PATCH 3/5] wl12xx: check for ROC on scan_complete Eliad Peller
2011-08-25 16:04 ` [PATCH 4/5] wl12xx: add config_hangover command Eliad Peller
2011-08-25 17:48 ` Luciano Coelho
2011-08-28 10:33 ` Eliad Peller
2011-08-25 16:04 ` [PATCH 5/5] wl12xx: don't queue a new dummy packet if one is already pending Eliad Peller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox