From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 2/2] wl12xx: handle CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID
Date: Sun, 18 Sep 2011 15:09:19 +0300 [thread overview]
Message-ID: <1316347759-22030-2-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1316347759-22030-1-git-send-email-eliad@wizery.com>
The fw sends the CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID event
when it wants the driver to increase the dynamic ps (auto-mode)
timeout (or restore the original timeout).
unmask CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID, and increase/restore
the dynamic ps default timeout upon getting this event.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/boot.c | 1 +
drivers/net/wireless/wl12xx/event.c | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
index 6d5664b..13798a3 100644
--- a/drivers/net/wireless/wl12xx/boot.c
+++ b/drivers/net/wireless/wl12xx/boot.c
@@ -496,6 +496,7 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
RSSI_SNR_TRIGGER_0_EVENT_ID |
PSPOLL_DELIVERY_FAILURE_EVENT_ID |
SOFT_GEMINI_SENSE_EVENT_ID |
+ CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID |
PERIODIC_SCAN_REPORT_EVENT_ID |
PERIODIC_SCAN_COMPLETE_EVENT_ID |
DUMMY_PACKET_EVENT_ID |
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index c73fe4c..79ff3bb 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -258,6 +258,14 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
wl12xx_event_soft_gemini_sense(wl,
mbox->soft_gemini_sense_info);
+ if (vector & CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID &&
+ wl->bss_type == BSS_TYPE_STA_BSS) {
+ int timeout = -1;
+ if (mbox->change_auto_mode_timeout)
+ timeout = 500;
+ ieee80211_set_dyn_ps_timeout(wl->vif, timeout);
+ }
+
/*
* The BSS_LOSE_EVENT_ID is only needed while psm (and hence beacon
* filtering) is enabled. Without PSM, the stack will receive all
--
1.7.6.401.g6a319
next prev parent reply other threads:[~2011-09-18 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 12:09 [PATCH 1/2] wl12xx: add dynamic_ps_timeout debugfs entry Eliad Peller
2011-09-18 12:09 ` Eliad Peller [this message]
2011-09-19 5:21 ` [PATCH 2/2] wl12xx: handle CHANGE_AUTO_MODE_TIMEOUT_EVENT_ID Luciano Coelho
2011-09-19 7:07 ` Eliad Peller
2011-09-19 5:07 ` [PATCH 1/2] wl12xx: add dynamic_ps_timeout debugfs entry Luciano Coelho
2011-09-19 5:11 ` Luciano Coelho
2011-09-22 5:33 ` Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316347759-22030-2-git-send-email-eliad@wizery.com \
--to=eliad@wizery.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.