Skip to content

Commit

Permalink
wlcore: add scheduled scan templates
Browse files Browse the repository at this point in the history
  • Loading branch information
elp committed Aug 3, 2012
1 parent 52cfe2b commit d476c95
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ti/wl18xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN |
WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN |
WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN |
WLCORE_QUIRK_TX_PAD_LAST_FRAME;
WLCORE_QUIRK_TX_PAD_LAST_FRAME |
WLCORE_QUIRK_DUAL_PROBE_TMPL;

wlcore_set_min_fw_ver(wl, WL18XX_CHIP_VER, WL18XX_IFTYPE_VER,
WL18XX_MAJOR_VER, WL18XX_SUBTYPE_VER,
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ti/wlcore/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,8 @@ int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif,
struct sk_buff *skb;
int ret;
u32 rate;
u16 template_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4;
u16 template_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5;
u16 template_id_2_4 = CMD_TEMPL_PROBE_REQ_2_4_PERIODIC;
u16 template_id_5 = CMD_TEMPL_PROBE_REQ_5_PERIODIC;

skb = ieee80211_probereq_get(wl->hw, vif, ssid, ssid_len,
ie, ie_len);
Expand All @@ -1052,8 +1052,8 @@ int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif,

if (!sched_scan &&
(wl->quirks & WLCORE_QUIRK_DUAL_PROBE_TMPL)) {
template_id_2_4 = CMD_TEMPL_APP_PROBE_REQ_2_4;
template_id_5 = CMD_TEMPL_APP_PROBE_REQ_5;
template_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4;
template_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5;
}

rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/ti/wlcore/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ enum cmd_templ {
CMD_TEMPL_PS_POLL,
CMD_TEMPL_KLV,
CMD_TEMPL_DISCONNECT,
CMD_TEMPL_APP_PROBE_REQ_2_4,
CMD_TEMPL_APP_PROBE_REQ_5,
CMD_TEMPL_APP_PROBE_REQ_2_4_INVALID,
CMD_TEMPL_APP_PROBE_REQ_5_INVALID,
CMD_TEMPL_BAR, /* for firmware internal use only */
CMD_TEMPL_CTS, /*
* For CTS-to-self (FastCTS) mechanism
Expand All @@ -181,6 +181,8 @@ enum cmd_templ {
CMD_TEMPL_DEAUTH_AP,
CMD_TEMPL_TEMPORARY,
CMD_TEMPL_LINK_MEASUREMENT_REPORT,
CMD_TEMPL_PROBE_REQ_2_4_PERIODIC,
CMD_TEMPL_PROBE_REQ_5_PERIODIC,

CMD_TEMPL_MAX = 0xff
};
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/ti/wlcore/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ int wl1271_init_templates_config(struct wl1271 *wl)

if (wl->quirks & WLCORE_QUIRK_DUAL_PROBE_TMPL) {
ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
CMD_TEMPL_APP_PROBE_REQ_2_4, NULL,
CMD_TEMPL_PROBE_REQ_2_4_PERIODIC,
NULL,
WL1271_CMD_TEMPL_MAX_SIZE,
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
CMD_TEMPL_APP_PROBE_REQ_5, NULL,
CMD_TEMPL_PROBE_REQ_5_PERIODIC,
NULL,
WL1271_CMD_TEMPL_MAX_SIZE,
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/ti/wlcore/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
req->ssids[0].ssid,
req->ssids[0].ssid_len,
req->ie,
req->ie_len);
req->ie_len,
false);
if (ret < 0) {
wl1271_error("2.4GHz PROBE request template failed");
goto out;
Expand All @@ -348,7 +349,8 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
req->ssids[0].ssid,
req->ssids[0].ssid_len,
req->ie,
req->ie_len);
req->ie_len,
false);
if (ret < 0) {
wl1271_error("5GHz PROBE request template failed");
goto out;
Expand Down

0 comments on commit d476c95

Please sign in to comment.