mac80211_hwsim: Set IEEE80211_STAT_ACK flag when userspace indicates that the frame has been acknowledged.
PATCH 1/1 mac80211_hwsim: Set IEEE80211_STAT_ACK flag when userspace indicates that the frame has been acknowledged.
The station fail average is not updated correctly since the IEEE80211_STAT_ACK flag is not set when using wmediumd with mac80211_hwsim. Set this flag when wmediumd indicates that the frame was successfully transmitted (eventually).
--- drivers/net/wireless/mac80211_hwsim.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +1 -0
@@ -1555,6 +1555,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, hdr = (struct ieee80211_hdr *) skb->data;mac80211_hwsim_monitor_ack (data2->hw, hdr->addr2); } + txi->flags |=IEEE80211_TX_STAT_ACK ; }ieee80211_tx_status_irqsafe (data2->hw, skb);return 0 ;
Signature · 1 line
1.7.1
Quoted 3 lines · Qasim Javed
The station fail average is not updated correctly since the
IEEE80211_STAT_ACKflag is not set when using wmediumd withmac80211_hwsim. Set this flag when wmediumd indicates that the frame was successfully transmitted (eventually).Signed-off-by Qasim Javed <[email protected]>
Quoted 19 lines
---
drivers/net/wireless/mac80211_hwsim.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/net/wireless/mac80211_hwsim.c +1
-1@@ -1555,6 +1555,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, hdr = (struct ieee80211_hdr *) skb->data; mac80211_hwsim_monitor_ack(data2->hw, hdr->addr2); } + txi->flags |= IEEE80211_TX_STAT_ACK; } ieee80211_tx_status_irqsafe(data2->hw, skb); return 0; --1.7.1
Signature · 3 lines
Javier Cardona cozybit Inc. http://www.cozybit.com
Qasim,
While reviewing your patch I also noticed that the flags HWSIM_TX_CTL_NO_ACK and HWSIM_TX_CTL_REQ_TX_STATUS are not converted back to IEEE80211_TX_CTL_NO_ACK and IEEE80211_TX_CTL_REQ_TX_STATUS on frames received from userspace. Do you think that might affect rate adaptation or the failed average?
Cheers,
Javier
Quoted 32 lines · Javier Cardona
Quoted 3 lines · Qasim Javed
The station fail average is not updated correctly since the
IEEE80211_STAT_ACKflag is not set when using wmediumd withmac80211_hwsim. Set this flag when wmediumd indicates that the frame was successfully transmitted (eventually).Signed-off-by Qasim Javed <[email protected]>Signed-off-by Javier Cardona <[email protected]>Quoted 17 lines
---
drivers/net/wireless/mac80211_hwsim.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/net/wireless/mac80211_hwsim.c +1
-1@@ -1555,6 +1555,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, hdr = (struct ieee80211_hdr *) skb->data; mac80211_hwsim_monitor_ack(data2->hw, hdr->addr2); } + txi->flags |= IEEE80211_TX_STAT_ACK; } ieee80211_tx_status_irqsafe(data2->hw, skb); return 0; --Quoted 2 lines
1.7.1
--
Javier Cardona
cozybit Inc.
http://www.cozybit.com
Signature · 3 lines
Javier Cardona cozybit Inc. http://www.cozybit.com
Javier,
wmediumd is not honoring HWSIM_TX_CTL_REQ_TX_STATUS right now, I can send a separate wmediumd patch for that. This flag does not need to be converted back to IEEE80211_TX_CTL_REQ_TX_STATUS since we request the status of transmission using this flag and its only relevant to wmediumd for deciding whether to send TX information back to hwsim or not.
HWSIM_TX_CTL_NO_ACK could be used to disable the generation of an ACK (currently just "inserted" in to the hwsim monitor interface) for unicast frames. Of course normally you would need an ACK, but someone might want to test a scenario without ACKs. In that case, we should not insert an ACK on the hwsim monitor interface when HWSIM_TX_CTL_NO_ACK is set. Still, in this case we do not need to convert back to IEEE80211_TX_CTL_NO_ACK.
So, basically converting back to IEEE80211_* flags is not required (according to my understanding). This also implies that rate control and the fail average will not be impacted by not converting the flags.
Rate control is interested in the number of retries which is already being conveyed through TX info sent from the userspace to mac80211_hwsim and further utilized by ieee80211_tx_status. Failed average is only impacted by IEEE80211_STAT_ACK which has already been set properly by the proposed patch.
-Qasim
Quoted 54 lines · Javier Cardona
Qasim,
While reviewing your patch I also noticed that the flags
HWSIM_TX_CTL_NO_ACKandHWSIM_TX_CTL_REQ_TX_STATUSare not converted back toIEEE80211_TX_CTL_NO_ACKandIEEE80211_TX_CTL_REQ_TX_STATUSon frames received from userspace. Do you think that might affect rate adaptation or the failed average?Cheers,
Javier
Quoted 24 lines · Javier Cardona
Quoted 3 lines · Qasim Javed
The station fail average is not updated correctly since the
IEEE80211_STAT_ACKflag is not set when using wmediumd withmac80211_hwsim. Set this flag when wmediumd indicates that the frame was successfully transmitted (eventually).Signed-off-by Qasim Javed <[email protected]>Signed-off-by Javier Cardona <[email protected]>Quoted 18 lines
---
drivers/net/wireless/mac80211_hwsim.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)drivers/net/wireless/mac80211_hwsim.c +1
-1@@ -1555,6 +1555,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2, hdr = (struct ieee80211_hdr *) skb->data; mac80211_hwsim_monitor_ack(data2->hw, hdr->addr2); } + txi->flags |= IEEE80211_TX_STAT_ACK; } ieee80211_tx_status_irqsafe(data2->hw, skb); return 0; --1.7.1
Quoted 8 lines
Quoted 1 line
--
Javier Cardona
cozybit Inc.
http://www.cozybit.com--
Javier Cardona
cozybit Inc.
http://www.cozybit.com