diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-11-25 06:43:05 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-11-25 14:09:56 -0500 |
commit | 808bbebcc8fcbcb2b93aefd8b181a0fdccb407c6 (patch) | |
tree | 76730d24264fbea860643fe4c8706b0d45bf2418 /drivers/net/wireless/mwifiex/txrx.c | |
parent | 381e9fffe6b8343c2479939178ef7ded50bf32d3 (diff) | |
download | linux-808bbebcc8fcbcb2b93aefd8b181a0fdccb407c6.tar.gz linux-808bbebcc8fcbcb2b93aefd8b181a0fdccb407c6.tar.bz2 linux-808bbebcc8fcbcb2b93aefd8b181a0fdccb407c6.zip |
mwifiex: add Tx status support for EAPOL packets
Firmware notifies the driver through event if EAPOL data packet
has been acked or not. We will inform this status to userspace
listening on a socket.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/txrx.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index a5983fc4e83a..782bfd61c300 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c @@ -203,3 +203,23 @@ done: } EXPORT_SYMBOL_GPL(mwifiex_write_data_complete); +void mwifiex_parse_tx_status_event(struct mwifiex_private *priv, + void *event_body) +{ + struct tx_status_event *tx_status = (void *)priv->adapter->event_body; + struct sk_buff *ack_skb; + unsigned long flags; + + if (!tx_status->tx_token_id) + return; + + spin_lock_irqsave(&priv->ack_status_lock, flags); + ack_skb = idr_find(&priv->ack_status_frames, tx_status->tx_token_id); + if (ack_skb) + idr_remove(&priv->ack_status_frames, tx_status->tx_token_id); + spin_unlock_irqrestore(&priv->ack_status_lock, flags); + + /* consumes ack_skb */ + if (ack_skb) + skb_complete_wifi_ack(ack_skb, !tx_status->status); +} |