projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
carl9170 firmware: fix uninitialized txfail variable
[carl9170fw.git]
/
carlfw
/
src
/
wlan.c
diff --git
a/carlfw/src/wlan.c
b/carlfw/src/wlan.c
index cb4d9b00246edd5db1096302233c046ef6bf0b7c..ec50e6c82cefb564febe5203b7d0506ea709ba5d 100644
(file)
--- a/
carlfw/src/wlan.c
+++ b/
carlfw/src/wlan.c
@@
-358,7
+358,7
@@
static bool wlan_tx_status(struct dma_queue *queue,
{
struct carl9170_tx_superframe *super = get_super(desc);
unsigned int qidx = super->s.queue;
{
struct carl9170_tx_superframe *super = get_super(desc);
unsigned int qidx = super->s.queue;
- bool txfail, success;
+ bool txfail
= false
, success;
success = true;
success = true;
@@
-478,7
+478,6
@@
static void handle_tx_completion(void)
wlan_tx_ampdu_end(i);
if (!queue_empty(&fw.wlan.tx_queue[i]))
wlan_trigger(BIT(i));
wlan_tx_ampdu_end(i);
if (!queue_empty(&fw.wlan.tx_queue[i]))
wlan_trigger(BIT(i));
-
}
}
}
}
@@
-517,8
+516,9
@@
static void wlan_send_buffered_ba(void)
if (!fw.wlan.ba_desc_available)
return;
if (!fw.wlan.ba_desc_available)
return;
- ctx = &fw.wlan.ba_cache[fw.wlan.ba_head_idx
% CONFIG_CARL9170FW_BACK_REQS_NUM
];
+ ctx = &fw.wlan.ba_cache[fw.wlan.ba_head_idx];
fw.wlan.ba_head_idx++;
fw.wlan.ba_head_idx++;
+ fw.wlan.ba_head_idx %= CONFIG_CARL9170FW_BACK_REQS_NUM;
/* Format BlockAck */
fw.wlan.ba_desc->status = 0;
/* Format BlockAck */
fw.wlan.ba_desc->status = 0;
@@
-532,8
+532,8
@@
static void wlan_send_buffered_ba(void)
sizeof(struct ar9170_tx_hwdesc) +
sizeof(struct ieee80211_ba);
sizeof(struct ar9170_tx_hwdesc) +
sizeof(struct ieee80211_ba);
- baf->s.ri[0].tries =
3
;
- baf->s.queue =
0
;
+ baf->s.ri[0].tries =
1
;
+ baf->s.queue =
AR9170_TXQ_VO
;
baf->f.hdr.length = sizeof(struct ieee80211_ba) + FCS_LEN;
/* HW Duration / Backoff */
baf->f.hdr.length = sizeof(struct ieee80211_ba) + FCS_LEN;
/* HW Duration / Backoff */
@@
-571,12
+571,9
@@
static struct carl9170_bar_ctx *wlan_get_bar_cache_buffer(void)
{
struct carl9170_bar_ctx *tmp;
{
struct carl9170_bar_ctx *tmp;
- /* expire oldest entry, if we ran out of ba_ctx' */
- if (fw.wlan.ba_head_idx + CONFIG_CARL9170FW_BACK_REQS_NUM < fw.wlan.ba_tail_idx)
- fw.wlan.ba_head_idx++;
-
- tmp = &fw.wlan.ba_cache[fw.wlan.ba_tail_idx % CONFIG_CARL9170FW_BACK_REQS_NUM];
+ tmp = &fw.wlan.ba_cache[fw.wlan.ba_tail_idx];
fw.wlan.ba_tail_idx++;
fw.wlan.ba_tail_idx++;
+ fw.wlan.ba_tail_idx %= CONFIG_CARL9170FW_BACK_REQS_NUM;
return tmp;
}
return tmp;
}