aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-05-27 05:53:01 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-09-28 05:15:03 -0400
commitbe86cbea1e9c3a4dd8faedcfa327495d09fe3531 (patch)
tree67d30209a3a5771d99c415df8c724e44b58bbbc6
parent98d633b64a55d6f3e943951ca35f283b0901d7db (diff)
wl1271: Implement CMD_SET_STA_STATE to indicate connection completion to FW
Implement the command function to send CMD_SET_STA_STATE to the firmware. This is used to indicate that association (and the related EAP negotiation) are complete. This is used to tune WLAN-BT coexistense priority towards BT, improving BT A2DP and SCO performance. 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>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c28
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.h10
2 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index ce503ddd5a41..a338b1c93a29 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -746,3 +746,31 @@ out_free:
746out: 746out:
747 return ret; 747 return ret;
748} 748}
749
750int wl1271_cmd_set_sta_state(struct wl1271 *wl)
751{
752 struct wl1271_cmd_set_sta_state *cmd;
753 int ret = 0;
754
755 wl1271_debug(DEBUG_CMD, "cmd set sta state");
756
757 cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
758 if (!cmd) {
759 ret = -ENOMEM;
760 goto out;
761 }
762
763 cmd->state = WL1271_CMD_STA_STATE_CONNECTED;
764
765 ret = wl1271_cmd_send(wl, CMD_SET_STA_STATE, cmd, sizeof(*cmd), 0);
766 if (ret < 0) {
767 wl1271_error("failed to send set STA state command");
768 goto out_free;
769 }
770
771out_free:
772 kfree(cmd);
773
774out:
775 return ret;
776}
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h
index af577ee8eb02..ce0476ceb84a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.h
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h
@@ -55,6 +55,7 @@ int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
55 u8 key_size, const u8 *key, const u8 *addr, 55 u8 key_size, const u8 *key, const u8 *addr,
56 u32 tx_seq_32, u16 tx_seq_16); 56 u32 tx_seq_32, u16 tx_seq_16);
57int wl1271_cmd_disconnect(struct wl1271 *wl); 57int wl1271_cmd_disconnect(struct wl1271 *wl);
58int wl1271_cmd_set_sta_state(struct wl1271 *wl);
58 59
59enum wl1271_commands { 60enum wl1271_commands {
60 CMD_INTERROGATE = 1, /*use this to read information elements*/ 61 CMD_INTERROGATE = 1, /*use this to read information elements*/
@@ -469,4 +470,13 @@ struct wl1271_cmd_disconnect {
469 u8 padding; 470 u8 padding;
470} __packed; 471} __packed;
471 472
473#define WL1271_CMD_STA_STATE_CONNECTED 1
474
475struct wl1271_cmd_set_sta_state {
476 struct wl1271_cmd_header header;
477
478 u8 state;
479 u8 padding[3];
480} __attribute__ ((packed));
481
472#endif /* __WL1271_CMD_H__ */ 482#endif /* __WL1271_CMD_H__ */