aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/uap_cmd.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-05-17 20:50:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-05-22 15:08:54 -0400
commit0f9e9b8ba72bc75ee6189d0e86639f7e7a494a30 (patch)
treec01e5f8021491c49dee446131b0c9b766905165f /drivers/net/wireless/mwifiex/uap_cmd.c
parentbdd4d6bf59c046e5a3d1ac67ba7b1c9ea540b6e3 (diff)
mwifiex: add del_station handler
This patch adds cfg80211 del_station handler for mwifiex. If bss is not started or there are no stations in associated stations list, no action is taken. If argument received is null/broadcast mac, all stations in associated station list are deauthenticated. Patch also deletes related RxReorder stream and TxBA stream tables for related station. Signed-off-by: Avinash Patil <patila@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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index b04b1db29100..2de882dead0f 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -689,6 +689,23 @@ mwifiex_cmd_uap_sys_config(struct host_cmd_ds_command *cmd, u16 cmd_action,
689 return 0; 689 return 0;
690} 690}
691 691
692/* This function prepares AP specific deauth command with mac supplied in
693 * function parameter.
694 */
695static int mwifiex_cmd_uap_sta_deauth(struct mwifiex_private *priv,
696 struct host_cmd_ds_command *cmd, u8 *mac)
697{
698 struct host_cmd_ds_sta_deauth *sta_deauth = &cmd->params.sta_deauth;
699
700 cmd->command = cpu_to_le16(HostCmd_CMD_UAP_STA_DEAUTH);
701 memcpy(sta_deauth->mac, mac, ETH_ALEN);
702 sta_deauth->reason = cpu_to_le16(WLAN_REASON_DEAUTH_LEAVING);
703
704 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_sta_deauth) +
705 S_DS_GEN);
706 return 0;
707}
708
692/* This function prepares the AP specific commands before sending them 709/* This function prepares the AP specific commands before sending them
693 * to the firmware. 710 * to the firmware.
694 * This is a generic function which calls specific command preparation 711 * This is a generic function which calls specific command preparation
@@ -710,6 +727,10 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
710 cmd->command = cpu_to_le16(cmd_no); 727 cmd->command = cpu_to_le16(cmd_no);
711 cmd->size = cpu_to_le16(S_DS_GEN); 728 cmd->size = cpu_to_le16(S_DS_GEN);
712 break; 729 break;
730 case HostCmd_CMD_UAP_STA_DEAUTH:
731 if (mwifiex_cmd_uap_sta_deauth(priv, cmd, data_buf))
732 return -1;
733 break;
713 default: 734 default:
714 dev_err(priv->adapter->dev, 735 dev_err(priv->adapter->dev,
715 "PREP_CMD: unknown cmd %#x\n", cmd_no); 736 "PREP_CMD: unknown cmd %#x\n", cmd_no);