From: Luciano Coelho <luciano.coelho@nokia.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Juuso Oikarinen <juuso.oikarinen@nokia.com>
Subject: [PATCH 16/24] wl1271: Update beacon interval properly for ad-hoc
Date: Fri, 26 Mar 2010 12:53:25 +0200 [thread overview]
Message-ID: <1269600813-32145-17-git-send-email-luciano.coelho@nokia.com> (raw)
In-Reply-To: <1269600813-32145-1-git-send-email-luciano.coelho@nokia.com>
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Configure the hardware beacon interval to whatever requested by the
mac80211.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271.h | 3 +++
drivers/net/wireless/wl12xx/wl1271_cmd.c | 2 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 10 ++++++++++
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 37ad5cd..c5559ef 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -452,6 +452,9 @@ struct wl1271 {
/* The current band */
enum ieee80211_band band;
+ /* Beaconing interval (needed for ad-hoc) */
+ u32 beacon_int;
+
/* Default key (for WEP) */
u32 default_key;
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index 0aa2422..0dcb3c2 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -323,7 +323,7 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
CONF_HW_BIT_RATE_24MBPS);
}
- join->beacon_interval = cpu_to_le16(WL1271_DEFAULT_BEACON_INT);
+ join->beacon_interval = cpu_to_le16(wl->beacon_int);
join->dtim_interval = WL1271_DEFAULT_DTIM_PERIOD;
join->channel = wl->channel;
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 49f37b0..523e051 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1575,6 +1575,15 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
if (ret < 0)
goto out;
+ if ((changed && BSS_CHANGED_BEACON_INT) &&
+ (wl->bss_type == BSS_TYPE_IBSS)) {
+ wl1271_debug(DEBUG_ADHOC, "ad-hoc beacon interval updated: %d",
+ bss_conf->beacon_int);
+
+ wl->beacon_int = bss_conf->beacon_int;
+ do_join = true;
+ }
+
if ((changed && BSS_CHANGED_BEACON) &&
(wl->bss_type == BSS_TYPE_IBSS)) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
@@ -2193,6 +2202,7 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work);
wl->channel = WL1271_DEFAULT_CHANNEL;
+ wl->beacon_int = WL1271_DEFAULT_BEACON_INT;
wl->default_key = 0;
wl->rx_counter = 0;
wl->rx_config = WL1271_DEFAULT_RX_CONFIG;
--
1.6.3.3
next prev parent reply other threads:[~2010-03-26 10:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 10:53 [PATCH 00/24] wl1271: bunch of patches from our internal tree wk12 Luciano Coelho
2010-03-26 10:53 ` [PATCH 01/24] wl1271: fix wl1271_spi driver name Luciano Coelho
2010-03-26 10:53 ` [PATCH 02/24] wl1271: Clean up RX rate reporting Luciano Coelho
2010-03-26 10:53 ` [PATCH 03/24] wl1271: Add TX " Luciano Coelho
2010-03-26 10:53 ` [PATCH 04/24] wl1271: Fix memory leaks in SPI initialization Luciano Coelho
2010-03-26 10:53 ` [PATCH 05/24] wl1271: Fix memory leak in scan command handling Luciano Coelho
2010-03-26 10:53 ` [PATCH 06/24] wl1271: Configure clock-request drive mode to open-drain Luciano Coelho
2010-03-26 10:53 ` [PATCH 07/24] wl1271: Warnings caused by wrong format specifiers fixed Luciano Coelho
2010-03-26 10:53 ` [PATCH 08/24] wl1271: Fix memory leak in cmd_data_path Luciano Coelho
2010-03-26 10:53 ` [PATCH 09/24] wl1271: Update busyword checking mechanism Luciano Coelho
2010-03-26 10:53 ` [PATCH 10/24] wl1271: Remove device MAC-address randomization Luciano Coelho
2010-03-26 10:53 ` [PATCH 11/24] wl1271: wait for join command complete event Luciano Coelho
2010-03-26 10:53 ` [PATCH 12/24] wl1271: wait for disconnect " Luciano Coelho
2010-03-26 10:53 ` [PATCH 13/24] wl1271: remove deprecated usage of RX status noise Luciano Coelho
2010-03-26 10:53 ` [PATCH 14/24] wl1271: Disable connection monitoring while not associated Luciano Coelho
2010-03-26 10:53 ` [PATCH 15/24] wl1271: Fix ad-hoc mode handling Luciano Coelho
2010-03-26 10:53 ` Luciano Coelho [this message]
2010-03-26 10:53 ` [PATCH 17/24] wl1271: Removed checking of PSM from handling BSS_LOST_EVENT Luciano Coelho
2010-03-26 10:53 ` [PATCH 18/24] wl1271: Fix memory leak in firmware crash scenario Luciano Coelho
2010-03-26 10:53 ` [PATCH 19/24] wl1271: Configure probe-request template when associated Luciano Coelho
2010-03-26 10:53 ` [PATCH 20/24] wl1271: Disconnect if PSM entry fails Luciano Coelho
2010-03-26 10:53 ` [PATCH 21/24] wl1271: Configure HW connection monitor Luciano Coelho
2010-03-26 10:53 ` [PATCH 22/24] wl1271: Add keep-alive frame template support Luciano Coelho
2010-03-26 10:53 ` [PATCH 23/24] wl1271: Enable hardware keep alive messages Luciano Coelho
2010-03-26 10:53 ` [PATCH 24/24] wl1271: Fix msleep() delay while waiting for completion Luciano Coelho
2010-03-26 13:02 ` [PATCH 00/24] wl1271: bunch of patches from our internal tree wk12 John W. Linville
2010-03-26 13:13 ` Luciano Coelho
2010-03-26 13:26 ` John W. Linville
2010-03-26 13:37 ` 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=1269600813-32145-17-git-send-email-luciano.coelho@nokia.com \
--to=luciano.coelho@nokia.com \
--cc=juuso.oikarinen@nokia.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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 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).