diff options
author | Eliad Peller <eliad@wizery.com> | 2011-09-19 06:51:42 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-09-23 08:59:45 -0400 |
commit | af7fbb28efff0c0d8fc0852ad6622e5437a7611e (patch) | |
tree | 53afcd5afb6666c61c52a901b706689a1aab43d9 /drivers/net/wireless/wl12xx/init.c | |
parent | 68eaaf6ee5ac35d8e592834219cee9c9e88fdb24 (diff) |
wl12xx: implement set_bitrate_mask callback
Save the configured bitrate, and use the min allowed rate
as the basic rate (e.g. when scanning).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/init.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index 09515f5e5e1d..04db64c94e9a 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -103,6 +103,7 @@ static int wl1271_ap_init_deauth_template(struct wl1271 *wl) | |||
103 | { | 103 | { |
104 | struct wl12xx_disconn_template *tmpl; | 104 | struct wl12xx_disconn_template *tmpl; |
105 | int ret; | 105 | int ret; |
106 | u32 rate; | ||
106 | 107 | ||
107 | tmpl = kzalloc(sizeof(*tmpl), GFP_KERNEL); | 108 | tmpl = kzalloc(sizeof(*tmpl), GFP_KERNEL); |
108 | if (!tmpl) { | 109 | if (!tmpl) { |
@@ -113,9 +114,9 @@ static int wl1271_ap_init_deauth_template(struct wl1271 *wl) | |||
113 | tmpl->header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 114 | tmpl->header.frame_ctl = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
114 | IEEE80211_STYPE_DEAUTH); | 115 | IEEE80211_STYPE_DEAUTH); |
115 | 116 | ||
117 | rate = wl1271_tx_min_rate_get(wl, wl->basic_rate_set); | ||
116 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_DEAUTH_AP, | 118 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_DEAUTH_AP, |
117 | tmpl, sizeof(*tmpl), 0, | 119 | tmpl, sizeof(*tmpl), 0, rate); |
118 | wl1271_tx_min_rate_get(wl)); | ||
119 | 120 | ||
120 | out: | 121 | out: |
121 | kfree(tmpl); | 122 | kfree(tmpl); |
@@ -126,6 +127,7 @@ static int wl1271_ap_init_null_template(struct wl1271 *wl) | |||
126 | { | 127 | { |
127 | struct ieee80211_hdr_3addr *nullfunc; | 128 | struct ieee80211_hdr_3addr *nullfunc; |
128 | int ret; | 129 | int ret; |
130 | u32 rate; | ||
129 | 131 | ||
130 | nullfunc = kzalloc(sizeof(*nullfunc), GFP_KERNEL); | 132 | nullfunc = kzalloc(sizeof(*nullfunc), GFP_KERNEL); |
131 | if (!nullfunc) { | 133 | if (!nullfunc) { |
@@ -142,9 +144,9 @@ static int wl1271_ap_init_null_template(struct wl1271 *wl) | |||
142 | memcpy(nullfunc->addr2, wl->mac_addr, ETH_ALEN); | 144 | memcpy(nullfunc->addr2, wl->mac_addr, ETH_ALEN); |
143 | memcpy(nullfunc->addr3, wl->mac_addr, ETH_ALEN); | 145 | memcpy(nullfunc->addr3, wl->mac_addr, ETH_ALEN); |
144 | 146 | ||
147 | rate = wl1271_tx_min_rate_get(wl, wl->basic_rate_set); | ||
145 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, nullfunc, | 148 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, nullfunc, |
146 | sizeof(*nullfunc), 0, | 149 | sizeof(*nullfunc), 0, rate); |
147 | wl1271_tx_min_rate_get(wl)); | ||
148 | 150 | ||
149 | out: | 151 | out: |
150 | kfree(nullfunc); | 152 | kfree(nullfunc); |
@@ -155,6 +157,7 @@ static int wl1271_ap_init_qos_null_template(struct wl1271 *wl) | |||
155 | { | 157 | { |
156 | struct ieee80211_qos_hdr *qosnull; | 158 | struct ieee80211_qos_hdr *qosnull; |
157 | int ret; | 159 | int ret; |
160 | u32 rate; | ||
158 | 161 | ||
159 | qosnull = kzalloc(sizeof(*qosnull), GFP_KERNEL); | 162 | qosnull = kzalloc(sizeof(*qosnull), GFP_KERNEL); |
160 | if (!qosnull) { | 163 | if (!qosnull) { |
@@ -171,9 +174,9 @@ static int wl1271_ap_init_qos_null_template(struct wl1271 *wl) | |||
171 | memcpy(qosnull->addr2, wl->mac_addr, ETH_ALEN); | 174 | memcpy(qosnull->addr2, wl->mac_addr, ETH_ALEN); |
172 | memcpy(qosnull->addr3, wl->mac_addr, ETH_ALEN); | 175 | memcpy(qosnull->addr3, wl->mac_addr, ETH_ALEN); |
173 | 176 | ||
177 | rate = wl1271_tx_min_rate_get(wl, wl->basic_rate_set); | ||
174 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, qosnull, | 178 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, qosnull, |
175 | sizeof(*qosnull), 0, | 179 | sizeof(*qosnull), 0, rate); |
176 | wl1271_tx_min_rate_get(wl)); | ||
177 | 180 | ||
178 | out: | 181 | out: |
179 | kfree(qosnull); | 182 | kfree(qosnull); |
@@ -498,7 +501,7 @@ int wl1271_init_ap_rates(struct wl1271 *wl) | |||
498 | return ret; | 501 | return ret; |
499 | 502 | ||
500 | /* use the min basic rate for AP broadcast/multicast */ | 503 | /* use the min basic rate for AP broadcast/multicast */ |
501 | rc.enabled_rates = wl1271_tx_min_rate_get(wl); | 504 | rc.enabled_rates = wl1271_tx_min_rate_get(wl, wl->basic_rate_set); |
502 | rc.short_retry_limit = 10; | 505 | rc.short_retry_limit = 10; |
503 | rc.long_retry_limit = 10; | 506 | rc.long_retry_limit = 10; |
504 | rc.aflags = 0; | 507 | rc.aflags = 0; |