-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 327448 b: refs/heads/master c: 3d99d98 h: refs/heads/master v: v3
- Loading branch information
Avinash Patil
authored and
John W. Linville
committed
Aug 6, 2012
1 parent
ad9dff2
commit afa6b2b
Showing
6 changed files
with
108 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: c82589131840767443f32f6d235a825cbef7b914 | ||
refs/heads/master: 3d99d9877dabc6468c3df1c990d436bd221b5089 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Marvell Wireless LAN device driver: AP event 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 "decl.h" | ||
#include "main.h" | ||
|
||
/* | ||
* This function handles AP interface specific events generated by firmware. | ||
* | ||
* Event specific routines are called by this function based | ||
* upon the generated event cause. | ||
* | ||
* | ||
* Events supported for AP - | ||
* - EVENT_UAP_STA_ASSOC | ||
* - EVENT_UAP_STA_DEAUTH | ||
* - EVENT_UAP_BSS_ACTIVE | ||
* - EVENT_UAP_BSS_START | ||
* - EVENT_UAP_BSS_IDLE | ||
* - EVENT_UAP_MIC_COUNTERMEASURES: | ||
*/ | ||
int mwifiex_process_uap_event(struct mwifiex_private *priv) | ||
{ | ||
struct mwifiex_adapter *adapter = priv->adapter; | ||
int len; | ||
u32 eventcause = adapter->event_cause; | ||
struct station_info sinfo; | ||
struct mwifiex_assoc_event *event; | ||
|
||
switch (eventcause) { | ||
case EVENT_UAP_STA_ASSOC: | ||
memset(&sinfo, 0, sizeof(sinfo)); | ||
event = (struct mwifiex_assoc_event *) | ||
(adapter->event_body + MWIFIEX_UAP_EVENT_EXTRA_HEADER); | ||
if (le16_to_cpu(event->type) == TLV_TYPE_UAP_MGMT_FRAME) { | ||
len = -1; | ||
|
||
if (ieee80211_is_assoc_req(event->frame_control)) | ||
len = 0; | ||
else if (ieee80211_is_reassoc_req(event->frame_control)) | ||
/* There will be ETH_ALEN bytes of | ||
* current_ap_addr before the re-assoc ies. | ||
*/ | ||
len = ETH_ALEN; | ||
|
||
if (len != -1) { | ||
sinfo.filled = STATION_INFO_ASSOC_REQ_IES; | ||
sinfo.assoc_req_ies = &event->data[len]; | ||
len = (u8 *)sinfo.assoc_req_ies - | ||
(u8 *)&event->frame_control; | ||
sinfo.assoc_req_ies_len = | ||
le16_to_cpu(event->len) - (u16)len; | ||
} | ||
} | ||
cfg80211_new_sta(priv->netdev, event->sta_addr, &sinfo, | ||
GFP_KERNEL); | ||
break; | ||
case EVENT_UAP_STA_DEAUTH: | ||
cfg80211_del_sta(priv->netdev, adapter->event_body + | ||
MWIFIEX_UAP_EVENT_EXTRA_HEADER, GFP_KERNEL); | ||
break; | ||
case EVENT_UAP_BSS_IDLE: | ||
priv->media_connected = false; | ||
break; | ||
case EVENT_UAP_BSS_ACTIVE: | ||
priv->media_connected = true; | ||
break; | ||
case EVENT_UAP_BSS_START: | ||
dev_dbg(adapter->dev, "AP EVENT: event id: %#x\n", eventcause); | ||
memcpy(priv->netdev->dev_addr, adapter->event_body + 2, | ||
ETH_ALEN); | ||
break; | ||
case EVENT_UAP_MIC_COUNTERMEASURES: | ||
/* For future development */ | ||
dev_dbg(adapter->dev, "AP EVENT: event id: %#x\n", eventcause); | ||
break; | ||
default: | ||
dev_dbg(adapter->dev, "event: unknown event id: %#x\n", | ||
eventcause); | ||
break; | ||
} | ||
|
||
return 0; | ||
} |