staging: rtl8188eu: fix code styling issues
cover staging: rtl8188eu: fix code styling issues
These patches fix:
- multi line comment styling
- whitespaces styling issues
- use pr_info() instead of printk()
- prefer using BIT macro
This patch series includes all the patches I sent for this driver to show the correct order.
Aastha Gupta (7):
staging: rtl8188eu: fix block comment styling in rtl8188eu files
staging: rtl8188eu: fix space between function name and '('
staging: rtl8188eu: use pr_info() instead of printk()
staging: rtl8188eu: fix spaces before tabs
staging: rtl8188eu: add spaces around algebric and boolean operators
staging: rtl8188eu: prefer using BIT macro
staging: rtl8188eu: add spaces around '|'
drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h | 33 ++- drivers/staging/rtl8188eu/include/Hal8188EPhyReg.h | 3 +- .../rtl8188eu/include/Hal8188ERateAdaptive.h | 28 +-- drivers/staging/rtl8188eu/include/basic_types.h | 14 +- drivers/staging/rtl8188eu/include/drv_types.h | 3 +- drivers/staging/rtl8188eu/include/hal_intf.h | 6 +- drivers/staging/rtl8188eu/include/ieee80211.h | 114 ++++++----- drivers/staging/rtl8188eu/include/odm.h | 44 ++-- drivers/staging/rtl8188eu/include/osdep_intf.h | 2 +- drivers/staging/rtl8188eu/include/pwrseq.h | 44 ++-- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 29 ++- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 153 +++++++------- drivers/staging/rtl8188eu/include/rtw_cmd.h | 222 +++++++++++---------- drivers/staging/rtl8188eu/include/rtw_debug.h | 4 +- drivers/staging/rtl8188eu/include/rtw_eeprom.h | 9 +- drivers/staging/rtl8188eu/include/rtw_event.h | 40 ++-- drivers/staging/rtl8188eu/include/rtw_led.h | 6 +- drivers/staging/rtl8188eu/include/rtw_mlme.h | 38 ++-- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 27 ++- .../staging/rtl8188eu/include/rtw_mp_phy_regdef.h | 19 +- drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 22 +- drivers/staging/rtl8188eu/include/rtw_qos.h | 3 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 80 ++++---- drivers/staging/rtl8188eu/include/rtw_rf.h | 6 +- drivers/staging/rtl8188eu/include/rtw_security.h | 27 ++- drivers/staging/rtl8188eu/include/rtw_xmit.h | 12 +- drivers/staging/rtl8188eu/include/sta_info.h | 12 +- drivers/staging/rtl8188eu/include/wifi.h | 25 ++- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 22 +- 29 files changed, 583 insertions(+), 464 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/7 staging: rtl8188eu: fix block comment styling in rtl8188eu files
This patch fixes checkpatch.pl warnings for block comment styling.
1. Block comment use a trailing */ on a separate line.
2. Block comment use * on subsequent lines.
3. Block comment should align * on each line.
--- drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h | 33 ++- drivers/staging/rtl8188eu/include/Hal8188EPhyReg.h | 3 +- .../rtl8188eu/include/Hal8188ERateAdaptive.h | 28 +-- drivers/staging/rtl8188eu/include/basic_types.h | 14 +- drivers/staging/rtl8188eu/include/drv_types.h | 3 +- drivers/staging/rtl8188eu/include/hal_intf.h | 6 +- drivers/staging/rtl8188eu/include/ieee80211.h | 30 +-- drivers/staging/rtl8188eu/include/odm.h | 40 ++-- drivers/staging/rtl8188eu/include/pwrseq.h | 44 ++-- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 21 +- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 117 ++++++----- drivers/staging/rtl8188eu/include/rtw_cmd.h | 222 +++++++++++---------- drivers/staging/rtl8188eu/include/rtw_eeprom.h | 9 +- drivers/staging/rtl8188eu/include/rtw_event.h | 40 ++-- drivers/staging/rtl8188eu/include/rtw_led.h | 6 +- drivers/staging/rtl8188eu/include/rtw_mlme.h | 38 ++-- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 27 ++- .../staging/rtl8188eu/include/rtw_mp_phy_regdef.h | 19 +- drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 22 +- drivers/staging/rtl8188eu/include/rtw_qos.h | 3 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 80 ++++---- drivers/staging/rtl8188eu/include/rtw_rf.h | 6 +- drivers/staging/rtl8188eu/include/rtw_security.h | 27 ++- drivers/staging/rtl8188eu/include/rtw_xmit.h | 12 +- drivers/staging/rtl8188eu/include/sta_info.h | 12 +- drivers/staging/rtl8188eu/include/wifi.h | 25 ++- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 22 +- 27 files changed, 514 insertions(+), 395 deletions(-)
drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h +22 -11
@@ -75,7 +75,8 @@ enum rf_radio_path {#define CHANNEL_MAX_NUMBER 14/* 14 is the max chnl number */ #define MAX_CHNL_GROUP_24G 6/* ch1~2, ch3~5, ch6~8, *ch9~11, ch12~13, CH 14 -* total three groups */ +* total three groups +*/ #define CHANNEL_GROUP_MAX_88E 6enum wireless_mode {
@@ -116,35 +117,45 @@ struct bb_reg_def {/* 0x80c~0x80f [4 bytes] */ u32 rfHSSIPara1;/* wire parameter control1 : */ /* 0x820~0x823,0x828~0x82b, -* 0x830~0x833, 0x838~0x83b [16 bytes] */ +* 0x830~0x833, 0x838~0x83b [16 bytes] +*/ u32 rfHSSIPara2;/* wire parameter control2 : */ /* 0x824~0x827,0x82c~0x82f, 0x834~0x837, -* 0x83c~0x83f [16 bytes] */ +* 0x83c~0x83f [16 bytes] +*/ u32 rfSwitchControl;/* Tx Rx antenna control : */ /* 0x858~0x85f [16 bytes] */ u32 rfAGCControl1;/* AGC parameter control1 : */ /* 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, -* 0xc68~0xc6b [16 bytes] */ +* 0xc68~0xc6b [16 bytes] +*/ u32 rfAGCControl2;/* AGC parameter control2 : */ /* 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, -* 0xc6c~0xc6f [16 bytes] */ +* 0xc6c~0xc6f [16 bytes] +*/ u32 rfRxIQImbalance;/* OFDM Rx IQ imbalance matrix : */ /* 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, -* 0xc2c~0xc2f [16 bytes] */ +* 0xc2c~0xc2f [16 bytes] +*/ u32 rfRxAFE;/* Rx IQ DC ofset and Rx digital filter, -* Rx DC notch filter : */ +* Rx DC notch filter : +*/ /* 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, -* 0xc28~0xc2b [16 bytes] */ +* 0xc28~0xc2b [16 bytes] +*/ u32 rfTxIQImbalance;/* OFDM Tx IQ imbalance matrix */ /* 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, -* 0xc98~0xc9b [16 bytes] */ +* 0xc98~0xc9b [16 bytes] +*/ u32 rfTxAFE;/* Tx IQ DC Offset and Tx DFIR type */ /* 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, -* 0xc9c~0xc9f [16 bytes] */ +* 0xc9c~0xc9f [16 bytes] +*/ u32 rfLSSIReadBack;/* LSSI RF readback data SI mode */ /* 0x8a0~0x8af [16 bytes] */ u32 rfLSSIReadBackPi;/* LSSI RF readback data PI mode 0x8b8-8bc for -* Path A and B */ +* Path A and B +*/ };/*------------------------------Define structure----------------------------*/
drivers/staging/rtl8188eu/include/Hal8188EPhyReg.h +2 -1
@@ -136,7 +136,8 @@#define rCCK0_CCA 0xa08/* AGC default value, saturation level Antenna Diversity, RX AGC, LNA Threshold, -* RX LNA Threshold useless now. Not the same as 90 series */ +* RX LNA Threshold useless now. Not the same as 90 series +*/ #define rCCK0_RxAGC1 0xa0c#define rCCK0_RxAGC2 0xa10/* AGC & DAGC */
drivers/staging/rtl8188eu/include/Hal8188ERateAdaptive.h +14 -14
@@ -1,19 +1,19 @@#ifndef __INC_RA_H#define __INC_RA_H -/*++ -Copyright (c) Realtek Semiconductor Corp. All rights reserved. - -Module Name: -RateAdaptive.h - -Abstract: -Prototype of RA and related data structure. - -Major Change History: -When Who What ----------- --------------- ------------------------------- -2011-08-12 Page Create. ---*/ +/* +* Copyright (c) Realtek Semiconductor Corp. All rights reserved. +* +* Module Name: +* RateAdaptive.h +* +* Abstract: +* Prototype of RA and related data structure. +* +* Major Change History: +* When Who What +* ---------- --------------- ------------------------------- +* 2011-08-12 Page Create. +*/ /* Rate adaptive define */ #define PERENTRY 23
drivers/staging/rtl8188eu/include/basic_types.h +8 -6
@@ -1,4 +1,4 @@ -/****************************************************************************** +/****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. *
@@ -20,14 +20,15 @@/* port from fw */ /* TODO: Macros Below are Sync from SD7-Driver. It is necessary -* to check correctness */ +* to check correctness +*/ /* * Call endian free function when * 1. Read/write packet content. * 2. Before write integer to IO. * 3. After read integer from IO. -*/ +*/ /* Convert little data endian to host ordering */ #define EF1BYTE (_val) \
@@ -74,9 +75,10 @@#define LE_P1BYTE_TO_HOST_1BYTE (__pstart) \ (EF1BYTE(*((u8 *)(__pstart)))) -/*Description: -Translate subfield (continuous bits in little-endian) of 4-byte -value to host byte ordering.*/ +/* Description: +* Translate subfield (continuous bits in little-endian) of 4-byte +* value to host byte ordering. +*/ #define LE_BITS_TO_4BYTE (__pstart, __bitoffset, __bitlen) \ ( \ (LE_P4BYTE_TO_HOST_4BYTE(__pstart) >> (__bitoffset)) & \
drivers/staging/rtl8188eu/include/drv_types.h +2 -1
@@ -128,7 +128,8 @@ struct dvobj_priv {static inline struct device *dvobj_to_dev (struct dvobj_priv *dvobj) {/* todo: get interface type from dvobj and the return -* the dev accordingly */ +* the dev accordingly +*/ return &dvobj->pusbintf->dev; };
drivers/staging/rtl8188eu/include/hal_intf.h +4 -2
@@ -96,9 +96,11 @@ enum hw_variables {HW_VAR_FIFO_CLEARN_UP ,HW_VAR_CHECK_TXBUF ,HW_VAR_APFM_ON_MAC ,/* Auto FSM to Turn On, include clock, isolation, -* power control for MAC only */ +* power control for MAC only +*/ /* The valid upper nav range for the HW updating, if the true value is -* larger than the upper range, the HW won't update it. */ +* larger than the upper range, the HW won't update it. +*/ /* Unit in microsecond. 0 means disable this function. */ HW_VAR_NAV_UPPER , HW_VAR_RPT_TIMER_SETTING,
drivers/staging/rtl8188eu/include/ieee80211.h +17 -13
@@ -276,12 +276,13 @@ struct sta_data {#define IEEE80211_DATA_LEN 2304/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section -6.2.1.1.2. +* 6.2.1.1.2. -The figure in section 7.1.2 suggests a body size of up to 2312 -bytes is allowed, which is a bit confusing, I suspect this -represents the 2304 bytes of real data, plus a possible 8 bytes of -WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */ +* The figure in section 7.1.2 suggests a body size of up to 2312 +* bytes is allowed, which is a bit confusing, I suspect this +* represents the 2304 bytes of real data, plus a possible 8 bytes of +* WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) +*/ #define IEEE80211_HLEN 30
@@ -423,7 +424,8 @@ struct ieee80211_snap_hdr {/* IEEE 802.11 requires that STA supports concurrent reception of at least * three fragmented frames. This define can be increased to support more * concurrent frames, but it should be noted that each entry can consume about -* 2 kB of RAM and increasing cache size will slow down frame reassembly. */ +* 2 kB of RAM and increasing cache size will slow down frame reassembly. +*/ #define IEEE80211_FRAG_CACHE_LEN 4#define SEC_KEY_1 (1<<0)
@@ -451,7 +453,8 @@ struct ieee80211_snap_hdr {/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs * only use 8, and then use extended rates for the remaining supported * rates. Other APs, however, stick all of their supported rates on the -* main rates information element... */ +* main rates information element... +*/ #define MAX_RATES_LENGTH ((u8)12)#define MAX_RATES_EX_LENGTH ((u8)16)#define MAX_NETWORK_COUNT 128
@@ -473,11 +476,11 @@ struct ieee80211_snap_hdr {#define IW_ESSID_MAX_SIZE 32/* -join_res: --1: authentication fail --2: association fail -> 0: TID -*/ +* join_res: +* -1: authentication fail +* -2: association fail +* > 0: TID +*/ enum ieee80211_state {/* the card is not linked at all */
@@ -615,7 +618,8 @@ enum rtw_ieee80211_back_parties { };#define OUI_MICROSOFT 0x0050f2/* Microsoft (also used in Wi-Fi specs) -* 00:50:F2 */ +* 00:50:F2 +*/ #define WME_OUI_TYPE 2#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0#define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
drivers/staging/rtl8188eu/include/odm.h +26 -14
@@ -36,7 +36,8 @@/* Mainly, it just retains last scan result and scan again. */ /* After that, it compares the scan result to see which one gets better * RSSI. It selects antenna with better receiving power and returns better -* scan result. */ +* scan result. +*/ #define TP_MODE 0#define RSSI_MODE 1
@@ -173,10 +174,12 @@ struct rx_hpc {/* This indicates two different steps. */ /* In SWAW_STEP_PEAK, driver needs to switch antenna and listen to -* the signal on the air. */ +* the signal on the air. +*/ /* In SWAW_STEP_DETERMINE, driver just compares the signal captured in * SWAW_STEP_PEAK with original RSSI to determine if it is necessary to -* switch antenna. */ +* switch antenna. +*/ #define SWAW_STEP_PEAK 0#define SWAW_STEP_DETERMINE 1
@@ -265,7 +268,8 @@ struct odm_phy_status_info {s8 RxPower;/* in dBm Translate from PWdB */ s8 RecvSignalPower;/* Real power in dBm for this packet, no * beautification and aggregation. Keep this raw -* info to be used for the other procedures. */ +* info to be used for the other procedures. +*/ u8 BTRxRSSIPercentage;u8 SignalStrength;/* in 0-100 index. */ u8 RxPwr[MAX_PATH_NUM_92CS ];/* per-path's pwdb */
@@ -567,7 +571,8 @@ struct odm_ra_info {u8 PTPreRssi;/* if RSSI change 5% do PT */ u8 PTModeSS;/* decide whitch rate should do PT */ u8 RAstage;/* StageRA, decide how many times RA will be done -* between PT */ +* between PT +*/ u8 PTSmoothFactor; };
@@ -587,12 +592,14 @@ struct odm_rf_cal {u8 TXPowercount;bool bTXPowerTracking;u8 TxPowerTrackControl;/* for mp mode, turn off txpwrtracking -* as default */ +* as default +*/ u8 TM_Trigger;u8 InternalPA5G[2 ];/* pathA / pathB */ u8 ThermalMeter[2 ];/* ThermalMeter, index 0 for RFIC0, -* and 1 for RFIC1 */ +* and 1 for RFIC1 +*/ u8 ThermalValue;u8 ThermalValue_LCK;u8 ThermalValue_IQK;
@@ -714,7 +721,8 @@ struct odm_dm_struct {/* ODM PCIE/USB/SDIO/GSPI = 0/1/2/3 */ u8 SupportInterface;/* ODM composite or independent. Bit oriented/ 92C+92D+ .... or any -* other type = 1/2/3/... */ +* other type = 1/2/3/... +*/ u32 SupportICType;/* Cut Version TestChip/A-cut/B-cut... = 0/1/2/3/... */ u8 CutVersion;
@@ -788,19 +796,21 @@ struct odm_dm_struct {bool bBtHsOperation;/* BT HS mode is under progress */ u8 btHsDigVal;/* use BT rssi to decide the DIG value */ bool bBtDisableEdcaTurbo;/* Under some condition, don't enable the -* EDCA Turbo */ +* EDCA Turbo +*/ bool bBtBusy;/* BT is busy. */ /* CALL BY VALUE------------- */ /* 2 Define STA info. */ /* _ODM_STA_INFO */ -/* For MP, we need to reduce one array pointer for default port.?? */ +/* For MP, we need to reduce one array pointer for default port.??*/ struct sta_info *pODM_StaInfo[ODM_ASSOCIATE_ENTRY_NUM ];u16 CurrminRptTime;struct odm_ra_info RAInfo[ODM_ASSOCIATE_ENTRY_NUM ];/* Use MacID as -* array index. STA MacID=0, -* VWiFi Client MacID={1, ODM_ASSOCIATE_ENTRY_NUM-1} */ +* array index. STA MacID=0, +* VWiFi Client MacID={1, ODM_ASSOCIATE_ENTRY_NUM-1} +*/ /* */ /* 2012/02/14 MH Add to share 88E ra with other SW team. */ /* We need to colelct all support abilit to a proper area. */
@@ -1029,9 +1039,11 @@ extern u8 CCKSwingTable_Ch14[CCK_TABLE_SIZE][8];/* 20100514 Joseph: Add definition for antenna switching test after link. */ /* This indicates two different the steps. */ /* In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the -* signal on the air. */ +* signal on the air. +*/ /* In SWAW_STEP_DETERMINE, driver just compares the signal captured in -* SWAW_STEP_PEAK */ +* SWAW_STEP_PEAK +*/ /* with original RSSI to determine if it is necessary to switch antenna. */ #define SWAW_STEP_PEAK 0#define SWAW_STEP_DETERMINE 1
drivers/staging/rtl8188eu/include/pwrseq.h +22 -22
50 lines not on this page · raw message
drivers/staging/rtl8188eu/include/rtl8188e_hal.h +14 -7
@@ -81,7 +81,8 @@ enum usb_rx_agg_mode {#define MAX_RX_DMA_BUFFER_SIZE_88E \ 0x2400/* 9k for 88E nornal chip , MaxRxBuff=10k-max(TxReportSize(64*8), -* WOLPattern(16*24)) */ +* WOLPattern(16*24)) +*/ #define MAX_TX_REPORT_BUFFER_SIZE 0x0400/* 1k */
@@ -94,11 +95,13 @@ enum usb_rx_agg_mode {#define TX_SELE_NQ BIT(2)/* Normal Queue */ /* Note: We will divide number of page equally for each queue other -* than public queue! */ +* than public queue! +*/ /* 22k = 22528 bytes = 176 pages (@page = 128 bytes) */ /* must reserved about 7 pages for LPS => 176-7 = 169 (0xA9) */ /* 2*BCN / 1*ps-poll / 1*null-data /1*prob_rsp /1*QOS null-data /1*BT QOS -* null-data */ +* null-data +*/ #define TX_TOTAL_PAGE_NUMBER_88E 0xA9/* 169 (21632=> 21k) */
@@ -168,7 +171,8 @@ struct txpowerinfo24g {#define AVAILABLE_EFUSE_ADDR_88E (addr) \ (addr < EFUSE_REAL_CONTENT_LEN_88E)/* To prevent out of boundary programming case, leave 1byte and program -* full section */ +* full section +*/ /* 9bytes + 1byt + 5bytes and pre 1byte. */ /* For worst case: */ /* | 2byte|----8bytes----|1byte|--7bytes--| 92D */
@@ -293,7 +297,8 @@ struct hal_data_8188e {u8 bDumpRxPkt;/* for debug */ u8 bDumpTxPkt;/* for debug */ u8 FwRsvdPageStartOffset;/* Reserve page start offset except -* beacon in TxQ. */ +* beacon in TxQ. +*/ /* 2010/08/09 MH Add CU power down mode. */ bool pwrdown;
@@ -307,7 +312,8 @@ struct hal_data_8188e {u16 EfuseUsedBytes;/* Auto FSM to Turn On, include clock, isolation, power control -* for MAC only */ +* for MAC only +*/ u8 bMacPwrCtrlOn;u32 UsbBulkOutSize;
@@ -324,7 +330,8 @@ struct hal_data_8188e {enum usb_rx_agg_mode UsbRxAggMode;u8 UsbRxAggBlockCount;/* USB Block count. Block size is * 512-byte in high speed and 64-byte -* in full speed */ +* in full speed +*/ u8 UsbRxAggBlockTimeout;u8 UsbRxAggPageCount;/* 8192C DMA page count */ u8 UsbRxAggPageTimeout;
drivers/staging/rtl8188eu/include/rtl8188e_spec.h +65 -52
181 lines not on this page · raw message
drivers/staging/rtl8188eu/include/rtw_cmd.h +113 -109
277 lines not on this page · raw message
drivers/staging/rtl8188eu/include/rtw_eeprom.h +6 -3
@@ -55,7 +55,8 @@/* This variable is initiailzed through EEPROM or registry, */ /* however, its definition may be different with that in EEPROM for */ /* EEPROM size consideration. So, we have to perform proper translation -* between them. */ +* between them. +*/ /* Besides, CustomerID of registry has precedence of that of EEPROM. */ /* defined below. 060703, by rcnjko. */ enum RT_CUSTOMER_ID {
@@ -79,7 +80,8 @@ enum RT_CUSTOMER_ID { RT_CID_819x_Sitecom =17 ,RT_CID_CCX =18 ,/* It's set under CCX logo test and isn't demanded * for CCX functions, but for test behavior like retry -* limit and tx report. By Bruce, 2009-02-17. */ +* limit and tx report. By Bruce, 2009-02-17. +*/ RT_CID_819x_Lenovo =19 , RT_CID_819x_QMI =20 , RT_CID_819x_Edimax_Belkin = 21,
@@ -89,7 +91,8 @@ enum RT_CUSTOMER_ID { RT_CID_819x_Acer =25 , RT_CID_819x_AzWave_ASUS =26 , RT_CID_819x_AzWave =27 ,/* For AzWave in PCIe,i -* The ID is AzWave use and not only Asus */ +* The ID is AzWave use and not only Asus +*/ RT_CID_819x_HP =28 , RT_CID_819x_WNC_COREGA =29 , RT_CID_819x_Arcadyan_Belkin = 30,
drivers/staging/rtl8188eu/include/rtw_event.h +20 -20
@@ -22,42 +22,42 @@#include <linux/sem.h> /* -Used to report a bss has been scanned -*/ +* Used to report a bss has been scanned +*/ struct survey_event {struct wlan_bssid_ex bss; };/* -Used to report that the requested site survey has been done. - -bss_cnt indicates the number of bss that has been reported. - - -*/ +* Used to report that the requested site survey has been done. +* +* bss_cnt indicates the number of bss that has been reported. +* +* +*/ struct surveydone_event {unsigned int bss_cnt; };/* -Used to report the link result of joinning the given bss - - -join_res: --1: authentication fail --2: association fail -> 0: TID - -*/ +* Used to report the link result of joinning the given bss +* +* +* join_res: +* -1: authentication fail +* -2: association fail +* > 0: TID +* +*/ struct joinbss_event {struct wlan_network network; };/* -Used to report a given STA has joinned the created BSS. -It is used in AP/Ad-HoC(M) mode. -*/ +* Used to report a given STA has joinned the created BSS. +* It is used in AP/Ad-HoC(M) mode. +*/ struct stassoc_event {unsigned char macaddr[6 ];
drivers/staging/rtl8188eu/include/rtw_led.h +4 -2
@@ -58,7 +58,8 @@ struct LED_871x {enum LED_STATE_871x CurrLedState;/* Current LED state. */ enum LED_STATE_871x BlinkingLedState;/* Next state for blinking, -* either RTW_LED_ON or RTW_LED_OFF are. */ +* either RTW_LED_ON or RTW_LED_OFF are. +*/ u8 bLedOn;/* true if LED is ON, false if LED is OFF. */
@@ -75,7 +76,8 @@ struct LED_871x {u8 bLedLinkBlinkInProgress;u8 bLedScanBlinkInProgress;struct work_struct BlinkWorkItem;/* Workitem used by BlinkTimer to -* manipulate H/W to blink LED. */ +* manipulate H/W to blink LED. +*/ };#define IS_LED_WPS_BLINKING (_LED_871x) \
drivers/staging/rtl8188eu/include/rtw_mlme.h +22 -16
@@ -70,25 +70,28 @@ enum rt_scan_type {enum SCAN_RESULT_TYPE {SCAN_RESULT_P2P_ONLY =0 ,/* Will return all the P2P devices. */ SCAN_RESULT_ALL =1 ,/* Will return all the scanned device, -* include AP. */ +* include AP. +*/ SCAN_RESULT_WFD_TYPE =2 /* Will just return the correct WFD -* device. */ +* device. +*/ /* If this device is Miracast sink * device, it will just return all the -* Miracast source devices. */ +* Miracast source devices. +*/ };/* -there are several "locks" in mlme_priv, -since mlme_priv is a shared resource between many threads, -like ISR/Call-Back functions, the OID handlers, and even timer functions. - -Each _queue has its own locks, already. -Other items are protected by mlme_priv.lock. - -To avoid possible dead lock, any thread trying to modifiying mlme_priv -SHALL not lock up more than one lock at a time! -*/ +* there are several "locks" in mlme_priv, +* since mlme_priv is a shared resource between many threads, +* like ISR/Call-Back functions, the OID handlers, and even timer functions. +* +* Each _queue has its own locks, already. +* Other items are protected by mlme_priv.lock. +* +* To avoid possible dead lock, any thread trying to modifiying mlme_priv +* SHALL not lock up more than one lock at a time! +*/ #define traffic_threshold 10#define traffic_scan_period 500
@@ -102,9 +105,11 @@ struct rt_link_detect {bool bRxBusyTraffic;bool bHigherBusyTraffic;/* For interrupt migration purpose. */ bool bHigherBusyRxTraffic;/* We may disable Tx interrupt according -* to Rx traffic. */ +* to Rx traffic. +*/ bool bHigherBusyTxTraffic;/* We may disable Tx interrupt according -* to Tx traffic. */ +* to Tx traffic. +*/ };struct mlme_priv {
@@ -164,7 +169,8 @@ struct mlme_priv {#if defined(CONFIG_88EU_AP_MODE )/* Number of associated Non-ERP stations (i.e., stations using 802.11b -* in 802.11g BSS) */ +* in 802.11g BSS) +*/ int num_sta_non_erp;/* Number of associated stations that do not support Short Slot Time */
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +18 -9
@@ -101,9 +101,11 @@ extern unsigned char WMM_PARA_OUI[];/* Channel Plan Type. */ /* Note: */ /* We just add new channel plan when the new channel plan is different -* from any of the following channel plan. */ +* from any of the following channel plan. +*/ /* If you just want to customize the actions(scan period or join actions) -* about one of the channel plan, */ +* about one of the channel plan, +*/ /* customize them in struct rt_channel_info in the RT_CHANNEL_LIST. */ enum RT_CHANNEL_DOMAIN {/* old channel plan mapping ===== */
@@ -319,7 +321,8 @@ struct mlme_ext_info {u32 authModeToggle;u32 enc_algo;/* encrypt algorithm; */ u32 key_index;/* this is only valid for legacy wep, -* 0~3 for key id. */ +* 0~3 for key id. +*/ u32 iv;u8 chg_txt[128 ];u16 aid;
@@ -353,16 +356,19 @@ struct mlme_ext_info {struct HT_info_element HT_info;struct wlan_bssid_ex network;/* join network or bss_network, * if in ap mode, it is the same -* as cur_network.network */ +* as cur_network.network +*/ struct FW_Sta_Info FW_sta_info[NUM_STA ]; };/* The channel information about this channel including joining, -* scanning, and power constraints. */ +* scanning, and power constraints. +*/ struct rt_channel_info {u8 ChannelNum;/* The channel number. */ enum rt_scan_type ScanType;/* Scan type such as passive -* or active scan. */ +* or active scan. +*/ u32 rx_count; };
@@ -413,7 +419,8 @@ struct mlme_ext_priv {unsigned char cur_wireless_mode;/* NETWORK_TYPE */ unsigned char oper_channel;/* saved chan info when call -* set_channel_bw */ +* set_channel_bw +*/ unsigned char oper_bwmode;unsigned char oper_ch_offset;/* PRIME_CHNL_OFFSET */
@@ -427,7 +434,8 @@ struct mlme_ext_priv {struct mlme_ext_info mlmext_info;/* for sta/adhoc mode, including * current scan/connecting/connected * related info. For ap mode, -* network includes ap's cap_info*/ +* network includes ap's cap_info +*/ struct timer_list survey_timer;struct timer_list link_timer;u16 chan_scan_time;
@@ -690,7 +698,8 @@ enum rtw_c2h_event { _C2HBCN_EVT_, _ReportPwrState_EVT_,/* filen: only for PCIE, USB */ _CloseRF_EVT_,/* filen: only for PCIE, -* work around ASPM */ +* work around ASPM +*/ MAX_C2HEVT };
drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h +13 -6
@@ -521,14 +521,16 @@#define bCCKRxPhase 0x4#if (RTL92SE_FPGA_VERIFY ==1 )#define bLSSIReadAddress 0x3f000000/* LSSI "Read" Address -Reg 0x824 rFPGA0_XA_HSSIParameter2 */ +* Reg 0x824 rFPGA0_XA_HSSIParameter2 +*/ #else #define bLSSIReadAddress 0x7f800000/* T65 RF */ #endif #define bLSSIReadEdge 0x80000000/* LSSI "Read" edge signal */ #if (RTL92SE_FPGA_VERIFY ==1 )#define bLSSIReadBackData 0xfff/* Reg 0x8a0 -rFPGA0_XA_LSSIReadBack */ +* rFPGA0_XA_LSSIReadBack +*/ #else #define bLSSIReadBackData 0xfffff/* T65 RF */ #endif
@@ -548,13 +550,16 @@#define bDA6Swing 0x380000#define bADClkPhase 0x4000000/* Reg 0x880 -rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ */ +* rFPGA0_AnalogParameter1 20/40 CCK +* support switch 40/80 BB MHZ +*/ #define b80MClkDelay 0x18000000/* Useless */ #define bAFEWatchDogEnable 0x20000000#define bXtalCap01 0xc0000000/* Reg 0x884 -rFPGA0_AnalogParameter2 Crystal cap */ +* rFPGA0_AnalogParameter2 Crystal cap +*/ #define bXtalCap23 0x3#define bXtalCap92x 0x0f000000#define bXtalCap 0x0f000000
@@ -598,7 +603,8 @@#define bCCKTxOn 0x1#define bOFDMTxOn 0x2#define bDebugPage 0xfff/* reset debug page and HWord, -* LWord */ +* LWord +*/ #define bDebugItem 0xff/* reset debug page and LWord */ #define bAntL 0x10#define bAntNonHT 0x100
@@ -1071,7 +1077,8 @@#define RCR_EnCS1 BIT(29)/* enable carrier sense method 1 */ #define RCR_EnCS2 BIT(30)/* enable carrier sense method 2 */ #define RCR_OnlyErlPkt BIT(31)/* Rx Early mode is performed for -* packet size greater than 1536 */ +* packet size greater than 1536 +*/ /*--------------------------Define Parameters-------------------------------*/
drivers/staging/rtl8188eu/include/rtw_pwrctrl.h +13 -9
@@ -51,11 +51,11 @@ enum power_mgnt { };/* -BIT[2:0] = HW state -BIT[3] = Protocol PS state, 0: register active state, -1: register sleep state -BIT[4] = sub-state -*/ +* BIT[2:0] = HW state +* BIT[3] = Protocol PS state, 0: register active state, +* 1: register sleep state +* BIT[4] = sub-state +*/ #define PS_DPS BIT(0)#define PS_LCLK (PS_DPS)
@@ -115,9 +115,11 @@ enum rt_rf_power_state {#define RT_RF_OFF_LEVL_FREE_FW BIT(4)/* FW free, re-download the FW*/ #define RT_RF_OFF_LEVL_FW_32K BIT(5)/* FW in 32k */ #define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT(6)/* Always enable ASPM and Clock -* Req in initialization. */ +* Req in initialization. +*/ #define RT_RF_LPS_DISALBE_2R BIT(30)/* When LPS is on, disable 2R -* if no packet is RX or TX. */ +* if no packet is RX or TX. +*/ #define RT_RF_LPS_LEVEL_ASPM BIT(31)/* LPS with ASPM */ #define RT_IN_PS_LEVEL (ppsc, _PS_FLAG) \
@@ -145,7 +147,8 @@ struct pwrctrl_priv {struct mutex mutex_lock;volatile u8 rpwm;/* requested power state for fw */ volatile u8 cpwm;/* fw current power state. updated when -* 1. read from HCPWM 2. driver lowers power level */ +* 1. read from HCPWM 2. driver lowers power level +*/ volatile u8 tog;/* toggling */ volatile u8 cpwm_tog;/* toggling */
@@ -170,7 +173,8 @@ struct pwrctrl_priv {u8 ips_mode;u8 ips_mode_req;/* used to accept the mode setting request, -* will update to ipsmode later */ +* will update to ipsmode later +*/ uint bips_processing;unsigned long ips_deny_time;/* will deny IPS when system time less than this */ u8 ps_processing;/* temp used to mark whether in rtw_ps_processor */
drivers/staging/rtl8188eu/include/rtw_qos.h +2 -1
@@ -19,7 +19,8 @@struct qos_priv {unsigned int qos_option;/* bit mask option: u-apsd, -* s-apsd, ts, block ack... */ +* s-apsd, ts, block ack... +*/ };#endif /* _RTL871X_QOS_H_ */
drivers/staging/rtl8188eu/include/rtw_recv.h +41 -39
110 lines not on this page · raw message
drivers/staging/rtl8188eu/include/rtw_rf.h +4 -2
@@ -31,7 +31,8 @@#define RTL8711_RF_DEF_SENS 4/* We now define the following channels as the max channels in each -* channel plan. */ +* channel plan. +*/ /* 2G, total 14 chnls */ /* {1,2,3,4,5,6,7,8,9,10,11,12,13,14} */ #define MAX_CHANNEL_NUM_2G 14
@@ -65,7 +66,8 @@ enum capability { cChannelAgility =0x0080 , cSpectrumMgnt =0x0100 , cQos =0x0200 ,/* For HCCA, use with CF-Pollable -* and CF-PollReq */ +* and CF-PollReq +*/ cShortSlotTime =0x0400 , cAPSD =0x0800 , cRM = 0x1000, /* RRM (Radio Request Measurement) */
drivers/staging/rtl8188eu/include/rtw_security.h +18 -9
@@ -100,20 +100,26 @@ struct rt_pmkid_list {struct security_priv {u32 dot11AuthAlgrthm;/* 802.11 auth, could be open, -* shared, 8021x and authswitch */ +* shared, 8021x and authswitch +*/ u32 dot11PrivacyAlgrthm;/* This specify the privacy for -* shared auth. algorithm. */ +* shared auth. algorithm. +*/ /* WEP */ u32 dot11PrivacyKeyIndex;/* this is only valid for legendary -* wep, 0~3 for key id.(tx key index) */ +* wep, 0~3 for key id.(tx key index) +*/ union Keytype dot11DefKey[4 ];/* this is only valid for def. key */ u32 dot11DefKeylen[4 ];u32 dot118021XGrpPrivacy;/* This specify the privacy algthm. -* used for Grp key */ +* used for Grp key +*/ u32 dot118021XGrpKeyid;/* key id used for Grp Key -* ( tx key index) */ +* ( tx key index) +*/ union Keytype dot118021XGrpKey[4 ];/* 802.1x Group Key, -* for inx0 and inx1 */ +* for inx0 and inx1 +*/ union Keytype dot118021XGrptxmickey[4 ];union Keytype dot118021XGrprxmickey[4 ];union pn48 dot11Grptxpn;/* PN48 used for Grp Key xmit.*/
@@ -134,10 +140,12 @@ struct security_priv {u8 bcheck_grpkey;u8 bgrpkey_handshake;s32 hw_decrypted;/* if the rx packets is hw_decrypted==false,i -* it means the hw has not been ready. */ +* it means the hw has not been ready. +*/ /* keeps the auth_type & enc_status from upper layer -* ioctl(wpa_supplicant or wzc) */ +* ioctl(wpa_supplicant or wzc) +*/ u32 ndisauthtype;/* NDIS_802_11_AUTHENTICATION_MODE */ u32 ndisencryptstatus;/* NDIS_802_11_ENCRYPTION_STATUS */ struct wlan_bssid_ex sec_bss;/* for joinbss (h2c buffer) usage */
@@ -256,7 +264,8 @@ static inline u32 rotr(u32 val, int bits)/* ===== start - public domain SHA256 implementation ===== */ /* This is based on SHA256 implementation in LibTomCrypt that was released into -* public domain by Tom St Denis. */ +* public domain by Tom St Denis. +*/ /* the K array */ static const unsigned long K [64 ] = {
drivers/staging/rtl8188eu/include/rtw_xmit.h +8 -4
@@ -115,11 +115,13 @@ struct pkt_attrib {u16 seqnum;u16 hdrlen;/* the WLAN Header Len */ u32 pktlen;/* the original 802.3 pkt raw_data len (not include -* ether_hdr data) */ +* ether_hdr data) +*/ u32 last_txcmdsz;u8 nr_frags;u8 encrypt;/* when 0 indicate no encrypt. when non-zero, -* indicate the encrypt algorith */ +* indicate the encrypt algorith +*/ u8 iv_len;u8 icv_len;u8 iv[18 ];
@@ -234,7 +236,8 @@ struct sta_xmit_priv {spinlock_t lock;int option;int apsd_setting;/* When bit mask is on, the associated edca -* queue supports APSD. */ +* queue supports APSD. +*/ struct tx_servq be_q;/* priority == 0,3 */ struct tx_servq bk_q;/* priority == 1,2 */ struct tx_servq vi_q;/* priority == 4,5 */
@@ -280,7 +283,8 @@ struct xmit_priv {u8 hwxmit_entry;u8 wmm_para_seq[4 ];/* sequence for wmm ac parameter strength * from large to small. it's value is 0->vo, -* 1->vi, 2->be, 3->bk. */ +* 1->vi, 2->be, 3->bk. +*/ u8 txirp_cnt;/* */ struct tasklet_struct xmit_tasklet;/* per AC pending irp */
drivers/staging/rtl8188eu/include/sta_info.h +8 -4
@@ -126,7 +126,8 @@ struct sta_info {/* Notes: */ /* STA_Mode: */ /* curr_network(mlme_priv/security_priv/qos/ht) + -* sta_info: (STA & AP) CAP/INFO */ +* sta_info: (STA & AP) CAP/INFO +*/ /* scan_q: AP CAP/INFO */ /* AP_Mode: */
@@ -184,7 +185,8 @@ struct sta_info {/* ================ODM Relative Info======================= */ /* Please be careful, don't declare too much structure here. -* It will cost memory * STA support num. */ +* It will cost memory * STA support num. +*/ /* 2011/10/20 MH Add for ODM STA info. */ /* Driver Write */ u8 bValid;/* record the sta status link or not? */
@@ -318,9 +320,11 @@ struct sta_priv {struct sta_info *sta_aid[NUM_STA ];u16 sta_dz_bitmap;/* only support 15 stations, station aid bitmap -* for sleeping sta. */ +* for sleeping sta. +*/ u16 tim_bitmap;/* only support 15 stations, aid=0~15 mapping -* bit0~bit15 */ +* bit0~bit15 +*/ u16 max_num_sta;
drivers/staging/rtl8188eu/include/wifi.h +14 -11
@@ -35,7 +35,8 @@/* This value is tested by WiFi 11n Test Plan 5.2.3. */ /* This test verifies the WLAN NIC can update the NAV through sending -* the CTS with large duration. */ +* the CTS with large duration. +*/ #define WiFiNavUpperUs 30000/* 30 ms */ enum WIFI_FRAME_TYPE {
@@ -459,14 +460,14 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)#define _IEEE8021X_PSK_ 2/* WPA with pre-shared key */ /* -#define _NO_PRIVACY_ 0 -#define _WEP_40_PRIVACY_ 1 -#define _TKIP_PRIVACY_ 2 -#define _WRAP_PRIVACY_ 3 -#define _CCMP_PRIVACY_ 4 -#define _WEP_104_PRIVACY_ 5 -#define _WEP_WPA_MIXED_PRIVACY_ 6 WEP + WPA -*/ +* #define _NO_PRIVACY_ 0 +* #define _WEP_40_PRIVACY_ 1 +* #define _TKIP_PRIVACY_ 2 +* #define _WRAP_PRIVACY_ 3 +* #define _CCMP_PRIVACY_ 4 +* #define _WEP_104_PRIVACY_ 5 +* #define _WEP_WPA_MIXED_PRIVACY_ 6 WEP + WPA +*/ /*----------------------------------------------------------------------------- Below is the definition for WMM
@@ -771,10 +772,12 @@ enum ht_cap_ampdu_factor {#define P2P_PROVISIONING_SCAN_CNT 3/* default value, used when: (1)p2p disabled or (2)p2p enabled -* but only do 1 scan phase */ +* but only do 1 scan phase +*/ #define P2P_FINDPHASE_EX_NONE 0/* used when p2p enabled and want to do 1 scan phase and -* P2P_FINDPHASE_EX_MAX-1 find phase */ +* P2P_FINDPHASE_EX_MAX-1 find phase +*/ #define P2P_FINDPHASE_EX_FULL 1#define P2P_FINDPHASE_EX_SOCIAL_FIRST (P2P_FINDPHASE_EX_FULL+1)#define P2P_FINDPHASE_EX_MAX 4
drivers/staging/rtl8188eu/include/wlan_bssdef.h +14 -8
@@ -86,7 +86,8 @@ struct ndis_802_11_var_ie {* + NDIS_802_11_LENGTH_RATES_EX + IELength * * Except the IELength, all other fields are fixed length. -* Therefore, we can define a macro to represent the partial sum. */ +* Therefore, we can define a macro to represent the partial sum. +*/ enum ndis_802_11_auth_mode { Ndis802_11AuthModeOpen,
@@ -130,7 +131,8 @@ enum ndis_802_11_reload_def {struct ndis_802_11_wep {u32 Length;/* Length of this structure */ u32 KeyIndex;/* 0 is the per-client key, -* 1-N are the global keys */ +* 1-N are the global keys +*/ u32 KeyLength;/* length of key in bytes */ u8 KeyMaterial[16 ];/* variable len depending on above field */ };
@@ -140,7 +142,8 @@ enum ndis_802_11_status_type { Ndis802_11StatusType_MediaStreamMode, Ndis802_11StatusType_PMKID_CandidateList, Ndis802_11StatusTypeMax/* not a real type, defined as - * an upper bound */ +* an upper bound + */ };/* mask for authentication/integrity fields */
@@ -166,7 +169,8 @@ struct wlan_phy_info {struct wlan_bcn_info {/* these infor get from rtw_get_encrypt_info when -* * translate scan to UI */ +* * translate scan to UI +*/ u8 encryp_protocol;/* ENCRYP_PROTOCOL_E: OPEN/WEP/WPA/WPA2/WAPI */ int group_cipher;/* WPA/WPA2 group cipher */ int pairwise_cipher;/* WPA/WPA2/WEP pairwise cipher */
@@ -178,8 +182,8 @@ struct wlan_bcn_info { };/* temporally add #pragma pack for structure alignment issue of -* struct wlan_bssid_ex and get_struct wlan_bssid_ex_sz() -*/ +* struct wlan_bssid_ex and get_struct wlan_bssid_ex_sz() +*/ struct wlan_bssid_ex {u32 Length;unsigned char MacAddress[ETH_ALEN ];
@@ -194,7 +198,8 @@ struct wlan_bssid_ex {struct wlan_phy_info PhyInfo;u32 IELength;u8 IEs[MAX_IE_SZ ];/* timestamp, beacon interval, and -* capability information) */ +* capability information) +*/ } __packed;static inline uint get_wlan_bssid_ex_sz (struct wlan_bssid_ex *bss)
@@ -206,7 +211,8 @@ struct wlan_network {struct list_head list;int network_type;/* refer to ieee80211.h for WIRELESS_11A/B/G */ int fixed;/* set fixed when not to be removed -* in site-surveying */ +* in site-surveying +*/ unsigned long last_scanned;/* timestamp for the network */ int aid;/* will only be valid when a BSS is joinned. */ int join_res;
Signature · 1 line
2.7.4
PATCH 2/7 staging: rtl8188eu: fix space between function name and '('
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('
--- drivers/staging/rtl8188eu/include/osdep_intf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/include/osdep_intf.h +1 -1
@@ -26,7 +26,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter);u8 rtw_free_drv_sw (struct adapter *padapter);u8 rtw_reset_drv_sw (struct adapter *padapter); -void rtw_stop_drv_threads (struct adapter *padapter); +void rtw_stop_drv_threads (struct adapter *padapter);void rtw_cancel_all_timer (struct adapter *padapter);int rtw_ioctl (struct net_device *dev,struct ifreq *rq,int cmd);
Signature · 1 line
2.7.4
PATCH 3/7 staging: rtl8188eu: use pr_info() instead of printk()
In reply to Aastha GuptaFixes checkpatch.pl warning:
WARNING: printk() should include KERN_ facility level
Replaced printk() without any KERN_facility level with pr_info().
The statements before use pr_info and the new line character is to be
appended to them.
Could have used printk() with KERN_INFO level, but used pr_info() just to use the same function as that had been used before in the code.
--- drivers/staging/rtl8188eu/include/rtw_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/include/rtw_debug.h +2 -2
@@ -106,9 +106,9 @@ extern u32 GlobalDebugLevel; (((__i +1 ) %4 ) ==0 ) ? \ " " : " "); \if (((__i +1 ) %16 ) ==0 ) \ -printk ("\n" ); \ +pr_info ("\n" ); \ } \ -printk ("\n" ); \ +pr_info ("\n" ); \ } \ }while (0 )
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerRe: [PATCH 3/7] staging: rtl8188eu: use pr_info() instead of printk()
Quoted 18 lines · Aastha Gupta
Fixes checkpatch.pl warning:
WARNING:printk()should includeKERN_facility levelReplaced
printk()without anyKERN_facilitylevel withpr_info().
The statements before usepr_infoand the new line character is to be
appended to them.
Could have usedprintk()withKERN_INFOlevel, but usedpr_info()just to use the same function as that had been used before in the code.Signed-off-by Aastha Gupta <[email protected]>--- drivers/staging/rtl8188eu/include/rtw_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8188eu/include/rtw_debug.h +0
-0
drivers/staging/rtl8188eu/include/rtw_debug.h extern u32 GlobalDebugLevel; · line 109
Quoted 5 lines
drivers/staging/rtl8188eu/include/rtw_debug.h +1
-1@@ -106,9 +106,9 @@ extern u32 GlobalDebugLevel; (((__i +1 ) %4 ) ==0 ) ? \ " " : " "); \if (((__i +1 ) %16 ) ==0 ) \ -printk ("\n" ); \ +pr_info ("\n" ); \
No, this isn't doing what you think it is...
It should be a 'pr_cont()', right?
thanks,
greg k-h
Re: [PATCH 3/7] staging: rtl8188eu: use pr_info() instead of printk()
Quoted 27 lines · Greg Kroah-Hartman
Quoted 18 lines · Aastha Gupta
Fixes checkpatch.pl warning:
WARNING:printk()should includeKERN_facility levelReplaced
printk()without anyKERN_facilitylevel withpr_info().
The statements before usepr_infoand the new line character is to be
appended to them.
Could have usedprintk()withKERN_INFOlevel, but usedpr_info()just to use the same function as that had been used before in the code.Signed-off-by Aastha Gupta <[email protected]>--- drivers/staging/rtl8188eu/include/rtw_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8188eu/include/rtw_debug.h +0
-0drivers/staging/rtl8188eu/include/rtw_debug.h extern u32 GlobalDebugLevel; · line 109
Quoted 5 lines
drivers/staging/rtl8188eu/include/rtw_debug.h +1
-1@@ -106,9 +106,9 @@ extern u32 GlobalDebugLevel; (((__i +1 ) %4 ) ==0 ) ? \ " " : " "); \if (((__i +1 ) %16 ) ==0 ) \ -printk ("\n" ); \ +pr_info ("\n" ); \No, this isn't doing what you think it is...
Quoted 5 lines
It should be a '
pr_cont()', right?thanks,
greg k-h
Yes as it is in continuation of the previous pr_info it should be pr_cont. I will make this change and send the patch again.
Aastha
PATCH 4/7 staging: rtl8188eu: fix spaces before tabs
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: please, no space before tabs
--- drivers/staging/rtl8188eu/include/odm.h | 4 ++-- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8188eu/include/odm.h +2 -2
@@ -513,7 +513,7 @@ enum odm_security {ODM_SEC_RESERVE =3 ,ODM_SEC_AESCCMP =4 ,ODM_SEC_WEP104 =5 , -ODM_WEP_WPA_MIXED =6 ,/* WEP + WPA */ +ODM_WEP_WPA_MIXED =6 ,/* WEP + WPA */ ODM_SEC_SMS4 = 7, };
@@ -695,7 +695,7 @@ enum ant_div_type {/* Copy from SD4 defined structure. We use to support PHY DM integration. */ struct odm_dm_struct { -/* Add for different team use temporarily */ +/* Add for different team use temporarily */ struct adapter *Adapter;/* For CE/NIC team */ struct rtl8192cd_priv *priv;/* For AP/ADSL team */ /* WHen you use above pointers, they must be initialized. */
drivers/staging/rtl8188eu/include/rtl8188e_hal.h +4 -4
@@ -42,7 +42,7 @@#define RTL8188E_PHY_REG_PG "rtl8188E\\PHY_REG_PG.txt"#define RTL8188E_PHY_REG_MP "rtl8188E\\PHY_REG_MP.txt" -/* RTL8188E Power Configuration CMDs for USB/SDIO interfaces */ +/* RTL8188E Power Configuration CMDs for USB/SDIO interfaces */ #define Rtl8188E_NIC_PWR_ON_FLOW rtl8188E_power_on_flow#define Rtl8188E_NIC_RF_OFF_FLOW rtl8188E_radio_off_flow#define Rtl8188E_NIC_DISABLE_FLOW rtl8188E_card_disable_flow
@@ -113,7 +113,7 @@ enum usb_rx_agg_mode {#define WMM_NORMAL_TX_PAGE_BOUNDARY_88E \ (WMM_NORMAL_TX_TOTAL_PAGE_NUMBER + 1)/* 0xA9 */ -/* Chip specific */ +/* Chip specific */ #define CHIP_BONDING_IDENTIFIER (_value) (((_value)>>22)&0x3)#define CHIP_BONDING_92C_1T2R 0x1#define CHIP_BONDING_88C_USB_MCARD 0x2
@@ -121,7 +121,7 @@ enum usb_rx_agg_mode {#include "HalVerDef.h" #include "hal_com.h" -/* Channel Plan */ +/* Channel Plan */ enum ChannelPlan {CHPL_FCC =0 ,CHPL_IC =1 ,
@@ -180,7 +180,7 @@ struct txpowerinfo24g {#define EFUSE_OOB_PROTECT_BYTES_88E 18#define EFUSE_PROTECT_BYTES_BANK_88E 16 -/* EFUSE for BT definition */ +/* EFUSE for BT definition */ #define EFUSE_BT_REAL_CONTENT_LEN 1536/* 512*3 */ #define EFUSE_BT_MAP_LEN 1024/* 1k bytes */ #define EFUSE_BT_MAX_SECTION 128/* 1024/8 */
Signature · 1 line
2.7.4
PATCH 5/7 staging: rtl8188eu: add spaces around algebric and boolean operators
In reply to Aastha GuptaThis patch fixes checkpatch.pl warnings about preferring spaces around algebric and boolean operators.
--- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/staging/rtl8188eu/include/rtl8188e_spec.h +18 -18
@@ -123,9 +123,9 @@#define REG_FWISR 0x0134#define REG_PKTBUF_DBG_CTRL 0x0140#define REG_PKTBUF_DBG_ADDR (REG_PKTBUF_DBG_CTRL) -#define REG_RXPKTBUF_DBG (REG_PKTBUF_DBG_CTRL+2) -#define REG_TXPKTBUF_DBG (REG_PKTBUF_DBG_CTRL+3) -#define REG_RXPKTBUF_CTRL (REG_PKTBUF_DBG_CTRL+2) +#define REG_RXPKTBUF_DBG (REG_PKTBUF_DBG_CTRL + 2) +#define REG_TXPKTBUF_DBG (REG_PKTBUF_DBG_CTRL + 3) +#define REG_RXPKTBUF_CTRL (REG_PKTBUF_DBG_CTRL + 2)#define REG_PKTBUF_DBG_DATA_L 0x0144#define REG_PKTBUF_DBG_DATA_H 0x0148
@@ -461,12 +461,12 @@/* GPIO pins input value */ #define GPIO_IN REG_GPIO_PIN_CTRL/* GPIO pins output value */ -#define GPIO_OUT (REG_GPIO_PIN_CTRL+1) +#define GPIO_OUT (REG_GPIO_PIN_CTRL + 1)/* GPIO pins output enable when a bit is set to "1"; otherwise, * input is configured. */ -#define GPIO_IO_SEL (REG_GPIO_PIN_CTRL+2) -#define GPIO_MOD (REG_GPIO_PIN_CTRL+3) +#define GPIO_IO_SEL (REG_GPIO_PIN_CTRL + 2) +#define GPIO_MOD (REG_GPIO_PIN_CTRL + 3)/* 8723/8188E Host System Interrupt Mask Register (offset 0x58, 32 byte) */ #define HSIMR_GPIO12_0_INT_EN BIT(0)
@@ -809,7 +809,7 @@ So the following defines for 92C is not entire!!!!!!/* 2 EFUSE_TEST (For RTL8723 partially) */ #define EF_TRPT BIT(7)/* 00: Wifi Efuse, 01: BT Efuse0, 10: BT Efuse1, 11: BT Efuse2 */ -#define EF_CELL_SEL (BIT(8)|BIT(9)) +#define EF_CELL_SEL (BIT(8) | BIT(9))#define LDOE25_EN BIT(31)#define EFUSE_SEL (x) (((x) & 0x3) << 8)#define EFUSE_SEL_MASK 0x300
@@ -846,7 +846,7 @@ So the following defines for 92C is not entire!!!!!!#define BD_MAC2 BIT(9)#define BD_MAC1 BIT(10)#define IC_MACPHY_MODE BIT(11) -#define CHIP_VER (BIT(12)|BIT(13)|BIT(14)|BIT(15)) +#define CHIP_VER (BIT(12) | BIT(13) | BIT(14) | BIT(15))#define BT_FUNC BIT(16)#define VENDOR_ID BIT(19)#define PAD_HWPD_IDN BIT(22)
@@ -860,9 +860,9 @@ So the following defines for 92C is not entire!!!!!!#define CHIP_VER_RTL_SHIFT 12/* 2REG_GPIO_OUTSTS (For RTL8723 only) */ -#define EFS_HCI_SEL (BIT(0)|BIT(1)) -#define PAD_HCI_SEL (BIT(2)|BIT(3)) -#define HCI_SEL (BIT(4)|BIT(5)) +#define EFS_HCI_SEL (BIT(0) | BIT(1)) +#define PAD_HCI_SEL (BIT(2) | BIT(3)) +#define HCI_SEL (BIT(4) | BIT(5))#define PKG_SEL_HCI BIT(6)#define FEN_GPS BIT(7)#define FEN_BT BIT(8)
@@ -879,7 +879,7 @@ So the following defines for 92C is not entire!!!!!!#define UPHY_SUSB BIT(21)#define PCI_SUSEN BIT(22)#define USB_SUSEN BIT(23) -#define RF_RL_ID (BIT(31)|BIT(30)|BIT(29)|BIT(28)) +#define RF_RL_ID (BIT(31) | BIT(30) | BIT(29) | BIT(28))/* 2SYS_CFG */ #define RTL_ID BIT(23)/* TestChip ID, 1:Test(RLE); 0:MP(RL) */
@@ -942,12 +942,12 @@ So the following defines for 92C is not entire!!!!!!#define HQSEL_HIQ BIT(5)/* For normal driver, 0x10C */ -#define _TXDMA_HIQ_MAP (x) (((x)&0x3) << 14) -#define _TXDMA_MGQ_MAP (x) (((x)&0x3) << 12) -#define _TXDMA_BKQ_MAP (x) (((x)&0x3) << 10) -#define _TXDMA_BEQ_MAP (x) (((x)&0x3) << 8) -#define _TXDMA_VIQ_MAP (x) (((x)&0x3) << 6) -#define _TXDMA_VOQ_MAP (x) (((x)&0x3) << 4) +#define _TXDMA_HIQ_MAP (x) (((x) & 0x3) << 14) +#define _TXDMA_MGQ_MAP (x) (((x) & 0x3) << 12) +#define _TXDMA_BKQ_MAP (x) (((x) & 0x3) << 10) +#define _TXDMA_BEQ_MAP (x) (((x) & 0x3) << 8) +#define _TXDMA_VIQ_MAP (x) (((x) & 0x3) << 6) +#define _TXDMA_VOQ_MAP (x) (((x) & 0x3) << 4)#define QUEUE_LOW 1#define QUEUE_NORMAL 2
Signature · 1 line
2.7.4
PATCH 6/7 staging: rtl8188eu: prefer using BIT macro
In reply to Aastha GuptaFixes checkpatch.pl:
Use BIT(x) instead of using (1<<x)
--- drivers/staging/rtl8188eu/include/ieee80211.h | 78 +++++++++++++-------------- 1 file changed, 39 insertions(+), 39 deletions(-)
drivers/staging/rtl8188eu/include/ieee80211.h +39 -39
@@ -359,11 +359,11 @@ struct ieee80211_snap_hdr {#define IEEE80211_DATA_HDR3_LEN 24#define IEEE80211_DATA_HDR4_LEN 30 -#define IEEE80211_CCK_MODULATION (1<<0) -#define IEEE80211_OFDM_MODULATION (1<<1) +#define IEEE80211_CCK_MODULATION BIT(0) +#define IEEE80211_OFDM_MODULATION BIT(1) -#define IEEE80211_24GHZ_BAND (1<<0) -#define IEEE80211_52GHZ_BAND (1<<1) +#define IEEE80211_24GHZ_BAND BIT(0) +#define IEEE80211_52GHZ_BAND BIT(1)#define IEEE80211_CCK_RATE_LEN 4#define IEEE80211_NUM_OFDM_RATESLEN 8
@@ -384,18 +384,18 @@ struct ieee80211_snap_hdr {#define IEEE80211_OFDM_RATE_54MB 0x6C#define IEEE80211_BASIC_RATE_MASK 0x80 -#define IEEE80211_CCK_RATE_1MB_MASK (1<<0) -#define IEEE80211_CCK_RATE_2MB_MASK (1<<1) -#define IEEE80211_CCK_RATE_5MB_MASK (1<<2) -#define IEEE80211_CCK_RATE_11MB_MASK (1<<3) -#define IEEE80211_OFDM_RATE_6MB_MASK (1<<4) -#define IEEE80211_OFDM_RATE_9MB_MASK (1<<5) -#define IEEE80211_OFDM_RATE_12MB_MASK (1<<6) -#define IEEE80211_OFDM_RATE_18MB_MASK (1<<7) -#define IEEE80211_OFDM_RATE_24MB_MASK (1<<8) -#define IEEE80211_OFDM_RATE_36MB_MASK (1<<9) -#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10) -#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11) +#define IEEE80211_CCK_RATE_11MB_MASK BIT(0) +#define IEEE80211_CCK_RATE_2MB_MASK BIT(1) +#define IEEE80211_CCK_RATE_5MB_MASK BIT(2) +#define IEEE80211_CCK_RATE_11MB_MASK BIT(3) +#define IEEE80211_OFDM_RATE_6MB_MASK BIT(4) +#define IEEE80211_OFDM_RATE_9MB_MASK BIT(5) +#define IEEE80211_OFDM_RATE_12MB_MASK BIT(6) +#define IEEE80211_OFDM_RATE_18MB_MASK BIT(7) +#define IEEE80211_OFDM_RATE_24MB_MASK BIT(8) +#define IEEE80211_OFDM_RATE_36MB_MASK BIT(9) +#define IEEE80211_OFDM_RATE_48MB_MASK BIT(10) +#define IEEE80211_OFDM_RATE_54MB_MASK BIT(11)#define IEEE80211_CCK_RATES_MASK 0x0000000F#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \
@@ -428,15 +428,15 @@ struct ieee80211_snap_hdr {*/ #define IEEE80211_FRAG_CACHE_LEN 4 -#define SEC_KEY_1 (1<<0) -#define SEC_KEY_2 (1<<1) -#define SEC_KEY_3 (1<<2) -#define SEC_KEY_4 (1<<3) -#define SEC_ACTIVE_KEY (1<<4) -#define SEC_AUTH_MODE (1<<5) -#define SEC_UNICAST_GROUP (1<<6) -#define SEC_LEVEL (1<<7) -#define SEC_ENABLED (1<<8) +#define SEC_KEY_1 BIT(0) +#define SEC_KEY_2 BIT(1) +#define SEC_KEY_3 BIT(2) +#define SEC_KEY_4 BIT(3) +#define SEC_ACTIVE_KEY BIT(4) +#define SEC_AUTH_MODE BIT(5) +#define SEC_UNICAST_GROUP BIT(6) +#define SEC_LEVEL BIT(7) +#define SEC_ENABLED BIT(8)#define SEC_LEVEL_0 0/* None */ #define SEC_LEVEL_1 1/* WEP 40 and 104 bit */
@@ -470,9 +470,9 @@ struct ieee80211_snap_hdr {#define MAX_P2P_IE_LEN (256)#define MAX_WFD_IE_LEN (128) -#define NETWORK_EMPTY_ESSID (1<<0) -#define NETWORK_HAS_OFDM (1<<1) -#define NETWORK_HAS_CCK (1<<2) +#define NETWORK_EMPTY_ESSID BIT(0) +#define NETWORK_HAS_OFDM BIT(1) +#define NETWORK_HAS_CCK BIT(2)#define IW_ESSID_MAX_SIZE 32/*
@@ -534,14 +534,14 @@ static inline int is_broadcast_mac_addr(const u8 *addr) (addr[3 ] ==0xff ) && (addr[4 ] ==0xff ) && (addr[5 ] ==0xff ); } -#define CFG_IEEE80211_RESERVE_FCS (1<<0) -#define CFG_IEEE80211_COMPUTE_FCS (1<<1) +#define CFG_IEEE80211_RESERVE_FCS BIT(0) +#define CFG_IEEE80211_COMPUTE_FCS BIT(1)#define MAXTID 16 -#define IEEE_A (1<<0) -#define IEEE_B (1<<1) -#define IEEE_G (1<<2) +#define IEEE_A BIT(0) +#define IEEE_B BIT(1) +#define IEEE_G BIT(2)#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)/* Action category code */
@@ -659,12 +659,12 @@ enum rtw_ieee80211_back_parties {* is not permitted. */ enum rtw_ieee80211_channel_flags { -RTW_IEEE80211_CHAN_DISABLED =1 <<0 , -RTW_IEEE80211_CHAN_PASSIVE_SCAN =1 <<1 , -RTW_IEEE80211_CHAN_NO_IBSS =1 <<2 , -RTW_IEEE80211_CHAN_RADAR =1 <<3 , -RTW_IEEE80211_CHAN_NO_HT40PLUS =1 <<4 , -RTW_IEEE80211_CHAN_NO_HT40MINUS =1 <<5 , +RTW_IEEE80211_CHAN_DISABLED =BIT (0 ), +RTW_IEEE80211_CHAN_PASSIVE_SCAN =BIT (1 ), +RTW_IEEE80211_CHAN_NO_IBSS =BIT (2 ), +RTW_IEEE80211_CHAN_RADAR =BIT (3 ), +RTW_IEEE80211_CHAN_NO_HT40PLUS =BIT (4 ), +RTW_IEEE80211_CHAN_NO_HT40MINUS =BIT (5 ), };#define RTW_IEEE80211_CHAN_NO_HT40 \
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerRe: [PATCH 6/7] staging: rtl8188eu: prefer using BIT macro
Quoted 7 lines · Aastha Gupta
Fixes checkpatch.pl:
Use BIT(x) instead of using (1<<x)Signed-off-by Aastha Gupta <[email protected]>--- drivers/staging/rtl8188eu/include/ieee80211.h | 78 +++++++++++++-------------- 1 file changed, 39 insertions(+), 39 deletions(-)
This patch causes all sorts of build warning errors, dso I've dropped it from my trees.
Please always test build your patches :(
greg k-h
Re: [PATCH 6/7] staging: rtl8188eu: prefer using BIT macro
Quoted 9 lines · Greg Kroah-Hartman
Quoted 7 lines · Aastha Gupta
Fixes checkpatch.pl:
Use BIT(x) instead of using (1<<x)Signed-off-by Aastha Gupta <[email protected]>--- drivers/staging/rtl8188eu/include/ieee80211.h | 78 +++++++++++++-------------- 1 file changed, 39 insertions(+), 39 deletions(-)
Quoted 6 lines
This patch causes all sorts of build warning errors, dso I've dropped it from my trees.
Please always test build your patches :(
greg k-h
I am sure that I did check all the patches (including compilation) before sending it for review. But as you are saying, I will do a clean build again on remote branch copy and find out what is wrong. I am really sorry for all the trouble. Please give me couple of hours to fix this. I will make sure that this won't happen from now onward.
PATCH 7/7 staging: rtl8188eu: add spaces around '|'
In reply to Aastha GuptaFixes 'use spaces around '|' ' as reported by checkpatch.pl
--- drivers/staging/rtl8188eu/include/ieee80211.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/include/ieee80211.h +3 -3
@@ -202,9 +202,9 @@ enum NETWORK_TYPE {#define IsSupportedTxCCK (NetType) \ ((NetType) & (WIRELESS_11B) ? true : false)#define IsSupportedTxOFDM (NetType) \ - ((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false) + ((NetType) & (WIRELESS_11G | WIRELESS_11A) ? true : false)#define IsSupportedTxMCS (NetType) \ - ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false) + ((NetType) & (WIRELESS_11_24N | WIRELESS_11_5N) ? true : false)struct ieee_param {
@@ -542,7 +542,7 @@ static inline int is_broadcast_mac_addr(const u8 *addr)#define IEEE_A BIT(0)#define IEEE_B BIT(1)#define IEEE_G BIT(2) -#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G) +#define IEEE_MODE_MASK (IEEE_A | IEEE_B | IEEE_G)/* Action category code */ enum rtw_ieee80211_category {
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerRe: [PATCH 7/7] staging: rtl8188eu: add spaces around '|'
Quoted 6 lines · Aastha Gupta
Fixes 'use spaces around '|' ' as reported by checkpatch.pl
Signed-off-by Aastha Gupta <[email protected]>--- drivers/staging/rtl8188eu/include/ieee80211.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
This patch no longer applies as I had to drop the previous one :(