diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-06-25 21:14:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:21:19 -0400 |
commit | d38b13aa7884021ddb06fb6f248da265b8a6fbee (patch) | |
tree | fd4f9c654a87e7305b493317a51404170ebbf657 /drivers/staging/vt6656/usbpipe.c | |
parent | 63b9907f58f1c1b718cd37eeaec074692f00492d (diff) |
staging: vt6656: mac80211 conversion: Create tx functions
Create vnt_fill_txkey as mac80211 replacement for s_vFillTxKey.
Create vnt_tx_packet which a merger of s_bPacketToWirelessUsb, nsDMA_tx_packet
and csMgmt_xmit using mac80211 signalling.
Create vnt_beacon_xmit as mac80211 replacement for csBeacon_xmit. Changing
header in vnt_beacon_buffer to struct ieee80211_mgmt deleting some of
old code. vnt_beacon_make is needed to make beacon for vnt_beacon_xmit.
Create vnt_beacon_enable as mac80211 call to enable beacon.
vnt_fill_ieee80211_rts is modified to use struct ieee80211_hdr instead of
struct ethhdr and access to tx_context.
In s_nsBulkOutIoCompleteWrite modify context handling
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/usbpipe.c')
-rw-r--r-- | drivers/staging/vt6656/usbpipe.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index e30150efbe43..fd8776c1a107 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -398,7 +398,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) { struct vnt_usb_send_context *context = urb->context; struct vnt_private *priv = context->priv; - u8 context_type = context->type; + struct ieee80211_tx_info *info; switch (urb->status) { case 0: @@ -415,24 +415,18 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) break; } - if (!netif_device_present(priv->dev)) - return; - - if (CONTEXT_DATA_PACKET == context_type) { - if (context->skb != NULL) { - dev_kfree_skb_irq(context->skb); - context->skb = NULL; - dev_dbg(&priv->usb->dev, - "tx %d bytes\n", context->buf_len); - } - - priv->dev->trans_start = jiffies; + if (context->skb) { + info = IEEE80211_SKB_CB(context->skb); + ieee80211_tx_info_clear_status(info); + info->status.rates[0].idx = priv->wCurrentRate; + info->status.rates[0].count = 0; + if (!urb->status) + info->flags |= IEEE80211_TX_STAT_ACK; + ieee80211_tx_status_irqsafe(priv->hw, context->skb); } - if (priv->bLinkPass == true) { - if (netif_queue_stopped(priv->dev)) - netif_wake_queue(priv->dev); - } + if (context->type == CONTEXT_DATA_PACKET) + ieee80211_wake_queues(priv->hw); context->in_use = false; |