diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-08-14 06:17:35 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-08-22 05:35:31 -0400 |
commit | 9b17f1b371c5aa5179b3e5392bc22132a3371da4 (patch) | |
tree | d988dfb24a4cacbd18615dc9c07482f7eebe921e /drivers/net/wireless/wl12xx/tx.c | |
parent | 769d7ac62d328ff2c126fdee461b7d46e7ea89f4 (diff) |
wl12xx: enable AP advanced functionality
This adjusts FW TX block allocation for connected stations in PS.
Firmware congestion is measured in allocated packets instead of blocks.
Allow a link in PS to queue up to 2 packets to the FW.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.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.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index ccbcd0a4d2bf..0f1578577b1a 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -123,27 +123,25 @@ static void wl1271_tx_ap_update_inconnection_sta(struct wl1271 *wl, | |||
123 | wl1271_acx_set_inconnection_sta(wl, hdr->addr1); | 123 | wl1271_acx_set_inconnection_sta(wl, hdr->addr1); |
124 | } | 124 | } |
125 | 125 | ||
126 | #if 0 | ||
127 | static void wl1271_tx_regulate_link(struct wl1271 *wl, u8 hlid) | 126 | static void wl1271_tx_regulate_link(struct wl1271 *wl, u8 hlid) |
128 | { | 127 | { |
129 | bool fw_ps; | 128 | bool fw_ps; |
130 | u8 tx_blks; | 129 | u8 tx_pkts; |
131 | 130 | ||
132 | /* only regulate station links */ | 131 | /* only regulate station links */ |
133 | if (hlid < WL1271_AP_STA_HLID_START) | 132 | if (hlid < WL1271_AP_STA_HLID_START) |
134 | return; | 133 | return; |
135 | 134 | ||
136 | fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); | 135 | fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); |
137 | tx_blks = wl->links[hlid].allocated_blks; | 136 | tx_pkts = wl->links[hlid].allocated_pkts; |
138 | 137 | ||
139 | /* | 138 | /* |
140 | * if in FW PS and there is enough data in FW we can put the link | 139 | * if in FW PS and there is enough data in FW we can put the link |
141 | * into high-level PS and clean out its TX queues. | 140 | * into high-level PS and clean out its TX queues. |
142 | */ | 141 | */ |
143 | if (fw_ps && tx_blks >= WL1271_PS_STA_MAX_BLOCKS) | 142 | if (fw_ps && tx_pkts >= WL1271_PS_STA_MAX_PACKETS) |
144 | wl1271_ps_link_start(wl, hlid, true); | 143 | wl1271_ps_link_start(wl, hlid, true); |
145 | } | 144 | } |
146 | #endif | ||
147 | 145 | ||
148 | static bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb) | 146 | static bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb) |
149 | { | 147 | { |
@@ -245,8 +243,9 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra, | |||
245 | ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb)); | 243 | ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb)); |
246 | wl->tx_allocated_pkts[ac]++; | 244 | wl->tx_allocated_pkts[ac]++; |
247 | 245 | ||
248 | if (wl->bss_type == BSS_TYPE_AP_BSS) | 246 | if (wl->bss_type == BSS_TYPE_AP_BSS && |
249 | wl->links[hlid].allocated_blks += total_blocks; | 247 | hlid >= WL1271_AP_STA_HLID_START) |
248 | wl->links[hlid].allocated_pkts++; | ||
250 | 249 | ||
251 | ret = 0; | 250 | ret = 0; |
252 | 251 | ||
@@ -414,9 +413,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, | |||
414 | 413 | ||
415 | if (wl->bss_type == BSS_TYPE_AP_BSS) { | 414 | if (wl->bss_type == BSS_TYPE_AP_BSS) { |
416 | wl1271_tx_ap_update_inconnection_sta(wl, skb); | 415 | wl1271_tx_ap_update_inconnection_sta(wl, skb); |
417 | #if 0 | ||
418 | wl1271_tx_regulate_link(wl, hlid); | 416 | wl1271_tx_regulate_link(wl, hlid); |
419 | #endif | ||
420 | } else { | 417 | } else { |
421 | wl1271_tx_update_filters(wl, skb); | 418 | wl1271_tx_update_filters(wl, skb); |
422 | } | 419 | } |
@@ -888,8 +885,8 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) | |||
888 | if (wl->bss_type == BSS_TYPE_AP_BSS) { | 885 | if (wl->bss_type == BSS_TYPE_AP_BSS) { |
889 | for (i = 0; i < AP_MAX_LINKS; i++) { | 886 | for (i = 0; i < AP_MAX_LINKS; i++) { |
890 | wl1271_tx_reset_link_queues(wl, i); | 887 | wl1271_tx_reset_link_queues(wl, i); |
891 | wl->links[i].allocated_blks = 0; | 888 | wl->links[i].allocated_pkts = 0; |
892 | wl->links[i].prev_freed_blks = 0; | 889 | wl->links[i].prev_freed_pkts = 0; |
893 | } | 890 | } |
894 | 891 | ||
895 | wl->last_tx_hlid = 0; | 892 | wl->last_tx_hlid = 0; |