aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_init.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-04-01 04:38:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-06 16:55:13 -0400
commit606c1487ac894798121bc2c64d27c1953c5a6210 (patch)
tree9b45dc3b6f06a6c7216ff30fad316fa4c5fcee88 /drivers/net/wireless/wl12xx/wl1271_init.c
parentebba60c66b3aa321a84c9a90a343c91fde972066 (diff)
wl1271: Configure rates for templates
Configure meaningful rates to be used with the templates. For control frames, use the determined basic rates (currently the lowest rate for the band) and for data-frames (null-funcs) let the firmware use the current rate policy to determine the rate. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_init.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c
index 8ec94ac84093..9ab336829044 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.c
+++ b/drivers/net/wireless/wl12xx/wl1271_init.c
@@ -56,54 +56,56 @@ int wl1271_init_templates_config(struct wl1271 *wl)
56 /* send empty templates for fw memory reservation */ 56 /* send empty templates for fw memory reservation */
57 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL, 57 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_2_4, NULL,
58 sizeof(struct wl12xx_probe_req_template), 58 sizeof(struct wl12xx_probe_req_template),
59 0); 59 0, WL1271_RATE_AUTOMATIC);
60 if (ret < 0) 60 if (ret < 0)
61 return ret; 61 return ret;
62 62
63 if (wl1271_11a_enabled()) { 63 if (wl1271_11a_enabled()) {
64 size_t size = sizeof(struct wl12xx_probe_req_template); 64 size_t size = sizeof(struct wl12xx_probe_req_template);
65 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5, 65 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_CFG_PROBE_REQ_5,
66 NULL, size, 0); 66 NULL, size, 0,
67 WL1271_RATE_AUTOMATIC);
67 if (ret < 0) 68 if (ret < 0)
68 return ret; 69 return ret;
69 } 70 }
70 71
71 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL, 72 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, NULL,
72 sizeof(struct wl12xx_null_data_template), 73 sizeof(struct wl12xx_null_data_template),
73 0); 74 0, WL1271_RATE_AUTOMATIC);
74 if (ret < 0) 75 if (ret < 0)
75 return ret; 76 return ret;
76 77
77 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, NULL, 78 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PS_POLL, NULL,
78 sizeof(struct wl12xx_ps_poll_template), 79 sizeof(struct wl12xx_ps_poll_template),
79 0); 80 0, WL1271_RATE_AUTOMATIC);
80 if (ret < 0) 81 if (ret < 0)
81 return ret; 82 return ret;
82 83
83 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, NULL, 84 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, NULL,
84 sizeof 85 sizeof
85 (struct wl12xx_qos_null_data_template), 86 (struct wl12xx_qos_null_data_template),
86 0); 87 0, WL1271_RATE_AUTOMATIC);
87 if (ret < 0) 88 if (ret < 0)
88 return ret; 89 return ret;
89 90
90 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PROBE_RESPONSE, NULL, 91 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_PROBE_RESPONSE, NULL,
91 sizeof 92 sizeof
92 (struct wl12xx_probe_resp_template), 93 (struct wl12xx_probe_resp_template),
93 0); 94 0, WL1271_RATE_AUTOMATIC);
94 if (ret < 0) 95 if (ret < 0)
95 return ret; 96 return ret;
96 97
97 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_BEACON, NULL, 98 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_BEACON, NULL,
98 sizeof 99 sizeof
99 (struct wl12xx_beacon_template), 100 (struct wl12xx_beacon_template),
100 0); 101 0, WL1271_RATE_AUTOMATIC);
101 if (ret < 0) 102 if (ret < 0)
102 return ret; 103 return ret;
103 104
104 for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) { 105 for (i = 0; i < CMD_TEMPL_KLV_IDX_MAX; i++) {
105 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV, NULL, 106 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV, NULL,
106 WL1271_CMD_TEMPL_MAX_SIZE, i); 107 WL1271_CMD_TEMPL_MAX_SIZE, i,
108 WL1271_RATE_AUTOMATIC);
107 if (ret < 0) 109 if (ret < 0)
108 return ret; 110 return ret;
109 } 111 }