aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/xmit_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8712/xmit_linux.c')
-rw-r--r--drivers/staging/rtl8712/xmit_linux.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
index 90d34cf9d2ff..132afbf49dde 100644
--- a/drivers/staging/rtl8712/xmit_linux.c
+++ b/drivers/staging/rtl8712/xmit_linux.c
@@ -66,16 +66,16 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
{
struct ethhdr etherhdr;
struct iphdr ip_hdr;
- u16 UserPriority = 0;
+ u16 user_priority = 0;
_r8712_open_pktfile(ppktfile->pkt, ppktfile);
_r8712_pktfile_read(ppktfile, (unsigned char *)&etherhdr, ETH_HLEN);
- /* get UserPriority from IP hdr*/
+ /* get user_priority from IP hdr*/
if (pattrib->ether_type == 0x0800) {
_r8712_pktfile_read(ppktfile, (u8 *)&ip_hdr, sizeof(ip_hdr));
- /*UserPriority = (ntohs(ip_hdr.tos) >> 5) & 0x3 ;*/
- UserPriority = ip_hdr.tos >> 5;
+ /*user_priority = (ntohs(ip_hdr.tos) >> 5) & 0x3 ;*/
+ user_priority = ip_hdr.tos >> 5;
} else {
/* "When priority processing of data frames is supported,
* a STA's SME should send EAPOL-Key frames at the highest
@@ -83,9 +83,9 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
*/
if (pattrib->ether_type == 0x888e)
- UserPriority = 7;
+ user_priority = 7;
}
- pattrib->priority = UserPriority;
+ pattrib->priority = user_priority;
pattrib->hdrlen = WLAN_HDR_A3_QOS_LEN;
pattrib->subtype = WIFI_QOS_DATA_TYPE;
}
@@ -95,18 +95,12 @@ void r8712_SetFilter(struct work_struct *work)
struct _adapter *adapter = container_of(work, struct _adapter,
wk_filter_rx_ff0);
u8 oldvalue = 0x00, newvalue = 0x00;
- unsigned long irqL;
oldvalue = r8712_read8(adapter, 0x117);
newvalue = oldvalue & 0xfe;
r8712_write8(adapter, 0x117, newvalue);
- spin_lock_irqsave(&adapter->lock_rx_ff0_filter, irqL);
- adapter->blnEnableRxFF0Filter = 1;
- spin_unlock_irqrestore(&adapter->lock_rx_ff0_filter, irqL);
- do {
- msleep(100);
- } while (adapter->blnEnableRxFF0Filter == 1);
+ wait_for_completion(&adapter->rx_filter_ready);
r8712_write8(adapter, 0x117, oldvalue);
}
@@ -146,7 +140,7 @@ void r8712_xmit_complete(struct _adapter *padapter, struct xmit_frame *pxframe)
pxframe->pkt = NULL;
}
-int r8712_xmit_entry(_pkt *pkt, struct net_device *netdev)
+netdev_tx_t r8712_xmit_entry(_pkt *pkt, struct net_device *netdev)
{
struct xmit_frame *xmitframe = NULL;
struct _adapter *adapter = netdev_priv(netdev);
@@ -171,11 +165,11 @@ int r8712_xmit_entry(_pkt *pkt, struct net_device *netdev)
}
xmitpriv->tx_pkts++;
xmitpriv->tx_bytes += xmitframe->attrib.last_txcmdsz;
- return 0;
+ return NETDEV_TX_OK;
_xmit_entry_drop:
if (xmitframe)
r8712_free_xmitframe(xmitpriv, xmitframe);
xmitpriv->tx_drop++;
dev_kfree_skb_any(pkt);
- return 0;
+ return NETDEV_TX_OK;
}