ath10k: fix beacon loss handling
cover ath10k: fix beacon loss handling
FW is lying about tx status.
First two patches do a little cleanup. The last
one fixes beacon loss handling.
This can be considered a workaround depending on
what original FW design called for.
Michal Kazior (3):
ath10k: report mgmt tx retry status as no_ack
ath10k: cleanup tx completion
ath10k: pass NullFunc frames through mgmt tx path
drivers/net/wireless/ath/ath10k/htt_rx.c | 5 ++--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 ath10k: report mgmt tx retry status as no_ack
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -0
@@ -1077,6 +1077,8 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb) tx_done.discard = false;break ;case HTT_MGMT_TX_STATUS_RETRY : + tx_done.no_ack = true; +break ;case HTT_MGMT_TX_STATUS_DROP : tx_done.discard = true;break ;
Signature · 1 line
1.7.9.5
PATCH 1/3 ath10k: report mgmt tx retry status as no_ack
Quoted 1 line · Michal Kazior
Signed-off-by Michal Kazior <[email protected]>
Why?
Signature · 1 line
Kalle Valo
PATCH 2/3 ath10k: cleanup tx completion
In reply to Michal KaziorThe default values are false anyway. No need to
reassign.
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +0 -3
@@ -1074,7 +1074,6 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)switch (status) {case HTT_MGMT_TX_STATUS_OK : - tx_done.discard = false;break ;case HTT_MGMT_TX_STATUS_RETRY : tx_done.no_ack = true;
@@ -1097,10 +1096,8 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)switch (status) {case HTT_DATA_TX_STATUS_NO_ACK : tx_done.no_ack = true; - tx_done.discard = false;break ;case HTT_DATA_TX_STATUS_OK : - tx_done.discard = false;break ;case HTT_DATA_TX_STATUS_DISCARD :case HTT_DATA_TX_STATUS_POSTPONE :
Signature · 1 line
1.7.9.5
PATCH 3/3 ath10k: pass NullFunc frames through mgmt tx path
In reply to Michal KaziorFW was reporting incorrect tx status for NullFunc
frames sent through data tx path.
mac80211 uses tx status when dealing with link/beacon loss. This patch fixes connection loss handling.
--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +6 -0
@@ -1294,6 +1294,12 @@ static void ath10k_tx_htt(struct ath10k *ar, struct sk_buff *skb)if (ieee80211_is_mgmt (hdr->frame_control)) ret =ath10k_htt_mgmt_tx (ar->htt, skb); +else if (ieee80211_is_nullfunc (hdr->frame_control)) +/* FW does not report tx status properly for NullFunc frames +* unless they are sent through mgmt tx path. mac80211 sends +* those frames when it detects link/beacon loss and depends on +* the tx status to be correct. */ + ret =ath10k_htt_mgmt_tx (ar->htt, skb);else ret =ath10k_htt_tx (ar->htt, skb);
Signature · 1 line
1.7.9.5
cover ath10k: fix beacon loss handling
In reply to Michal KaziorACK
Kalle, could you please submit/review these?
Fixes quite serious problem.
Bartosz
Quoted 18 lines · Michal Kazior
FW is lying about tx status.
First two patches do a little cleanup. The last
one fixes beacon loss handling.This can be considered a workaround depending on
what original FW design called for.Michal Kazior (3):
ath10k: report mgmt tx retry status asno_ack
ath10k: cleanup tx completion
ath10k: pass NullFunc frames through mgmt tx pathdrivers/net/wireless/ath/ath10k/htt_rx.c | 5 ++--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)
Quoted 8 lines
--
1.7.9.5_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20130509/67d7ab03/attachment.htm
cover ath10k: fix beacon loss handling
Quoted 1 line · Bartosz Markowski
Kalle, could you please submit/review these?
I will not commit any patches which have either RFC or RFT tag. And I also review them in lower priority.
So if you want me to commit something I recommend to use only PATCH.
Signature · 1 line
Kalle Valo
cover ath10k: fix beacon loss handling
Michal, could you please address Kalle's comments.
cover ath10k: fix beacon loss handling
In reply to Michal KaziorFW is lying about tx status.
First two patches do a little cleanup. The last
one fixes beacon loss handling.
This can be considered a workaround depending on
what original FW design called for.
Michal Kazior (3):
ath10k: report mgmt tx retry status as no_ack
ath10k: cleanup tx completion
ath10k: pass NullFunc frames through mgmt tx path
drivers/net/wireless/ath/ath10k/htt_rx.c | 5 ++--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 ath10k: report mgmt tx retry status as no_ack
Retry status may mean FW either didn't send the frame or there was no ACK for it. Since we don't really support retrying (why should we?) lets report these frames as not acked.
This way if NullFunc frame is sent through mgmt tx path we can report it's status correctly to mac80211.
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -0
@@ -1084,6 +1084,8 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb) tx_done.discard = false;break ;case HTT_MGMT_TX_STATUS_RETRY : + tx_done.no_ack = true; +break ;case HTT_MGMT_TX_STATUS_DROP : tx_done.discard = true;break ;
Signature · 1 line
1.7.9.5
PATCH 2/3 ath10k: cleanup tx completion
In reply to Michal KaziorThe default values are false anyway. No need to
reassign.
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +0 -3
@@ -1081,7 +1081,6 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)switch (status) {case HTT_MGMT_TX_STATUS_OK : - tx_done.discard = false;break ;case HTT_MGMT_TX_STATUS_RETRY : tx_done.no_ack = true;
@@ -1104,10 +1103,8 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)switch (status) {case HTT_DATA_TX_STATUS_NO_ACK : tx_done.no_ack = true; - tx_done.discard = false;break ;case HTT_DATA_TX_STATUS_OK : - tx_done.discard = false;break ;case HTT_DATA_TX_STATUS_DISCARD :case HTT_DATA_TX_STATUS_POSTPONE :
Signature · 1 line
1.7.9.5
PATCH 3/3 ath10k: pass NullFunc frames through mgmt tx path
In reply to Michal KaziorFW was reporting incorrect tx status for NullFunc frames sent through data tx path.
mac80211 uses tx status when dealing with link/beacon loss. Using mgmt tx path allows us to get reliable tx status. This patch fixes connection loss handling.
--- drivers/net/wireless/ath/ath10k/mac.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +6 -0
@@ -1299,6 +1299,12 @@ static void ath10k_tx_htt(struct ath10k *ar, struct sk_buff *skb)if (ieee80211_is_mgmt (hdr->frame_control)) ret =ath10k_htt_mgmt_tx (ar->htt, skb); +else if (ieee80211_is_nullfunc (hdr->frame_control)) +/* FW does not report tx status properly for NullFunc frames +* unless they are sent through mgmt tx path. mac80211 sends +* those frames when it detects link/beacon loss and depends on +* the tx status to be correct. */ + ret =ath10k_htt_mgmt_tx (ar->htt, skb);else ret =ath10k_htt_tx (ar->htt, skb);
Signature · 1 line
1.7.9.5
Kalle Valo
Appliedcover ath10k: fix beacon loss handling
In reply to Michal KaziorQuoted 5 lines · Michal Kazior
FW is lying about tx status.
First two patches do a little cleanup. The last
one fixes beacon loss handling.
Quoted 7 lines
This can be considered a workaround depending on
what original FW design called for.Michal Kazior (3):
ath10k: report mgmt tx retry status asno_ack
ath10k: cleanup tx completion
ath10k: pass NullFunc frames through mgmt tx path
Thanks, applied.
Signature · 1 line
Kalle Valo