Commit d38b13aa authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

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: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 63b9907f
...@@ -223,7 +223,8 @@ struct vnt_rsp_card_init { ...@@ -223,7 +223,8 @@ struct vnt_rsp_card_init {
*/ */
enum { enum {
CONTEXT_DATA_PACKET = 1, CONTEXT_DATA_PACKET = 1,
CONTEXT_MGMT_PACKET CONTEXT_MGMT_PACKET,
CONTEXT_BEACON_PACKET
}; };
/* RCB (Receive Control Block) */ /* RCB (Receive Control Block) */
......
This diff is collapsed.
...@@ -247,7 +247,7 @@ struct vnt_beacon_buffer { ...@@ -247,7 +247,7 @@ struct vnt_beacon_buffer {
u8 byPKTNO; u8 byPKTNO;
__le16 tx_byte_count; __le16 tx_byte_count;
struct vnt_tx_short_buf_head short_head; struct vnt_tx_short_buf_head short_head;
struct ieee80211_hdr hdr; struct ieee80211_mgmt mgmt_hdr;
} __packed; } __packed;
void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb); void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
...@@ -255,4 +255,9 @@ int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb); ...@@ -255,4 +255,9 @@ int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb);
CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *); CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *); CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
int vnt_tx_packet(struct vnt_private *, struct sk_buff *);
int vnt_beacon_make(struct vnt_private *, struct ieee80211_vif *);
int vnt_beacon_enable(struct vnt_private *, struct ieee80211_vif *,
struct ieee80211_bss_conf *);
#endif /* __RXTX_H__ */ #endif /* __RXTX_H__ */
...@@ -398,7 +398,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) ...@@ -398,7 +398,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
{ {
struct vnt_usb_send_context *context = urb->context; struct vnt_usb_send_context *context = urb->context;
struct vnt_private *priv = context->priv; struct vnt_private *priv = context->priv;
u8 context_type = context->type; struct ieee80211_tx_info *info;
switch (urb->status) { switch (urb->status) {
case 0: case 0:
...@@ -415,24 +415,18 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) ...@@ -415,24 +415,18 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
break; break;
} }
if (!netif_device_present(priv->dev)) if (context->skb) {
return; info = IEEE80211_SKB_CB(context->skb);
ieee80211_tx_info_clear_status(info);
if (CONTEXT_DATA_PACKET == context_type) { info->status.rates[0].idx = priv->wCurrentRate;
if (context->skb != NULL) { info->status.rates[0].count = 0;
dev_kfree_skb_irq(context->skb); if (!urb->status)
context->skb = NULL; info->flags |= IEEE80211_TX_STAT_ACK;
dev_dbg(&priv->usb->dev, ieee80211_tx_status_irqsafe(priv->hw, context->skb);
"tx %d bytes\n", context->buf_len);
} }
priv->dev->trans_start = jiffies; if (context->type == CONTEXT_DATA_PACKET)
} ieee80211_wake_queues(priv->hw);
if (priv->bLinkPass == true) {
if (netif_queue_stopped(priv->dev))
netif_wake_queue(priv->dev);
}
context->in_use = false; context->in_use = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment