|
@@ -39,50 +39,58 @@ int wl1271_init_templates_config(struct wl1271 *wl)
|
|
|
int ret, i;
|
|
|
|
|
|
/* send empty templates for fw memory reservation */
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
|
|
|
WL1271_CMD_TEMPL_DFLT_SIZE,
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_CFG_PROBE_REQ_5,
|
|
|
NULL, WL1271_CMD_TEMPL_DFLT_SIZE, 0,
|
|
|
WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_NULL_DATA, NULL,
|
|
|
sizeof(struct wl12xx_null_data_template),
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_PS_POLL, NULL,
|
|
|
sizeof(struct wl12xx_ps_poll_template),
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_QOS_NULL_DATA, NULL,
|
|
|
sizeof
|
|
|
(struct ieee80211_qos_hdr),
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PROBE_RESPONSE, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_PROBE_RESPONSE, NULL,
|
|
|
WL1271_CMD_TEMPL_DFLT_SIZE,
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_BEACON, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_BEACON, NULL,
|
|
|
WL1271_CMD_TEMPL_DFLT_SIZE,
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_ARP_RSP, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_ARP_RSP, NULL,
|
|
|
sizeof
|
|
|
(struct wl12xx_arp_rsp_template),
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
@@ -93,19 +101,22 @@ int wl1271_init_templates_config(struct wl1271 *wl)
|
|
|
* Put very large empty placeholders for all templates. These
|
|
|
* reserve memory for later.
|
|
|
*/
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_AP_PROBE_RESPONSE, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_AP_PROBE_RESPONSE, NULL,
|
|
|
WL1271_CMD_TEMPL_MAX_SIZE,
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_AP_BEACON, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_AP_BEACON, NULL,
|
|
|
WL1271_CMD_TEMPL_MAX_SIZE,
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_DEAUTH_AP, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_DEAUTH_AP, NULL,
|
|
|
sizeof
|
|
|
(struct wl12xx_disconn_template),
|
|
|
0, WL1271_RATE_AUTOMATIC);
|
|
@@ -113,7 +124,8 @@ int wl1271_init_templates_config(struct wl1271 *wl)
|
|
|
return ret;
|
|
|
|
|
|
for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) {
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV, NULL,
|
|
|
+ ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID,
|
|
|
+ CMD_TEMPL_KLV, NULL,
|
|
|
sizeof(struct ieee80211_qos_hdr),
|
|
|
i, WL1271_RATE_AUTOMATIC);
|
|
|
if (ret < 0)
|
|
@@ -140,7 +152,8 @@ static int wl1271_ap_init_deauth_template(struct wl1271 *wl,
|
|
|
IEEE80211_STYPE_DEAUTH);
|
|
|
|
|
|
rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_DEAUTH_AP,
|
|
|
+ ret = wl1271_cmd_template_set(wl, wlvif->role_id,
|
|
|
+ CMD_TEMPL_DEAUTH_AP,
|
|
|
tmpl, sizeof(*tmpl), 0, rate);
|
|
|
|
|
|
out:
|
|
@@ -172,7 +185,8 @@ static int wl1271_ap_init_null_template(struct wl1271 *wl,
|
|
|
memcpy(nullfunc->addr3, vif->addr, ETH_ALEN);
|
|
|
|
|
|
rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, nullfunc,
|
|
|
+ ret = wl1271_cmd_template_set(wl, wlvif->role_id,
|
|
|
+ CMD_TEMPL_NULL_DATA, nullfunc,
|
|
|
sizeof(*nullfunc), 0, rate);
|
|
|
|
|
|
out:
|
|
@@ -204,7 +218,8 @@ static int wl1271_ap_init_qos_null_template(struct wl1271 *wl,
|
|
|
memcpy(qosnull->addr3, vif->addr, ETH_ALEN);
|
|
|
|
|
|
rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set);
|
|
|
- ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, qosnull,
|
|
|
+ ret = wl1271_cmd_template_set(wl, wlvif->role_id,
|
|
|
+ CMD_TEMPL_QOS_NULL_DATA, qosnull,
|
|
|
sizeof(*qosnull), 0, rate);
|
|
|
|
|
|
out:
|