summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/tx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2010-10-16 18:19:53 +0200
committerLuciano Coelho <coelho@ti.com>2011-01-24 22:11:48 +0200
commite0fe371b74326a85029fe8720506e021fe73905a (patch)
tree0eb9864739ae8c876560598aefb410e7c7bec3e6 /drivers/net/wireless/wl12xx/tx.c
parent05285cf9b581af05813cfaa60e23227b009b7754 (diff)
wl12xx: AP mode - init sequence
Split HW init sequence into AP/STA specific parts The AP specific init sequence includes configuration of templates, rate classes, power mode, etc. Also unmask AP specific events in the event mbox. Separate the differences between AP and STA init into mode specific functions called from wl1271_hw_init. The first is called after radio configuration and the second after memory configuration. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.c')
-rw-r--r--drivers/net/wireless/wl12xx/tx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 442a7bd956ea..a93fc4702f35 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -521,3 +521,21 @@ void wl1271_tx_flush(struct wl1271 *wl)
wl1271_warning("Unable to flush all TX buffers, timed out.");
}
+
+u32 wl1271_tx_min_rate_get(struct wl1271 *wl)
+{
+ int i;
+ u32 rate = 0;
+
+ if (!wl->basic_rate_set) {
+ WARN_ON(1);
+ wl->basic_rate_set = wl->conf.tx.basic_rate;
+ }
+
+ for (i = 0; !rate; i++) {
+ if ((wl->basic_rate_set >> i) & 0x1)
+ rate = 1 << i;
+ }
+
+ return rate;
+}