Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352206
b: refs/heads/master
c: 9ebcb23
h: refs/heads/master
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Dec 5, 2012
1 parent 5b74957 commit 50151a6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 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: 8591d42452f16b1888419da4456142864b08ef9e
refs/heads/master: 9ebcb232158c737db21e22b7bfdc4fc6d661ea8c
29 changes: 17 additions & 12 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,8 @@ static void wl12xx_irq_update_links_status(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
struct wl_fw_status_2 *status)
{
struct wl1271_link *lnk;
u32 cur_fw_ps_map;
u8 hlid, cnt;
u8 hlid;

/* TODO: also use link_fast_bitmap here */

Expand All @@ -375,17 +374,9 @@ static void wl12xx_irq_update_links_status(struct wl1271 *wl,
wl->ap_fw_ps_map = cur_fw_ps_map;
}

for_each_set_bit(hlid, wlvif->ap.sta_hlid_map, WL12XX_MAX_LINKS) {
lnk = &wl->links[hlid];
cnt = status->counters.tx_lnk_free_pkts[hlid] -
lnk->prev_freed_pkts;

lnk->prev_freed_pkts = status->counters.tx_lnk_free_pkts[hlid];
lnk->allocated_pkts -= cnt;

for_each_set_bit(hlid, wlvif->ap.sta_hlid_map, WL12XX_MAX_LINKS)
wl12xx_irq_ps_regulate_link(wl, wlvif, hlid,
lnk->allocated_pkts);
}
wl->links[hlid].allocated_pkts);
}

static int wlcore_fw_status(struct wl1271 *wl,
Expand All @@ -399,6 +390,7 @@ static int wlcore_fw_status(struct wl1271 *wl,
int i;
size_t status_len;
int ret;
struct wl1271_link *lnk;

status_len = WLCORE_FW_STATUS_1_LEN(wl->num_rx_desc) +
sizeof(*status_2) + wl->fw_status_priv_len;
Expand All @@ -424,6 +416,17 @@ static int wlcore_fw_status(struct wl1271 *wl,
wl->tx_pkts_freed[i] = status_2->counters.tx_released_pkts[i];
}


for_each_set_bit(i, wl->links_map, WL12XX_MAX_LINKS) {
lnk = &wl->links[i];
/* prevent wrap-around in freed-packets counter */
lnk->allocated_pkts -=
(status_2->counters.tx_lnk_free_pkts[i] -
lnk->prev_freed_pkts) & 0xff;

lnk->prev_freed_pkts = status_2->counters.tx_lnk_free_pkts[i];
}

/* prevent wrap-around in total blocks counter */
if (likely(wl->tx_blocks_freed <=
le32_to_cpu(status_2->total_released_blks)))
Expand Down Expand Up @@ -1886,6 +1889,8 @@ static void wlcore_op_stop_locked(struct wl1271 *wl)
wl->active_sta_count = 0;

/* The system link is always allocated */
wl->links[WL12XX_SYSTEM_HLID].allocated_pkts = 0;
wl->links[WL12XX_SYSTEM_HLID].prev_freed_pkts = 0;
__set_bit(WL12XX_SYSTEM_HLID, wl->links_map);

/*
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif,
ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
wl->tx_allocated_pkts[ac]++;

if (!wl12xx_is_dummy_packet(wl, skb) && wlvif &&
wlvif->bss_type == BSS_TYPE_AP_BSS &&
test_bit(hlid, wlvif->ap.sta_hlid_map))
if (test_bit(hlid, wl->links_map))
wl->links[hlid].allocated_pkts++;

ret = 0;
Expand Down

0 comments on commit 50151a6

Please sign in to comment.