From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 06/12] wl12xx: Driver-FW API changes
Date: Mon, 30 Jan 2012 14:00:51 +0200 [thread overview]
Message-ID: <1327924857-1250-7-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1327924857-1250-1-git-send-email-eliad@wizery.com>
From: Eyal Shapira <eyal@wizery.com>
- New ACX enum
- Added DFS commands
- Changes to channel switch command/event
- Added reset_tsf to ap role start command
- Added ACX for PROTECTION configuration
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/cmd.c | 10 ++++++++--
drivers/net/wireless/wl12xx/cmd.h | 17 ++++++++++++-----
drivers/net/wireless/wl12xx/main.c | 2 +-
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index c4990da..88e94c5 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -715,6 +715,8 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int);
cmd->ap.dtim_interval = bss_conf->dtim_period;
cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP;
+ /* FIXME: Change when adding DFS */
+ cmd->ap.reset_tsf = 1; /* By default reset AP TSF */
cmd->channel = wlvif->channel;
if (!bss_conf->hidden_ssid) {
@@ -1756,6 +1758,7 @@ out:
}
int wl12xx_cmd_channel_switch(struct wl1271 *wl,
+ struct wl12xx_vif *wlvif,
struct ieee80211_channel_switch *ch_switch)
{
struct wl12xx_cmd_channel_switch *cmd;
@@ -1769,10 +1772,13 @@ int wl12xx_cmd_channel_switch(struct wl1271 *wl,
goto out;
}
+ cmd->role_id = wlvif->role_id;
cmd->channel = ch_switch->channel->hw_value;
cmd->switch_time = ch_switch->count;
- cmd->tx_suspend = ch_switch->block_tx;
- cmd->flush = 0; /* this value is ignored by the FW */
+ cmd->stop_tx = ch_switch->block_tx;
+
+ /* FIXME: control from mac80211 in the future */
+ cmd->post_switch_tx_disable = 0; /* Enable TX on the target channel */
ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0);
if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h
index faf046b..edd240d 100644
--- a/drivers/net/wireless/wl12xx/cmd.h
+++ b/drivers/net/wireless/wl12xx/cmd.h
@@ -91,6 +91,7 @@ int wl12xx_cmd_config_fwlog(struct wl1271 *wl);
int wl12xx_cmd_start_fwlog(struct wl1271 *wl);
int wl12xx_cmd_stop_fwlog(struct wl1271 *wl);
int wl12xx_cmd_channel_switch(struct wl1271 *wl,
+ struct wl12xx_vif *wlvif,
struct ieee80211_channel_switch *ch_switch);
int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl);
int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif,
@@ -344,7 +345,9 @@ struct wl12xx_cmd_role_start {
u8 ssid_len;
u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 padding_1[5];
+ u8 reset_tsf;
+
+ u8 padding_1[4];
} __packed ap;
};
} __packed;
@@ -704,14 +707,18 @@ struct wl12xx_cmd_stop_fwlog {
struct wl12xx_cmd_channel_switch {
struct wl1271_cmd_header header;
+ u8 role_id;
+
/* The new serving channel */
u8 channel;
/* Relative time of the serving channel switch in TBTT units */
u8 switch_time;
- /* 1: Suspend TX till switch time; 0: Do not suspend TX */
- u8 tx_suspend;
- /* 1: Flush TX at switch time; 0: Do not flush */
- u8 flush;
+ /* Stop the role TX, should expect it after radar detection */
+ u8 stop_tx;
+ /* The target channel tx status 1-stopped 0-open*/
+ u8 post_switch_tx_disable;
+
+ u8 padding[3];
} __packed;
struct wl12xx_cmd_stop_channel_switch {
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 1c73c01..eac5d52 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -4381,7 +4381,7 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
/* TODO: change mac80211 to pass vif as param */
wl12xx_for_each_wlvif_sta(wl, wlvif) {
- ret = wl12xx_cmd_channel_switch(wl, ch_switch);
+ ret = wl12xx_cmd_channel_switch(wl, wlvif, ch_switch);
if (!ret)
set_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags);
--
1.7.6.401.g6a319
next prev parent reply other threads:[~2012-01-30 11:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 12:00 [PATCH 00/12] wl12xx: update fw api Eliad Peller
2012-01-30 12:00 ` [PATCH 01/12] wl12xx: fw api change - add role_id to set_template Eliad Peller
2012-01-30 19:53 ` Luciano Coelho
2012-01-31 9:40 ` Eliad Peller
2012-01-30 12:00 ` [PATCH 02/12] wl12xx: use dev_role_id for scans Eliad Peller
2012-01-30 12:00 ` [PATCH 03/12] wl12xx: use dev_role_id for sched scan Eliad Peller
2012-01-30 19:47 ` Luciano Coelho
2012-01-30 12:00 ` [PATCH 04/12] wl12xx: fw api change - add role_id to tsf_info Eliad Peller
2012-01-30 12:00 ` [PATCH 05/12] wl12xx: fw api change - update cmd/acx/event enums Eliad Peller
2012-01-30 12:00 ` Eliad Peller [this message]
2012-01-30 19:48 ` [PATCH 06/12] wl12xx: Driver-FW API changes Luciano Coelho
2012-01-30 12:00 ` [PATCH 07/12] wl12xx: remove PS management code Eliad Peller
2012-01-30 12:00 ` [PATCH 08/12] wl12xx: add support for HW dynamic PS Eliad Peller
2012-01-30 12:00 ` [PATCH 09/12] wl12xx: add dynamic_ps_timeout debugfs file Eliad Peller
2012-01-30 12:00 ` [PATCH 10/12] wl12xx: remove 2 unused parameters in wl1271_ps_set_mode() Eliad Peller
2012-01-30 12:00 ` [PATCH 11/12] wl12xx: enable/disable BET with AUTO_PS/ACTIVE Eliad Peller
2012-01-30 12:00 ` [PATCH 12/12] wl12xx: change WLVIF_FLAG_PSM name and remove WLVIF_FLAG_PSM_REQUESTED Eliad Peller
2012-01-30 13:29 ` [PATCH 00/12] wl12xx: update fw api Kalle Valo
2012-01-30 13:52 ` Eliad Peller
2012-01-30 13:55 ` Luciano Coelho
2012-01-30 19:59 ` Luciano Coelho
2012-01-31 7:50 ` Kalle Valo
2012-01-31 9:43 ` Eliad Peller
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=1327924857-1250-7-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 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).