aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi/usb.c')
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 91340c547dbb..a4b2613d6a8c 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -126,7 +126,7 @@ static u32 _usb_read_sync(struct usb_device *udev, u32 addr, u16 len)
126 126
127 wvalue = (u16)addr; 127 wvalue = (u16)addr;
128 _usbctrl_vendorreq_sync_read(udev, request, wvalue, index, data, len); 128 _usbctrl_vendorreq_sync_read(udev, request, wvalue, index, data, len);
129 ret = le32_to_cpu(*data); 129 ret = *data;
130 kfree(data); 130 kfree(data);
131 return ret; 131 return ret;
132} 132}
@@ -163,7 +163,7 @@ static void _usb_write_async(struct usb_device *udev, u32 addr, u32 val,
163 request = REALTEK_USB_VENQT_CMD_REQ; 163 request = REALTEK_USB_VENQT_CMD_REQ;
164 index = REALTEK_USB_VENQT_CMD_IDX; /* n/a */ 164 index = REALTEK_USB_VENQT_CMD_IDX; /* n/a */
165 wvalue = (u16)(addr&0x0000ffff); 165 wvalue = (u16)(addr&0x0000ffff);
166 data = cpu_to_le32(val); 166 data = val;
167 _usbctrl_vendorreq_async_write(udev, request, wvalue, index, &data, 167 _usbctrl_vendorreq_async_write(udev, request, wvalue, index, &data,
168 len); 168 len);
169} 169}
@@ -437,7 +437,7 @@ static void _rtl_usb_rx_process_agg(struct ieee80211_hw *hw,
437 u8 *rxdesc = skb->data; 437 u8 *rxdesc = skb->data;
438 struct ieee80211_hdr *hdr; 438 struct ieee80211_hdr *hdr;
439 bool unicast = false; 439 bool unicast = false;
440 u16 fc; 440 __le16 fc;
441 struct ieee80211_rx_status rx_status = {0}; 441 struct ieee80211_rx_status rx_status = {0};
442 struct rtl_stats stats = { 442 struct rtl_stats stats = {
443 .signal = 0, 443 .signal = 0,
@@ -449,7 +449,7 @@ static void _rtl_usb_rx_process_agg(struct ieee80211_hw *hw,
449 rtlpriv->cfg->ops->query_rx_desc(hw, &stats, &rx_status, rxdesc, skb); 449 rtlpriv->cfg->ops->query_rx_desc(hw, &stats, &rx_status, rxdesc, skb);
450 skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); 450 skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift));
451 hdr = (struct ieee80211_hdr *)(skb->data); 451 hdr = (struct ieee80211_hdr *)(skb->data);
452 fc = le16_to_cpu(hdr->frame_control); 452 fc = hdr->frame_control;
453 if (!stats.crc) { 453 if (!stats.crc) {
454 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); 454 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
455 455
@@ -480,7 +480,7 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
480 u8 *rxdesc = skb->data; 480 u8 *rxdesc = skb->data;
481 struct ieee80211_hdr *hdr; 481 struct ieee80211_hdr *hdr;
482 bool unicast = false; 482 bool unicast = false;
483 u16 fc; 483 __le16 fc;
484 struct ieee80211_rx_status rx_status = {0}; 484 struct ieee80211_rx_status rx_status = {0};
485 struct rtl_stats stats = { 485 struct rtl_stats stats = {
486 .signal = 0, 486 .signal = 0,
@@ -492,7 +492,7 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
492 rtlpriv->cfg->ops->query_rx_desc(hw, &stats, &rx_status, rxdesc, skb); 492 rtlpriv->cfg->ops->query_rx_desc(hw, &stats, &rx_status, rxdesc, skb);
493 skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift)); 493 skb_pull(skb, (stats.rx_drvinfo_size + stats.rx_bufshift));
494 hdr = (struct ieee80211_hdr *)(skb->data); 494 hdr = (struct ieee80211_hdr *)(skb->data);
495 fc = le16_to_cpu(hdr->frame_control); 495 fc = hdr->frame_control;
496 if (!stats.crc) { 496 if (!stats.crc) {
497 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); 497 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
498 498
@@ -853,7 +853,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
853 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 853 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
854 struct rtl_tx_desc *pdesc = NULL; 854 struct rtl_tx_desc *pdesc = NULL;
855 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); 855 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
856 u16 fc = le16_to_cpu(hdr->frame_control); 856 __le16 fc = hdr->frame_control;
857 u8 *pda_addr = hdr->addr1; 857 u8 *pda_addr = hdr->addr1;
858 /* ssn */ 858 /* ssn */
859 u8 *qc = NULL; 859 u8 *qc = NULL;
@@ -892,7 +892,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
892 struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); 892 struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
893 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); 893 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
894 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); 894 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
895 u16 fc = le16_to_cpu(hdr->frame_control); 895 __le16 fc = hdr->frame_control;
896 u16 hw_queue; 896 u16 hw_queue;
897 897
898 if (unlikely(is_hal_stop(rtlhal))) 898 if (unlikely(is_hal_stop(rtlhal)))