summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wl12xx
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-12-12 11:32:37 +0200
committerLuciano Coelho <coelho@ti.com>2012-04-12 08:44:00 +0300
commit53d67a50cd17aca120dff20eb2a93e1665361688 (patch)
treead5945465cac43a5c39775fd758719385e4e925f /drivers/net/wireless/ti/wl12xx
parent4158149c24e6f933809bc6fe03dbc3fb218b935b (diff)
wlcore/wl12xx: split Tx completion to immediate/delayed
One chip family employs immediate Tx completion, where knowledge of completed packets is given as part of the FW status. Another is only notified of Tx completion via the FW status, and has to read the completion status of the packets from a different location. Implement the wl12xx tx completion as a delayed Tx completion. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl12xx')
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 5f81aaf19d97..6b187d066c51 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -789,6 +789,14 @@ static u32 wl12xx_get_rx_packet_len(struct wl1271 *wl, void *rx_data,
return data_len - sizeof(*desc) - desc->pad_len;
}
+static void wl12xx_tx_delayed_compl(struct wl1271 *wl)
+{
+ if (wl->fw_status->tx_results_counter == (wl->tx_results_count & 0xff))
+ return;
+
+ wl1271_tx_complete(wl);
+}
+
static bool wl12xx_mac_in_fuse(struct wl1271 *wl)
{
bool supported = false;
@@ -862,6 +870,8 @@ static struct wlcore_ops wl12xx_ops = {
.set_tx_desc_data_len = wl12xx_set_tx_desc_data_len,
.get_rx_buf_align = wl12xx_get_rx_buf_align,
.get_rx_packet_len = wl12xx_get_rx_packet_len,
+ .tx_immediate_compl = NULL,
+ .tx_delayed_compl = wl12xx_tx_delayed_compl,
.get_pg_ver = wl12xx_get_pg_ver,
.get_mac = wl12xx_get_mac,
};