aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/uap_cmd.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2012-05-08 21:30:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-16 12:46:35 -0400
commit40d07030625840156bffe2da3e9f14f87d7a4a99 (patch)
tree4ff6b294a507e0efbddaef446ce0455f45bb9da1 /drivers/net/wireless/mwifiex/uap_cmd.c
parent75edd2c6803aec27083643e21aeb9b531587803f (diff)
mwifiex: add bss start and bss stop commands for AP
1. separate file for preparing uAP command buffer 2. definition of bss_start and bss_stop commands being sent to firmware Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/uap_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
new file mode 100644
index 000000000000..97002a40d1c1
--- /dev/null
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -0,0 +1,46 @@
1/*
2 * Marvell Wireless LAN device driver: AP specific command handling
3 *
4 * Copyright (C) 2012, Marvell International Ltd.
5 *
6 * This software file (the "File") is distributed by Marvell International
7 * Ltd. under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
13 *
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
18 */
19
20#include "main.h"
21
22/* This function prepares the AP specific commands before sending them
23 * to the firmware.
24 * This is a generic function which calls specific command preparation
25 * routines based upon the command number.
26 */
27int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
28 u16 cmd_action, u32 cmd_oid,
29 void *data_buf, void *cmd_buf)
30{
31 struct host_cmd_ds_command *cmd = cmd_buf;
32
33 switch (cmd_no) {
34 case HostCmd_CMD_UAP_BSS_START:
35 case HostCmd_CMD_UAP_BSS_STOP:
36 cmd->command = cpu_to_le16(cmd_no);
37 cmd->size = cpu_to_le16(S_DS_GEN);
38 break;
39 default:
40 dev_err(priv->adapter->dev,
41 "PREP_CMD: unknown cmd %#x\n", cmd_no);
42 return -1;
43 }
44
45 return 0;
46}