Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194201
b: refs/heads/master
c: 606c148
h: refs/heads/master
i:
  194199: 601fcb5
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Apr 6, 2010
1 parent 6febe17 commit d403542
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebba60c66b3aa321a84c9a90a343c91fde972066
refs/heads/master: 606c1487ac894798121bc2c64d27c1953c5a6210
21 changes: 13 additions & 8 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
}

int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
void *buf, size_t buf_len, int index)
void *buf, size_t buf_len, int index, u32 rates)
{
struct wl1271_cmd_template_set *cmd;
int ret = 0;
Expand All @@ -718,7 +718,7 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,

cmd->len = cpu_to_le16(buf_len);
cmd->template_type = template_id;
cmd->enabled_rates = cpu_to_le32(wl->conf.tx.rc_conf.enabled_rates);
cmd->enabled_rates = cpu_to_le32(rates);
cmd->short_retry_limit = wl->conf.tx.rc_conf.short_retry_limit;
cmd->long_retry_limit = wl->conf.tx.rc_conf.long_retry_limit;
cmd->index = index;
Expand Down Expand Up @@ -758,7 +758,8 @@ int wl1271_cmd_build_null_data(struct wl1271 *wl)
ptr = skb->data;
}

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size, 0);
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size, 0,
WL1271_RATE_AUTOMATIC);

out:
dev_kfree_skb(skb);
Expand All @@ -780,7 +781,8 @@ int wl1271_cmd_build_klv_null_data(struct wl1271 *wl)

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV,
skb->data, skb->len,
CMD_TEMPL_KLV_IDX_NULL_DATA);
CMD_TEMPL_KLV_IDX_NULL_DATA,
WL1271_RATE_AUTOMATIC);

out:
dev_kfree_skb(skb);
Expand All @@ -801,7 +803,7 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid)
goto out;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, skb->data,
skb->len, 0);
skb->len, 0, wl->basic_rate);

out:
dev_kfree_skb(skb);
Expand All @@ -826,10 +828,12 @@ int wl1271_cmd_build_probe_req(struct wl1271 *wl,

if (band == IEEE80211_BAND_2GHZ)
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4,
skb->data, skb->len, 0);
skb->data, skb->len, 0,
wl->conf.tx.basic_rate);
else
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
skb->data, skb->len, 0);
skb->data, skb->len, 0,
wl->conf.tx.basic_rate_5);

out:
dev_kfree_skb(skb);
Expand All @@ -854,7 +858,8 @@ int wl1271_build_qos_null_data(struct wl1271 *wl)
template.qos_ctrl = cpu_to_le16(0);

return wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, &template,
sizeof(template), 0);
sizeof(template), 0,
WL1271_RATE_AUTOMATIC);
}

int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id)
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int wl1271_cmd_scan(struct wl1271 *wl, const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len, u8 active_scan,
u8 high_prio, u8 band, u8 probe_requests);
int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,
void *buf, size_t buf_len, int index);
void *buf, size_t buf_len, int index, u32 rates);
int wl1271_cmd_build_null_data(struct wl1271 *wl);
int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid);
int wl1271_cmd_build_probe_req(struct wl1271 *wl,
Expand Down Expand Up @@ -252,6 +252,8 @@ struct cmd_enabledisable_path {
u8 padding[3];
} __attribute__ ((packed));

#define WL1271_RATE_AUTOMATIC 0

struct wl1271_cmd_template_set {
struct wl1271_cmd_header header;

Expand Down
18 changes: 10 additions & 8 deletions trunk/drivers/net/wireless/wl12xx/wl1271_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,54 +56,56 @@ int wl1271_init_templates_config(struct wl1271 *wl)
/* send empty templates for fw memory reservation */
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
sizeof(struct wl12xx_probe_req_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

if (wl1271_11a_enabled()) {
size_t size = sizeof(struct wl12xx_probe_req_template);
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
NULL, size, 0);
NULL, size, 0,
WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;
}

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
sizeof(struct wl12xx_null_data_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, NULL,
sizeof(struct wl12xx_ps_poll_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, NULL,
sizeof
(struct wl12xx_qos_null_data_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PROBE_RESPONSE, NULL,
sizeof
(struct wl12xx_probe_resp_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_BEACON, NULL,
sizeof
(struct wl12xx_beacon_template),
0);
0, WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;

for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) {
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV, NULL,
WL1271_CMD_TEMPL_MAX_SIZE, i);
WL1271_CMD_TEMPL_MAX_SIZE, i,
WL1271_RATE_AUTOMATIC);
if (ret < 0)
return ret;
}
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,8 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
wl1271_ssid_set(wl, beacon);
ret = wl1271_cmd_template_set(wl, CMD_TEMPL_BEACON,
beacon->data,
beacon->len, 0);
beacon->len, 0,
wl1271_min_rate_get(wl));

if (ret < 0) {
dev_kfree_skb(beacon);
Expand All @@ -1657,7 +1658,8 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
ret = wl1271_cmd_template_set(wl,
CMD_TEMPL_PROBE_RESPONSE,
beacon->data,
beacon->len, 0);
beacon->len, 0,
wl1271_min_rate_get(wl));
dev_kfree_skb(beacon);
if (ret < 0)
goto out_sleep;
Expand Down

0 comments on commit d403542

Please sign in to comment.