Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278073
b: refs/heads/master
c: 6354121
h: refs/heads/master
i:
  278071: 2673504
v: v3
  • Loading branch information
Aarthi Thiruvengadam authored and Kalle Valo committed Nov 11, 2011
1 parent a59180f commit a24dfa2
Show file tree
Hide file tree
Showing 3 changed files with 20 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: 3ef987bee7d56604bcbdbaebf85c51ca2ad87503
refs/heads/master: 635412127e089cc401fdd793f4d3731450419231
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ static bool ath6kl_is_rsn_ie(const u8 *pos)
return pos[0] == WLAN_EID_RSN;
}

static bool ath6kl_is_wps_ie(const u8 *pos)
{
return (pos[0] == WLAN_EID_VENDOR_SPECIFIC &&
pos[1] >= 4 &&
pos[2] == 0x00 && pos[3] == 0x50 && pos[4] == 0xf2 &&
pos[5] == 0x04);
}

static int ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies,
size_t ies_len)
{
Expand All @@ -268,6 +276,12 @@ static int ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies,
size_t len = 0;
int ret;

/*
* Clear previously set flag
*/

ar->connect_ctrl_flags &= ~CONNECT_WPS_FLAG;

/*
* Filter out RSN/WPA IE(s)
*/
Expand All @@ -285,6 +299,10 @@ static int ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies,
memcpy(buf + len, pos, 2 + pos[1]);
len += 2 + pos[1];
}

if (ath6kl_is_wps_ie(pos))
ar->connect_ctrl_flags |= CONNECT_WPS_FLAG;

pos += 2 + pos[1];
}
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ enum wmi_connect_ctrl_flags_bits {
CONNECT_CSA_FOLLOW_BSS = 0x0020,
CONNECT_DO_WPA_OFFLOAD = 0x0040,
CONNECT_DO_NOT_DEAUTH = 0x0080,
CONNECT_WPS_FLAG = 0x0100,
};

struct wmi_connect_cmd {
Expand Down

0 comments on commit a24dfa2

Please sign in to comment.