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>
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index e30150e..fd8776c 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -398,7 +398,7 @@
{
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 @@
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;