Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266553
b: refs/heads/master
c: 2387513
h: refs/heads/master
i:
  266551: 0ea422a
v: v3
  • Loading branch information
Jouni Malinen authored and Kalle Valo committed Aug 31, 2011
1 parent ef4532f commit 0117f20
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a5b13182cc10d693c55a5c02d753e54514b9bfc
refs/heads/master: 238751365a1c42b1d66beb03dd81ca5d0fd12833
20 changes: 20 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,25 @@ static int ath6kl_del_beacon(struct wiphy *wiphy, struct net_device *dev)
return 0;
}

static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_parameters *params)
{
struct ath6kl *ar = ath6kl_priv(dev);

if (ar->nw_type != AP_NETWORK)
return -EOPNOTSUPP;

/* Use this only for authorizing/unauthorizing a station */
if (!(params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)))
return -EOPNOTSUPP;

if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))
return ath6kl_wmi_ap_set_mlme(ar->wmi, WMI_AP_MLME_AUTHORIZE,
mac, 0);
return ath6kl_wmi_ap_set_mlme(ar->wmi, WMI_AP_MLME_UNAUTHORIZE, mac,
0);
}

static struct cfg80211_ops ath6kl_cfg80211_ops = {
.change_virtual_intf = ath6kl_cfg80211_change_iface,
.scan = ath6kl_cfg80211_scan,
Expand All @@ -1665,6 +1684,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.add_beacon = ath6kl_add_beacon,
.set_beacon = ath6kl_set_beacon,
.del_beacon = ath6kl_del_beacon,
.change_station = ath6kl_change_station,
};

struct wireless_dev *ath6kl_cfg80211_init(struct device *dev)
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,24 @@ int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p)
return res;
}

int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 cmd, const u8 *mac, u16 reason)
{
struct sk_buff *skb;
struct wmi_ap_set_mlme_cmd *cm;

skb = ath6kl_wmi_get_new_buf(sizeof(*cm));
if (!skb)
return -ENOMEM;

cm = (struct wmi_ap_set_mlme_cmd *) skb->data;
memcpy(cm->mac, mac, ETH_ALEN);
cm->reason = cpu_to_le16(reason);
cm->cmd = cmd;

return ath6kl_wmi_cmd_send(wmip, skb, WMI_AP_SET_MLME_CMDID,
NO_SYNC_WMIFLAG);
}

static int ath6kl_wmi_pspoll_event_rx(struct wmi *wmi, u8 *datap, int len)
{
struct wmi_pspoll_event *ev;
Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,23 @@ struct wmi_tx_complete_event {

/* Used with WMI_AP_SET_NUM_STA_CMDID */

/*
* Used with WMI_AP_SET_MLME_CMDID
*/

/* MLME Commands */
#define WMI_AP_MLME_ASSOC 1 /* associate station */
#define WMI_AP_DISASSOC 2 /* disassociate station */
#define WMI_AP_DEAUTH 3 /* deauthenticate station */
#define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
#define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */

struct wmi_ap_set_mlme_cmd {
u8 mac[ETH_ALEN];
__le16 reason; /* 802.11 reason code */
u8 cmd; /* operation to perform (WMI_AP_*) */
} __packed;

struct wmi_ap_set_pvb_cmd {
__le32 flag;
__le16 aid;
Expand Down Expand Up @@ -2023,6 +2040,8 @@ void ath6kl_wmi_node_return(struct wmi *wmi, struct bss *bss);
/* AP mode */
int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, struct wmi_connect_cmd *p);

int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 cmd, const u8 *mac, u16 reason);

int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag);

int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 rx_meta_version,
Expand Down

0 comments on commit 0117f20

Please sign in to comment.