Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300925
b: refs/heads/master
c: 53d67a5
h: refs/heads/master
i:
  300923: 5f076c5
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Apr 12, 2012
1 parent 8b29add commit f4d6566
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4158149c24e6f933809bc6fe03dbc3fb218b935b
refs/heads/master: 53d67a50cd17aca120dff20eb2a93e1665361688
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
};
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/hw_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,16 @@ wlcore_hw_get_rx_packet_len(struct wl1271 *wl, void *rx_data, u32 data_len)
return wl->ops->get_rx_packet_len(wl, rx_data, data_len);
}

static inline void wlcore_hw_tx_delayed_compl(struct wl1271 *wl)
{
if (wl->ops->tx_delayed_compl)
wl->ops->tx_delayed_compl(wl);
}

static inline void wlcore_hw_tx_immediate_compl(struct wl1271 *wl)
{
if (wl->ops->tx_immediate_compl)
wl->ops->tx_immediate_compl(wl);
}

#endif
8 changes: 5 additions & 3 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "boot.h"
#include "testmode.h"
#include "scan.h"
#include "hw_ops.h"

#define WL1271_BOOT_RETRIES 3

Expand Down Expand Up @@ -933,6 +934,9 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
smp_mb__after_clear_bit();

wl12xx_fw_status(wl, wl->fw_status);

wlcore_hw_tx_immediate_compl(wl);

intr = le32_to_cpu(wl->fw_status->intr);
intr &= WL1271_INTR_MASK;
if (!intr) {
Expand Down Expand Up @@ -969,9 +973,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
}

/* check for tx results */
if (wl->fw_status->tx_results_counter !=
(wl->tx_results_count & 0xff))
wl1271_tx_complete(wl);
wlcore_hw_tx_delayed_compl(wl);

/* Make sure the deferred queues don't get too long */
defer_count = skb_queue_len(&wl->deferred_tx_queue) +
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ void wl1271_tx_complete(struct wl1271 *wl)
wl->tx_results_count++;
}
}
EXPORT_SYMBOL(wl1271_tx_complete);

void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/wlcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ struct wlcore_ops {
void (*prepare_read)(struct wl1271 *wl, u32 rx_desc, u32 len);
u32 (*get_rx_packet_len)(struct wl1271 *wl, void *rx_data,
u32 data_len);
void (*tx_delayed_compl)(struct wl1271 *wl);
void (*tx_immediate_compl)(struct wl1271 *wl);
s8 (*get_pg_ver)(struct wl1271 *wl);
void (*get_mac)(struct wl1271 *wl);
};
Expand Down

0 comments on commit f4d6566

Please sign in to comment.