mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
75edd2c680
commit
40d0703062
|
@ -29,6 +29,7 @@ mwifiex-y += scan.o
|
||||||
mwifiex-y += join.o
|
mwifiex-y += join.o
|
||||||
mwifiex-y += sta_ioctl.o
|
mwifiex-y += sta_ioctl.o
|
||||||
mwifiex-y += sta_cmd.o
|
mwifiex-y += sta_cmd.o
|
||||||
|
mwifiex-y += uap_cmd.o
|
||||||
mwifiex-y += sta_cmdresp.o
|
mwifiex-y += sta_cmdresp.o
|
||||||
mwifiex-y += sta_event.o
|
mwifiex-y += sta_event.o
|
||||||
mwifiex-y += sta_tx.o
|
mwifiex-y += sta_tx.o
|
||||||
|
|
|
@ -545,8 +545,20 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
|
||||||
|
|
||||||
/* Prepare command */
|
/* Prepare command */
|
||||||
if (cmd_no) {
|
if (cmd_no) {
|
||||||
ret = mwifiex_sta_prepare_cmd(priv, cmd_no, cmd_action,
|
switch (cmd_no) {
|
||||||
cmd_oid, data_buf, cmd_ptr);
|
case HostCmd_CMD_UAP_SYS_CONFIG:
|
||||||
|
case HostCmd_CMD_UAP_BSS_START:
|
||||||
|
case HostCmd_CMD_UAP_BSS_STOP:
|
||||||
|
ret = mwifiex_uap_prepare_cmd(priv, cmd_no, cmd_action,
|
||||||
|
cmd_oid, data_buf,
|
||||||
|
cmd_ptr);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ret = mwifiex_sta_prepare_cmd(priv, cmd_no, cmd_action,
|
||||||
|
cmd_oid, data_buf,
|
||||||
|
cmd_ptr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = mwifiex_cmd_host_cmd(priv, cmd_ptr, data_buf);
|
ret = mwifiex_cmd_host_cmd(priv, cmd_ptr, data_buf);
|
||||||
cmd_node->cmd_flag |= CMD_F_HOSTCMD;
|
cmd_node->cmd_flag |= CMD_F_HOSTCMD;
|
||||||
|
|
|
@ -210,6 +210,9 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
|
||||||
#define HostCmd_CMD_RSSI_INFO 0x00a4
|
#define HostCmd_CMD_RSSI_INFO 0x00a4
|
||||||
#define HostCmd_CMD_FUNC_INIT 0x00a9
|
#define HostCmd_CMD_FUNC_INIT 0x00a9
|
||||||
#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
|
#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
|
||||||
|
#define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
|
||||||
|
#define HostCmd_CMD_UAP_BSS_START 0x00b1
|
||||||
|
#define HostCmd_CMD_UAP_BSS_STOP 0x00b2
|
||||||
#define HostCmd_CMD_11N_CFG 0x00cd
|
#define HostCmd_CMD_11N_CFG 0x00cd
|
||||||
#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
|
#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
|
||||||
#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
|
#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
|
||||||
|
|
|
@ -762,6 +762,9 @@ int mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
|
||||||
int mwifiex_sta_prepare_cmd(struct mwifiex_private *, uint16_t cmd_no,
|
int mwifiex_sta_prepare_cmd(struct mwifiex_private *, uint16_t cmd_no,
|
||||||
u16 cmd_action, u32 cmd_oid,
|
u16 cmd_action, u32 cmd_oid,
|
||||||
void *data_buf, void *cmd_buf);
|
void *data_buf, void *cmd_buf);
|
||||||
|
int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
|
||||||
|
u16 cmd_action, u32 cmd_oid,
|
||||||
|
void *data_buf, void *cmd_buf);
|
||||||
int mwifiex_process_sta_cmdresp(struct mwifiex_private *, u16 cmdresp_no,
|
int mwifiex_process_sta_cmdresp(struct mwifiex_private *, u16 cmdresp_no,
|
||||||
struct host_cmd_ds_command *resp);
|
struct host_cmd_ds_command *resp);
|
||||||
int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
|
int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
|
||||||
|
|
|
@ -944,6 +944,14 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
|
||||||
case HostCmd_CMD_802_11_SUBSCRIBE_EVENT:
|
case HostCmd_CMD_802_11_SUBSCRIBE_EVENT:
|
||||||
ret = mwifiex_ret_subsc_evt(priv, resp, data_buf);
|
ret = mwifiex_ret_subsc_evt(priv, resp, data_buf);
|
||||||
break;
|
break;
|
||||||
|
case HostCmd_CMD_UAP_SYS_CONFIG:
|
||||||
|
break;
|
||||||
|
case HostCmd_CMD_UAP_BSS_START:
|
||||||
|
priv->bss_started = 1;
|
||||||
|
break;
|
||||||
|
case HostCmd_CMD_UAP_BSS_STOP:
|
||||||
|
priv->bss_started = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n",
|
dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n",
|
||||||
resp->command);
|
resp->command);
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* Marvell Wireless LAN device driver: AP specific command handling
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012, Marvell International Ltd.
|
||||||
|
*
|
||||||
|
* This software file (the "File") is distributed by Marvell International
|
||||||
|
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
|
||||||
|
* (the "License"). You may use, redistribute and/or modify this File in
|
||||||
|
* accordance with the terms and conditions of the License, a copy of which
|
||||||
|
* is available by writing to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||||
|
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||||
|
*
|
||||||
|
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||||
|
* this warranty disclaimer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
/* This function prepares the AP specific commands before sending them
|
||||||
|
* to the firmware.
|
||||||
|
* This is a generic function which calls specific command preparation
|
||||||
|
* routines based upon the command number.
|
||||||
|
*/
|
||||||
|
int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
|
||||||
|
u16 cmd_action, u32 cmd_oid,
|
||||||
|
void *data_buf, void *cmd_buf)
|
||||||
|
{
|
||||||
|
struct host_cmd_ds_command *cmd = cmd_buf;
|
||||||
|
|
||||||
|
switch (cmd_no) {
|
||||||
|
case HostCmd_CMD_UAP_BSS_START:
|
||||||
|
case HostCmd_CMD_UAP_BSS_STOP:
|
||||||
|
cmd->command = cpu_to_le16(cmd_no);
|
||||||
|
cmd->size = cpu_to_le16(S_DS_GEN);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
dev_err(priv->adapter->dev,
|
||||||
|
"PREP_CMD: unknown cmd %#x\n", cmd_no);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue