Staging: rtl8192su: remove kernel version compatibility wrappers
PATCH 1/4 Staging: rtl8192su: remove kernel version compatibility wrappers
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
--- drivers/staging/rtl8192su/ieee80211/dot11d.c | 11 drivers/staging/rtl8192su/ieee80211/ieee80211.h | 120 ---- drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c | 14 drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.h | 7 drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c | 51 - drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c | 229 ------- drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_wep.c | 113 --- drivers/staging/rtl8192su/ieee80211/ieee80211_module.c | 51 - drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c | 9 drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c | 176 ----- drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c | 44 - drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c | 9 drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | 118 --- drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c | 9 drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c | 12 drivers/staging/rtl8192su/r8192S_firmware.c | 18 drivers/staging/rtl8192su/r8192S_phy.c | 14 drivers/staging/rtl8192su/r8192S_phy.h | 5 drivers/staging/rtl8192su/r8192U.h | 40 - drivers/staging/rtl8192su/r8192U_core.c | 388 ------------- drivers/staging/rtl8192su/r8192U_dm.c | 60 -- drivers/staging/rtl8192su/r8192U_dm.h | 8 drivers/staging/rtl8192su/r8192U_pm.c | 9 drivers/staging/rtl8192su/r8192U_wx.c | 19 drivers/staging/rtl8192su/r819xU_firmware.c | 13 drivers/staging/rtl8192su/r819xU_phy.c | 14 drivers/staging/rtl8192su/r819xU_phy.h | 4 27 files changed, 77 insertions(+), 1488 deletions(-)
drivers/staging/rtl8192su/ieee80211/dot11d.c +1 -10
@@ -218,7 +218,7 @@ int ToLegalChannel(return default_chn; } -#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 )) +EXPORT_SYMBOL (Dot11d_Init);EXPORT_SYMBOL (Dot11d_Reset);EXPORT_SYMBOL (Dot11d_UpdateCountryIe);
@@ -226,14 +226,5 @@ EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);EXPORT_SYMBOL (DOT11D_ScanComplete);EXPORT_SYMBOL (IsLegalChannel);EXPORT_SYMBOL (ToLegalChannel); -#else -EXPORT_SYMBOL_NOVERS (Dot11d_Init); -EXPORT_SYMBOL_NOVERS (Dot11d_Reset); -EXPORT_SYMBOL_NOVERS (Dot11d_UpdateCountryIe); -EXPORT_SYMBOL_NOVERS (DOT11D_GetMaxTxPwrInDbm); -EXPORT_SYMBOL_NOVERS (DOT11D_ScanComplete); -EXPORT_SYMBOL_NOVERS (IsLegalChannel); -EXPORT_SYMBOL_NOVERS (ToLegalChannel); -#endif #endif
drivers/staging/rtl8192su/ieee80211/ieee80211.h +0 -120
191 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c +0 -14
@@ -55,11 +55,7 @@ void ieee80211_crypt_deinit_entries(struif (entry->ops) { entry->ops->deinit (entry->priv); -#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,5 ,0 )module_put (entry->ops->owner); -#else -__MOD_DEC_USE_COUNT (entry->ops->owner); -#endif }kfree (entry); }
@@ -251,7 +247,6 @@ static void __exit ieee80211_crypto_deinkfree (hcrypt); } -#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ))EXPORT_SYMBOL (ieee80211_crypt_deinit_entries);EXPORT_SYMBOL (ieee80211_crypt_deinit_handler);EXPORT_SYMBOL (ieee80211_crypt_delayed_deinit);
@@ -259,15 +254,6 @@ EXPORT_SYMBOL(ieee80211_crypt_delayed_deEXPORT_SYMBOL (ieee80211_register_crypto_ops);EXPORT_SYMBOL (ieee80211_unregister_crypto_ops);EXPORT_SYMBOL (ieee80211_get_crypto_ops); -#else -EXPORT_SYMBOL_NOVERS (ieee80211_crypt_deinit_entries); -EXPORT_SYMBOL_NOVERS (ieee80211_crypt_deinit_handler); -EXPORT_SYMBOL_NOVERS (ieee80211_crypt_delayed_deinit); - -EXPORT_SYMBOL_NOVERS (ieee80211_register_crypto_ops); -EXPORT_SYMBOL_NOVERS (ieee80211_unregister_crypto_ops); -EXPORT_SYMBOL_NOVERS (ieee80211_get_crypto_ops); -#endif module_init (ieee80211_crypto_init);module_exit (ieee80211_crypto_deinit);
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.h +0 -7
@@ -82,12 +82,5 @@ void ieee80211_crypt_deinit_entries(struvoid ieee80211_crypt_deinit_handler (unsigned long );void ieee80211_crypt_delayed_deinit (struct ieee80211_device *ieee,struct ieee80211_crypt_data **crypt); -#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 )) -#define offset_in_page (p) ((unsigned long)(p) & ~PAGE_MASK) -#endif -#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,4 ,31 )) -#define crypto_alloc_tfm crypto_alloc_tfm_rsl -#define crypto_free_tfm crypto_free_tfm_rsl -#endif #endif
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c +4 -47
98 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c +17 -212
387 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_wep.c +11 -102
209 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_module.c +2 -49
131 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c +0 -9
@@ -55,11 +55,7 @@ static inline void ieee80211_monitor_rx(u16 fc =le16_to_cpu (hdr->frame_ctl); skb->dev = ieee->dev; -#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,22 )skb_reset_mac_header (skb); -#else - skb->mac.raw = skb->data; -#endif skb_pull (skb,ieee80211_get_hdrlen (fc)); skb->pkt_type =PACKET_OTHERHOST ;
@@ -2823,10 +2819,5 @@ void ieee80211_rx_mgt(struct ieee80211_d } } -#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ))EXPORT_SYMBOL (ieee80211_rx_mgt);EXPORT_SYMBOL (ieee80211_rx); -#else -EXPORT_SYMBOL_NOVERS (ieee80211_rx_mgt); -EXPORT_SYMBOL_NOVERS (ieee80211_rx); -#endif
drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c +7 -169
365 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_softmac_wx.c +1 -43
81 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c +1 -8
@@ -287,11 +287,8 @@ ieee80211_classify(struct sk_buff *skb,return 0 ;// IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,22 )) ip =ip_hdr (skb); -#else - ip = (struct iphdr *)(skb->data +sizeof (struct ether_header )); -#endif +switch (ip->tos &0xfc ) {case 0x20 :return 2 ;
@@ -620,11 +617,7 @@ void ieee80211_query_seqnum(struct ieee8int ieee80211_xmit (struct sk_buff *skb,struct net_device *dev) { -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,5 ,0 ))struct ieee80211_device *ieee =netdev_priv (dev); -#else -struct ieee80211_device *ieee = (struct ieee80211_device *)dev->priv; -#endif struct ieee80211_txb *txb =NULL ;struct ieee80211_hdr_3addrqos *frag_hdr;int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size;
drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +8 -110
301 lines not on this page · raw message
drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c +0 -9
@@ -1241,14 +1241,9 @@ u8 HTFilterMCSRate( struct ieee80211_devvoid HTSetConnectBwMode (struct ieee80211_device * ieee,HT_CHANNEL_WIDTH Bandwidth,HT_EXTCHNL_OFFSET Offset);#if 0 //I need move this function to other places, such as rx? -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))void HTOnAssocRsp_wq (struct work_struct *work) { struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, ht_onAssRsp); -#else -void HTOnAssocRsp_wq(struct ieee80211_device *ieee) -{ -#endif#endif void HTOnAssocRsp (struct ieee80211_device *ieee) {
@@ -2030,8 +2025,4 @@ void HTSetConnectBwModeCallback(struct i pHTInfo->bSwBwInProgress = false; } -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) -EXPORT_SYMBOL_NOVERS (HTUpdateSelfAndPeerSetting); -#else EXPORT_SYMBOL (HTUpdateSelfAndPeerSetting); -#endif
drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c +1 -11
@@ -2,13 +2,6 @@#include <linux/etherdevice.h> #include "rtl819x_TS.h" -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) -#define list_for_each_entry_safe (pos, n, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member), \ - n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, typeof(*n), member)) -#endif void TsSetupTimeOut (unsigned long data) {// Not implement yet
@@ -660,8 +653,5 @@ void TsStartAddBaProcess(struct ieee8021else IEEE80211_DEBUG (IEEE80211_DL_ERR ,"%s()==>BA timer is already added\n" , __FUNCTION__); } -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) -EXPORT_SYMBOL_NOVERS (RemovePeerTS); -#else +EXPORT_SYMBOL (RemovePeerTS); -#endif
drivers/staging/rtl8192su/r8192S_firmware.c +2 -16
@@ -25,9 +25,7 @@#include "r8192xU_firmware_img.h" #endif -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 )#include <linux/firmware.h> -#endif #define byte (x,n) ( (x >> (8 * n)) & 0xff )
@@ -405,16 +403,11 @@ bool FirmwareDownload92S(struct net_devi//3 //<1> Open Image file, and map file to contineous memory if open file success. //3 // or read image file from array. Default load from BIN file //3// -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) - priv->firmware_source =FW_SOURCE_HEADER_FILE ; -#else priv->firmware_source =FW_SOURCE_IMG_FILE ;// We should decided by Reg. -#endif switch ( priv->firmware_source ) {case FW_SOURCE_IMG_FILE : -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 )if (pFirmware->szFwTmpBufferLen ==0 ) {
@@ -473,7 +466,6 @@ bool FirmwareDownload92S(struct net_devi } -#endif break ;case FW_SOURCE_HEADER_FILE :
@@ -870,11 +862,8 @@ bool init_firmware(struct net_device *de* Download boot, main, and data image for System reset. * Download data image for firmware reseta */ -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) - priv->firmware_source =FW_SOURCE_HEADER_FILE ; -#else priv->firmware_source =FW_SOURCE_IMG_FILE ; -#endif +for (init_step = starting_state; init_step <=FW_INIT_STEP2_DATA ; init_step++) {/* * Open Image file, and map file to contineous memory if open file success.
@@ -883,7 +872,6 @@ bool init_firmware(struct net_device *deif (rst_opt ==OPT_SYSTEM_RESET ) {switch (priv->firmware_source) {case FW_SOURCE_IMG_FILE : -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ) rc =request_firmware (&fw_entry, fw_name[init_step],&priv->udev->dev);if (rc <0 ) {RT_TRACE (COMP_ERR ,"request firmware fail!\n" );
@@ -912,7 +900,6 @@ bool init_firmware(struct net_device *de#endif } pfirmware->firmware_buf_size = file_length; -#endif break ;case FW_SOURCE_HEADER_FILE :
@@ -943,11 +930,10 @@ bool init_firmware(struct net_device *de* and Tx descriptor info * */ rt_status =fw_download_code (dev,mapped_file,file_length); -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ) +if (rst_opt ==OPT_SYSTEM_RESET ) {release_firmware (fw_entry); } -#endif if (rt_status != TRUE) { goto download_firmware_fail;
drivers/staging/rtl8192su/r8192S_phy.c +0 -14
@@ -4678,29 +4678,15 @@ void InitialGain819xUsb(struct net_devicif (priv->up) { -#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,20 )queue_delayed_work (priv->priv_wq,&priv->initialgain_operate_wq,0 ); -#else -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ) -schedule_task (&priv->initialgain_operate_wq); -#else -queue_work (priv->priv_wq,&priv->initialgain_operate_wq); -#endif -#endif } } -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,20 ))extern void InitialGainOperateWorkItemCallBack (struct work_struct *work) { struct delayed_work *dwork = container_of(work,struct delayed_work,work); struct r8192_priv *priv = container_of(dwork,struct r8192_priv,initialgain_operate_wq);struct net_device *dev = priv->ieee80211->dev; -#else -extern void InitialGainOperateWorkItemCallBack (struct net_device *dev) -{ -struct r8192_priv *priv =ieee80211_priv (dev); -#endif #define SCAN_RX_INITIAL_GAIN 0x17#define POWER_DETECTION_TH 0x08u32 BitMask;
drivers/staging/rtl8192su/r8192S_phy.h +1 -4
@@ -121,11 +121,8 @@ extern void PHY_IQCalibrateBcut(structextern void PHY_IQCalibrate (struct net_device * dev);extern void PHY_GetHWRegOriginalValue (struct net_device * dev); -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,20 ))extern void InitialGainOperateWorkItemCallBack (struct work_struct *work); -#else -extern void InitialGainOperateWorkItemCallBack (struct net_device *dev); -#endif +void PHY_SetTxPowerLevel8192S (struct net_device * dev,u8 channel);void PHY_InitialGain8192S (struct net_device * dev,u8 Operation );
drivers/staging/rtl8192su/r8192U.h +5 -35
@@ -39,9 +39,7 @@#include <linux/random.h> #include <linux/version.h> #include <asm/io.h> -#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,27 )) -#include <asm/semaphore.h> -#endif +#include "ieee80211/ieee80211.h" #ifdef RTL8192SU
@@ -1555,11 +1553,7 @@ typedef struct r8192_priv// spinlock_t irq_th_lock; spinlock_t tx_lock;spinlock_t ps_lock; -#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,16 )) -struct semaphore mutex; -#else struct mutex mutex; -#endif spinlock_t rf_lock;//used to lock rf write operation added by wb u16 irq_mask;
@@ -1619,11 +1613,9 @@ typedef struct r8192_priv/* modified by davad for Rx process */ struct sk_buff_head rx_queue;struct sk_buff_head skb_queue; -#if (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 )) -struct tq_struct qos_activate; -#else +struct work_struct qos_activate; -#endif +short tx_urb_index;atomic_t tx_pending[0x10 ];//UART_PRIORITY+1
@@ -1653,11 +1645,8 @@ typedef struct r8192_privu16 rts;struct ChnlAccessSetting ChannelAccessSetting; -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ) +struct work_struct reset_wq; -#else -struct tq_struct reset_wq; -#endif /**********************************************************/ //for rtl819xUsb
@@ -1874,33 +1863,14 @@ typedef struct r8192_privu16 SifsTime;//define work item by amy 080526 -#if LINUX_VERSION_CODE >KERNEL_VERSION (2 ,5 ,0 ) - -#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,20 )struct delayed_work update_beacon_wq;struct delayed_work watch_dog_wq;struct delayed_work txpower_tracking_wq;struct delayed_work rfpath_check_wq;struct delayed_work gpio_change_rf_wq;struct delayed_work initialgain_operate_wq; -#else -struct work_struct update_beacon_wq; -struct work_struct watch_dog_wq; -struct work_struct txpower_tracking_wq; -struct work_struct rfpath_check_wq; -struct work_struct gpio_change_rf_wq; -struct work_struct initialgain_operate_wq; -#endif +struct workqueue_struct *priv_wq; -#else -/* used for periodly scan */ -struct tq_struct update_beacon_wq; -struct tq_struct txpower_tracking_wq; -struct tq_struct rfpath_check_wq; -struct tq_struct watch_dog_wq; -struct tq_struct gpio_change_rf_wq; -struct tq_struct initialgain_operate_wq; -#endif //#ifdef RTL8192SU //lzm add for 8192S u32 IntrMask;
drivers/staging/rtl8192su/r8192U_core.c +11 -377
891 lines not on this page · raw message
drivers/staging/rtl8192su/r8192U_dm.c +1 -59
60 lines not on this page · raw message
drivers/staging/rtl8192su/r819xU_firmware.c +2 -11
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192su/r819xU_phy.c +0 -14
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.