aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.c
diff options
context:
space:
mode:
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 442a7bd956e..a93fc4702f3 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)
521 521
522 wl1271_warning("Unable to flush all TX buffers, timed out."); 522 wl1271_warning("Unable to flush all TX buffers, timed out.");
523} 523}
524
525u32 wl1271_tx_min_rate_get(struct wl1271 *wl)
526{
527 int i;
528 u32 rate = 0;
529
530 if (!wl->basic_rate_set) {
531 WARN_ON(1);
532 wl->basic_rate_set = wl->conf.tx.basic_rate;
533 }
534
535 for (i = 0; !rate; i++) {
536 if ((wl->basic_rate_set >> i) & 0x1)
537 rate = 1 << i;
538 }
539
540 return rate;
541}