All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 24/40] wl12xx: call wl1271_cmd_set_peer_state() in AP mode
Date: Tue,  9 Aug 2011 12:13:37 +0300	[thread overview]
Message-ID: <1312881233-9366-25-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1312881233-9366-1-git-send-email-eliad@wizery.com>

After adding a station, call wl1271_cmd_set_peer_state().
This is required for 11n support.

Change wl1271_cmd_set_peer_state() prototype to get hlid
as param.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/net/wireless/wl12xx/cmd.c  |    6 +++---
 drivers/net/wireless/wl12xx/cmd.h  |    2 +-
 drivers/net/wireless/wl12xx/main.c |    6 +++++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 6ef9d13..7cf4d53 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -1318,26 +1318,26 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
 
 out:
 	kfree(cmd);
 	return ret;
 }
 
-int wl1271_cmd_set_peer_state(struct wl1271 *wl)
+int wl1271_cmd_set_peer_state(struct wl1271 *wl, u8 hlid)
 {
 	struct wl1271_cmd_set_peer_state *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd set sta state (hlid=%d)", wl->sta_hlid);
+	wl1271_debug(DEBUG_CMD, "cmd set sta state (hlid=%d)", hlid);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
 		ret = -ENOMEM;
 		goto out;
 	}
 
-	cmd->hlid = wl->sta_hlid;
+	cmd->hlid = hlid;
 	cmd->state = WL1271_CMD_STA_STATE_CONNECTED;
 
 	ret = wl1271_cmd_send(wl, CMD_SET_PEER_STATE, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
 		wl1271_error("failed to send set STA state command");
 		goto out_free;
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h
index 6f2a831..2ae2d73 100644
--- a/drivers/net/wireless/wl12xx/cmd.h
+++ b/drivers/net/wireless/wl12xx/cmd.h
@@ -67,13 +67,13 @@ int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid);
 int wl1271_cmd_set_sta_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
 			   u8 key_size, const u8 *key, const u8 *addr,
 			   u32 tx_seq_32, u16 tx_seq_16);
 int wl1271_cmd_set_ap_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
 			  u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32,
 			  u16 tx_seq_16);
-int wl1271_cmd_set_peer_state(struct wl1271 *wl);
+int wl1271_cmd_set_peer_state(struct wl1271 *wl, u8 hlid);
 int wl1271_roc(struct wl1271 *wl, u8 role_id);
 int wl1271_croc(struct wl1271 *wl, u8 role_id);
 int wl1271_cmd_add_peer(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid);
 int wl1271_cmd_remove_peer(struct wl1271 *wl, u8 hlid);
 int wl12xx_cmd_config_fwlog(struct wl1271 *wl);
 int wl12xx_cmd_start_fwlog(struct wl1271 *wl);
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index e523f0b..6a87086 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -391,13 +391,13 @@ static int wl1271_check_operstate(struct wl1271 *wl, unsigned char operstate)
 	if (operstate != IF_OPER_UP)
 		return 0;
 
 	if (test_and_set_bit(WL1271_FLAG_STA_STATE_SENT, &wl->flags))
 		return 0;
 
-	ret = wl1271_cmd_set_peer_state(wl);
+	ret = wl1271_cmd_set_peer_state(wl, wl->sta_hlid);
 	if (ret < 0)
 		return ret;
 
 	wl1271_croc(wl, wl->role_id);
 
 	wl1271_info("Association completed.");
@@ -3641,12 +3641,16 @@ static int wl1271_op_sta_add(struct ieee80211_hw *hw,
 		goto out_free_sta;
 
 	ret = wl1271_cmd_add_peer(wl, sta, hlid);
 	if (ret < 0)
 		goto out_sleep;
 
+	ret = wl1271_cmd_set_peer_state(wl, hlid);
+	if (ret < 0)
+		goto out_sleep;
+
 out_sleep:
 	wl1271_ps_elp_sleep(wl);
 
 out_free_sta:
 	if (ret < 0)
 		wl1271_free_sta(wl, hlid);
-- 
1.7.6.401.g6a319


  parent reply	other threads:[~2011-08-09  9:14 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09  9:13 [PATCH 00/40] wl12xx: move to wl12xx-fw-3 Eliad Peller
2011-08-09  9:13 ` [PATCH 01/40] wl12xx: Revert "wl12xx: schedule TX packets according to FW occupancy" Eliad Peller
2011-08-09 11:54   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 02/40] wl12xx: Use a single fw for both STA and AP roles Eliad Peller
2011-08-09 11:59   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 03/40] wl12xx: use 1 spare block in all cases Eliad Peller
2011-08-09 12:03   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 04/40] wl12xx: temporarily disable 11n and advanced ap functions Eliad Peller
2011-08-09 12:49   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 05/40] wl12xx: remove rx filtering stuff Eliad Peller
2011-08-09 13:19   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 06/40] wl12xx: wl12xx-fw-3 - Update fw status struct Eliad Peller
2011-08-09 13:37   ` Luciano Coelho
2011-08-09 19:12   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 07/40] wl12xx: wl12xx-fw-3 - update acx commands Eliad Peller
2011-08-09 19:29   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 08/40] wl12xx: wl12xx-fw-3 - update commands & events Eliad Peller
2011-08-10  9:19   ` Luciano Coelho
2011-08-10  9:53     ` Eliad Peller
2011-08-10 10:26       ` Luciano Coelho
2011-08-10 10:24     ` Eliad Peller
2011-08-10 10:27       ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 09/40] wl12xx: enable/disable role on interface add/remove Eliad Peller
2011-08-10 11:32   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 10/40] wl12xx: add device role commands Eliad Peller
2011-08-10 11:54   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 11/40] wl12xx: wl12xx-fw-3 - update scan cmd api Eliad Peller
2011-08-09  9:13 ` [PATCH 12/40] wl12xx: wl12xx-fw-3 - rx/tx changes Eliad Peller
2011-08-09  9:13 ` [PATCH 13/40] wl12xx: wl12xx-fw-3 - change max/default template size Eliad Peller
2011-08-09  9:13 ` [PATCH 14/40] wl12xx: use wl1271_acx_beacon_filter_opt for both sta and ap Eliad Peller
2011-08-09  9:13 ` [PATCH 15/40] wl12xx: add set_rate_mgmt_params acx Eliad Peller
2011-08-10 12:31   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 16/40] wl12xx: add system_hlid Eliad Peller
2011-08-10 12:48   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 17/40] wl12xx: add ROC/CROC commands Eliad Peller
2011-08-10 12:57   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 18/40] wl12xx: replace dummy_join with " Eliad Peller
2011-08-10 14:31   ` Luciano Coelho
2011-08-11 11:03     ` Eliad Peller
2011-08-09  9:13 ` [PATCH 19/40] wl12xx: handle dummy packet event also in ap mode Eliad Peller
2011-08-09  9:13 ` [PATCH 20/40] wl12xx: update BT coex configuration params Eliad Peller
2011-08-10 15:16   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 21/40] wl12xx: fix session counter Eliad Peller
2011-08-10 15:20   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 22/40] wl12xx: use dynamic hlids for AP-mode Eliad Peller
2011-08-10 19:39   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 23/40] wl12xx: re-enable block ack session support Eliad Peller
2011-08-10 19:54   ` Luciano Coelho
2011-08-15  9:34   ` Levi, Shahar
2011-08-09  9:13 ` Eliad Peller [this message]
2011-08-09  9:13 ` [PATCH 25/40] wl12xx: don't remove key if hlid was already deleted Eliad Peller
2011-08-09  9:13 ` [PATCH 26/40] wl12xx: add wl1271_cmd_role_start_ibss() Eliad Peller
2011-08-11  7:15   ` Luciano Coelho
2011-08-09  9:13 ` [PATCH 27/40] wl12xx: support IBSS vif type Eliad Peller
2011-08-09  9:13 ` [PATCH 28/40] wl12xx: AP-mode - set STA HT capabilities when adding a STA Eliad Peller
2011-08-09  9:13 ` [PATCH 29/40] wl12xx: AP-mode - configure STA HT rates on join Eliad Peller
2011-08-09  9:13 ` [PATCH 30/40] wl12xx: AP-mode - configure HT rate support to the FW Eliad Peller
2011-08-10 20:30   ` Luciano Coelho
2011-08-11  4:39     ` Arik Nemtsov
2011-08-09  9:13 ` [PATCH 31/40] wl12xx: use ap_bcast_hlid for recorded keys Eliad Peller
2011-08-09  9:13 ` [PATCH 32/40] wl12xx: don't remove key if hlid was already deleted Eliad Peller
2011-08-09  9:13 ` [PATCH 33/40] wl12xx: track freed packets in FW by AC Eliad Peller
2011-08-11  9:17   ` Luciano Coelho
2011-08-11  9:41     ` Eliad Peller
2011-08-11 16:11       ` Arik Nemtsov
2011-08-09  9:13 ` [PATCH 34/40] wl12xx: schedule TX packets according to FW packet occupancy Eliad Peller
2011-08-11 11:38   ` Luciano Coelho
2011-08-11 20:54     ` Arik Nemtsov
2011-08-09  9:13 ` [PATCH 35/40] wl12xx: handle wrap-around overflow in released Tx blocks FW counter Eliad Peller
2011-08-09  9:13 ` [PATCH 36/40] wl12xx: enable AP advanced functionality Eliad Peller
2011-08-09  9:13 ` [PATCH 37/40] wl12xx: don't wait for disconnection event Eliad Peller
2011-08-11 11:53   ` Luciano Coelho
2011-08-11 12:30     ` Eliad Peller
2011-08-09  9:13 ` [PATCH 38/40] wl12xx: set the AP-started flag only after setting keys Eliad Peller
2011-08-09  9:13 ` [PATCH 39/40] wl12xx: AP-mode - prevent Tx to stale/invalid stations Eliad Peller
2011-08-09  9:13 ` [PATCH 40/40] wl12xx: fix tx_queue_count spurious increment Eliad Peller
2011-08-11 11:57 ` [PATCH 00/40] wl12xx: move to wl12xx-fw-3 Luciano Coelho
2011-08-11 12:31   ` 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=1312881233-9366-25-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.