Staging: winbond: Fixed some coding style issues
cover Staging: winbond: Fixed some coding style issues
Fixes some coding style issues from drivers/staging/winbond
Iker Pedrosa (24):
Staging: winbond: mto: removed function declaration
Staging: winbond: mto: avoided use of extern functions
Staging: winbond: mto: deleted extern functions
Staging: winbond: phy_calibration: fixed some lines over 80 characters
Staging: winbond: phy_calibration: fixed some lines over 80 characters
Staging: winbond: reg: erased trailing whitespace
Staging: winbond: reg: white space deleted
Staging: winbond: reg: changed sleep function from msleep to usleep
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: reg: fixed some lines over 80 characters
Staging: winbond: wb35reg_f: fixed lines over 80 characters
Staging: winbond: wb35reg_s: deleted space before tabulation
Staging: winbond: wb35rx: changed sleep function from msleep to usleep
Staging: winbond: wb35rx: fixed some lines over 80 characters
Staging: winbond: wb35tx: changed sleep function from msleep to usleep
Staging: winbond: wb35tx: Replace printk with netdev_err
Staging: winbond: wb35tx_s: erased the spaces after opening a '['
Staging: winbond: wbusb: fixed some lines over 80 characters
Staging: winbond: wbusb: changed sleep function from msleep to usleep
drivers/staging/winbond/mto.c | 7 +- drivers/staging/winbond/mto.h | 8 +- drivers/staging/winbond/phy_calibration.c | 58 ++++--- drivers/staging/winbond/reg.c | 274 ++++++++++++++++++------------ drivers/staging/winbond/wb35reg_f.h | 18 +- drivers/staging/winbond/wb35reg_s.h | 2 +- drivers/staging/winbond/wb35rx.c | 11 +- drivers/staging/winbond/wb35tx.c | 12 +- drivers/staging/winbond/wb35tx_s.h | 2 +- drivers/staging/winbond/wbusb.c | 18 +- 10 files changed, 245 insertions(+), 165 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/24 Staging: winbond: mto: removed function declaration
The following function declarations have been removed because they aren't implemented.
--- drivers/staging/winbond/mto.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/winbond/mto.c +0 -3
@@ -46,10 +46,7 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];static u8 boSparseTxTraffic;void MTO_Init (struct wbsoft_priv *adapter); -void TxRateReductionCtrl (struct wbsoft_priv *adapter);void MTO_SetTxCount (struct wbsoft_priv *adapter,u8 t0,u8 index); -void MTO_TxFailed (struct wbsoft_priv *adapter); -void hal_get_dto_para (struct wbsoft_priv *adapter,char *buffer);/* * ===========================================================================
Signature · 1 line
1.8.1.2
PATCH 2/24 Staging: winbond: mto: avoided use of extern functions
In reply to Iker PedrosaPrototype of two functions added to the header to avoid the use of extern.
--- drivers/staging/winbond/mto.c | 4 +--- drivers/staging/winbond/mto.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/winbond/mto.c +1 -3
@@ -21,6 +21,7 @@#include "wbhal.h" #include "wb35reg_f.h" #include "core.h" +#include "mto.h" /* Declare SQ3 to rate and fragmentation threshold table */ /* Declare fragmentation threshold table */
@@ -45,9 +46,6 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];static u8 boSparseTxTraffic; -void MTO_Init (struct wbsoft_priv *adapter); -void MTO_SetTxCount (struct wbsoft_priv *adapter,u8 t0,u8 index); -/* * =========================================================================== * MTO_Init --
drivers/staging/winbond/mto.h +2 -2
@@ -127,12 +127,12 @@ extern u16 MTO_Frag_Th_Tbl[];#define MTO_DATA_RATE () MTO_Data_Rate_Tbl[MTO_RATE_LEVEL()]#define MTO_FRAG_TH () MTO_Frag_Th_Tbl[MTO_FRAG_TH_LEVEL()] -extern void MTO_Init (struct wbsoft_priv *); +void MTO_Init (struct wbsoft_priv *); +void MTO_SetTxCount (struct wbsoft_priv *adapter,u8 t0,u8 index);extern void MTO_PeriodicTimerExpired (struct wbsoft_priv *);extern void MTO_SetDTORateRange (struct wbsoft_priv *,u8 *,u8 );extern u8 MTO_GetTxRate (struct wbsoft_priv *adapter,u32 fpdu_len);extern u8 MTO_GetTxFallbackRate (struct wbsoft_priv *adapter); -extern void MTO_SetTxCount (struct wbsoft_priv *adapter,u8 t0,u8 index);#endif /* __MTO_H__ */
Signature · 1 line
1.8.1.2
PATCH 3/24 Staging: winbond: mto: deleted extern functions
In reply to Iker PedrosaDeleted declaration of external functions that weren't used on this driver.
--- drivers/staging/winbond/mto.h | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/winbond/mto.h +0 -4
@@ -129,10 +129,6 @@ extern u16 MTO_Frag_Th_Tbl[];void MTO_Init (struct wbsoft_priv *);void MTO_SetTxCount (struct wbsoft_priv *adapter,u8 t0,u8 index); -extern void MTO_PeriodicTimerExpired (struct wbsoft_priv *); -extern void MTO_SetDTORateRange (struct wbsoft_priv *,u8 *,u8 ); -extern u8 MTO_GetTxRate (struct wbsoft_priv *adapter,u32 fpdu_len); -extern u8 MTO_GetTxFallbackRate (struct wbsoft_priv *adapter);#endif /* __MTO_H__ */
Signature · 1 line
1.8.1.2
PATCH 4/24 Staging: winbond: phy_calibration: fixed some lines over 80 characters
In reply to Iker PedrosaFirst of the patches that fixes the lines over 80 characters in phy_calibration.c
--- drivers/staging/winbond/phy_calibration.c | 46 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 19 deletions(-)
drivers/staging/winbond/phy_calibration.c +27 -19
@@ -27,10 +27,12 @@#define DEG2RAD (X ) (0.017453 * (X))static const s32 Angles[] = { -FIXED (DEG2RAD (45.0 )),FIXED (DEG2RAD (26.565 )),FIXED (DEG2RAD (14.0362 )), -FIXED (DEG2RAD (7.12502 )),FIXED (DEG2RAD (3.57633 )),FIXED (DEG2RAD (1.78991 )), -FIXED (DEG2RAD (0.895174 )),FIXED (DEG2RAD (0.447614 )),FIXED (DEG2RAD (0.223811 )), -FIXED (DEG2RAD (0.111906 )),FIXED (DEG2RAD (0.055953 )),FIXED (DEG2RAD (0.027977 )) +FIXED (DEG2RAD (45.0 )),FIXED (DEG2RAD (26.565 )), +FIXED (DEG2RAD (14.0362 )),FIXED (DEG2RAD (7.12502 )), +FIXED (DEG2RAD (3.57633 )),FIXED (DEG2RAD (1.78991 )), +FIXED (DEG2RAD (0.895174 )),FIXED (DEG2RAD (0.447614 )), +FIXED (DEG2RAD (0.223811 )),FIXED (DEG2RAD (0.111906 )), +FIXED (DEG2RAD (0.055953 )),FIXED (DEG2RAD (0.027977 )) };/****************** LOCAL FUNCTION DECLARATION SECTION **********************/
@@ -296,7 +298,8 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos) } } -static unsigned char hal_get_dxx_reg (struct hw_data *pHwData,u16 number,u32 *pValue) +static unsigned char hal_get_dxx_reg (struct hw_data *pHwData,u16 number, +u32 *pValue) {if (number <0x1000 ) number +=0x1000 ;
@@ -304,7 +307,8 @@ static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 *p }#define hw_get_dxx_reg (_A, _B, _C) hal_get_dxx_reg(_A, _B, (u32 *)_C) -static unsigned char hal_set_dxx_reg (struct hw_data *pHwData,u16 number,u32 value) +static unsigned char hal_set_dxx_reg (struct hw_data *pHwData,u16 number, +u32 value) {unsigned char ret;
@@ -407,7 +411,8 @@ void _rxadc_dc_offset_cancellation_winbond(struct hw_data *phw_data, u32 frequenPHY_DEBUG (("[CAL] ** adc_dc_cal_i = %d (0x%04X)\n" ,_s9_to_s32 (val&0x000001FF ), val&0x000001FF ));PHY_DEBUG (("[CAL] ** adc_dc_cal_q = %d (0x%04X)\n" , -_s9_to_s32 ((val&0x0003FE00 )>>9 ), (val&0x0003FE00 )>>9 )); +_s9_to_s32 ((val&0x0003FE00 )>>9 ), + (val&0x0003FE00 )>>9 ));#endif hw_get_dxx_reg (phw_data,REG_MODE_CTRL , &val);
@@ -535,7 +540,8 @@ void _txidac_dc_offset_cancellation_winbond(struct hw_data *phw_data) }PHY_DEBUG (("[CAL] ** fix_cancel_dc_i = %d (0x%04X)\n" , - fix_cancel_dc_i,_s32_to_s5 (fix_cancel_dc_i))); + fix_cancel_dc_i, +_s32_to_s5 (fix_cancel_dc_i)));if ((abs (mag_1-mag_0)*6 ) > mag_0)break ;
@@ -711,7 +717,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data, loop =LOOP_TIMES ;while (loop >0 ) { -PHY_DEBUG (("[CAL] [%d.] <_tx_iq_calibration_loop>\n" , (LOOP_TIMES -loop+1 ))); +PHY_DEBUG (("[CAL] [%d.] <_tx_iq_calibration_loop>\n" , + (LOOP_TIMES -loop+1 ))); iqcal_tone_i_avg =0 ; iqcal_tone_q_avg =0 ;
@@ -719,8 +726,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,return 0 ;for (capture_time =0 ; capture_time <10 ; capture_time++) {/* -* a. Set iqcal_mode[1:0] to 0x2 and set "calib_start" to 0x1 to -* enable "IQ calibration Mode II" +* a. Set iqcal_mode[1:0] to 0x2 and set "calib_start" +* to 0x1 to enable "IQ calibration Mode II" */ reg_mode_ctrl &= ~(MASK_IQCAL_TONE_SEL |MASK_IQCAL_MODE ); reg_mode_ctrl &= ~MASK_IQCAL_MODE ;
@@ -749,8 +756,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,PHY_DEBUG (("[CAL] MODE_CTRL (write) = 0x%08X\n" , reg_mode_ctrl));/* -* d. Set iqcal_mode[1:0] to 0x3 and set "calib_start" to 0x1 to -* enable "IQ calibration Mode II" +* d. Set iqcal_mode[1:0] to 0x3 and set "calib_start" +* to 0x1 to enable "IQ calibration Mode II" */ /* hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val); */ hw_get_dxx_reg (phw_data,REG_MODE_CTRL , ®_mode_ctrl);
@@ -766,7 +773,7 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data, iqcal_tone_i =_s13_to_s32 (val &0x00001FFF ); iqcal_tone_q =_s13_to_s32 ((val &0x03FFE000 ) >>13 );PHY_DEBUG (("[CAL] ** iqcal_tone_i = %d, iqcal_tone_q = %d\n" , - iqcal_tone_i, iqcal_tone_q)); + iqcal_tone_i, iqcal_tone_q));if (capture_time ==0 )continue ;else {
@@ -1146,7 +1153,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre/* for (loop = 0; loop < LOOP_TIMES; loop++) */ loop =LOOP_TIMES ;while (loop >0 ) { -PHY_DEBUG (("[CAL] [%d.] <_rx_iq_calibration_loop>\n" , (LOOP_TIMES -loop+1 ))); +PHY_DEBUG (("[CAL] [%d.] <_rx_iq_calibration_loop>\n" , + (LOOP_TIMES -loop+1 ))); iqcal_tone_i_avg =0 ; iqcal_tone_q_avg =0 ; iqcal_image_i_avg =0 ;
@@ -1199,13 +1207,13 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre/* d. */ rot_tone_i_b = (iqcal_tone_i * iqcal_tone_i + - iqcal_tone_q * iqcal_tone_q) /1024 ; + iqcal_tone_q * iqcal_tone_q) /1024 ; rot_tone_q_b = (iqcal_tone_i * iqcal_tone_q * (-1 ) + - iqcal_tone_q * iqcal_tone_i) /1024 ; + iqcal_tone_q * iqcal_tone_i) /1024 ; rot_image_i_b = (iqcal_image_i * iqcal_tone_i - - iqcal_image_q * iqcal_tone_q) /1024 ; + iqcal_image_q * iqcal_tone_q) /1024 ; rot_image_q_b = (iqcal_image_i * iqcal_tone_q + - iqcal_image_q * iqcal_tone_i) /1024 ; + iqcal_image_q * iqcal_tone_i) /1024 ;PHY_DEBUG (("[CAL] ** rot_tone_i_b = %d\n" , rot_tone_i_b));PHY_DEBUG (("[CAL] ** rot_tone_q_b = %d\n" , rot_tone_q_b));
Signature · 1 line
1.8.1.2
PATCH 5/24 Staging: winbond: phy_calibration: fixed some lines over 80 characters
In reply to Iker PedrosaSecond of the patches that fixes the lines over 80 characters in phy_calibration.c
--- drivers/staging/winbond/phy_calibration.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/winbond/phy_calibration.c +8 -4
@@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre b_2 = (rot_image_q_b *32768 ) / rot_tone_i_b - phw_data->iq_rsdl_phase_tx_d2; -PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , phw_data->iq_rsdl_gain_tx_d2)); -PHY_DEBUG (("[CAL] ** iq_rsdl_phase_tx_d2= %d\n" , phw_data->iq_rsdl_phase_tx_d2)); +PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , + phw_data->iq_rsdl_gain_tx_d2)); +PHY_DEBUG (("[CAL] ** iq_rsdl_phase_tx_d2= %d\n" , + phw_data->iq_rsdl_phase_tx_d2));PHY_DEBUG (("[CAL] ***** EPSILON/2 = %d\n" , a_2));PHY_DEBUG (("[CAL] ***** THETA/2 = %d\n" , b_2));
@@ -1280,7 +1282,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre/* e. */ pwr_tone = (iqcal_tone_i*iqcal_tone_i + iqcal_tone_q*iqcal_tone_q); - pwr_image = (iqcal_image_i*iqcal_image_i + iqcal_image_q*iqcal_image_q)*factor; + pwr_image = (iqcal_image_i*iqcal_image_i + + iqcal_image_q*iqcal_image_q)*factor;PHY_DEBUG (("[CAL] ** pwr_tone = %d\n" , pwr_tone));PHY_DEBUG (("[CAL] ** pwr_image = %d\n" , pwr_image));
@@ -1577,7 +1580,8 @@ unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *phw_data) sqsum = iqcal_tone_i0*iqcal_tone_i0 + iqcal_tone_q0*iqcal_tone_q0; iq_mag_0_tx = (s32 )_sqrt (sqsum); -PHY_DEBUG (("[CAL] ** auto_adjust_txvga_for_iq_mag_0_tx=%d\n" , iq_mag_0_tx)); +PHY_DEBUG (("[CAL] ** auto_adjust_txvga_for_iq_mag_0_tx=%d\n" , + iq_mag_0_tx));if (iq_mag_0_tx >=700 && iq_mag_0_tx <=1750 )break ;
Signature · 1 line
1.8.1.2
Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
Quoted 12 lines · Iker Pedrosa
Second of the patches that fixes the lines over 80 characters in
phy_calibration.cSigned-off-by Iker Pedrosa <[email protected]>--- drivers/staging/winbond/phy_calibration.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/staging/winbond/phy_calibration.c +0
-0
drivers/staging/winbond/phy_calibration.c u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre · line 1237
Quoted 7 lines
drivers/staging/winbond/phy_calibration.c +2
-2@@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre b_2 = (rot_image_q_b *32768 ) / rot_tone_i_b - phw_data->iq_rsdl_phase_tx_d2; -PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , phw_data->iq_rsdl_gain_tx_d2)); -PHY_DEBUG (("[CAL] ** iq_rsdl_phase_tx_d2= %d\n" , phw_data->iq_rsdl_phase_tx_d2)); +PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , + phw_data->iq_rsdl_gain_tx_d2));
Don't redo this, but really these should be aligned like this:
PHY_DEBUG(("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n",
phw_data->iq_rsdl_gain_tx_d2));In the end, we're going to remove all these debugging prints so it's not worth redoing in a later patch. What you have is fine. The message itself is sort of nonsense.
drivers/staging/winbond/phy_calibration.c u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre · line 1286
Quoted 12 lines
drivers/staging/winbond/phy_calibration.c +4
-1+PHY_DEBUG (("[CAL] ** iq_rsdl_phase_tx_d2= %d\n" , + phw_data->iq_rsdl_phase_tx_d2));PHY_DEBUG (("[CAL] ***** EPSILON/2 = %d\n" , a_2));PHY_DEBUG (("[CAL] ***** THETA/2 = %d\n" , b_2));@@ -1280,7 +1282,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre/* e. */ pwr_tone = (iqcal_tone_i*iqcal_tone_i + iqcal_tone_q*iqcal_tone_q); - pwr_image = (iqcal_image_i*iqcal_image_i + iqcal_image_q*iqcal_image_q)*factor; + pwr_image = (iqcal_image_i*iqcal_image_i + + iqcal_image_q*iqcal_image_q)*factor;
Don't resend, eventually, someone will have to fix these across the whole driver but this should be:
pwr_image = (iqcal_image_i * iqcal_image_i + iqcal_image_q * iqcal_image_q) * factor;
I've changed the alignment and added spaces around the math operations.
regards,
dan carpenter
Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
Quoted 1 line · Dan Carpenter
On Mon, Aug 26, 2013 at 05:10:04PM +0200, Iker Pedrosa wrote:
[]
Quoted 1 line
drivers/staging/winbond/phy_calibration.c
Quoted 1 line
drivers/staging/winbond/phy_calibration.c +0
-0
[]
Quoted 11 lines
drivers/staging/winbond/phy_calibration.c u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre · line 1237
Quoted 8 lines
drivers/staging/winbond/phy_calibration.c +2
-2@@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre b_2 = (rot_image_q_b *32768 ) / rot_tone_i_b - phw_data->iq_rsdl_phase_tx_d2; -PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , phw_data->iq_rsdl_gain_tx_d2)); -PHY_DEBUG (("[CAL] ** iq_rsdl_phase_tx_d2= %d\n" , phw_data->iq_rsdl_phase_tx_d2)); +PHY_DEBUG (("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n" , + phw_data->iq_rsdl_gain_tx_d2));Don't redo this, but really these should be aligned like this:
Quoted 6 lines
PHY_DEBUG(("[CAL] ** iq_rsdl_gain_tx_d2 = %d\n", phw_data->iq_rsdl_gain_tx_d2));In the end, we're going to remove all these debugging prints so it's not worth redoing in a later patch. What you have is fine. The message itself is sort of nonsense.
Especially true because the only #define for PHY_DEBUG is:
#define PHY_DEBUG(msg, args...)
None of this does anything anyway.
It'd be better to send a removal of the whole lot.
Does anyone still use this driver?
Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
Hi!
Quoted 3 lines
It'd be better to send a removal of the whole lot.
Does anyone still use this driver?
I do have the hardware, in subnotebook with terrible keyboard. So I do not use it a lot.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Greg KH
maintainerRe: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
In reply to Iker PedrosaQuoted 3 lines · Iker Pedrosa
Second of the patches that fixes the lines over 80 characters in
phy_calibration.cSigned-off-by Iker Pedrosa <[email protected]>
This Subject: is identical to the previous patch, not good.
You also do that for 4 other patches in this series :(
Can you please redo all of these, fixing the subjects, and the build errors (which wasn't good at all), and resend them?
thanks,
greg k-h
PATCH 6/24 Staging: winbond: reg: erased trailing whitespace
In reply to Iker PedrosaErased all the errors given by checkpatch stating trailing whitespace.
--- drivers/staging/winbond/reg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/winbond/reg.c +6 -6
@@ -920,7 +920,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)Wb35Reg_WriteSync (pHwData,0x03f8 ,0x7ff ); } -static void Set_ChanIndep_RfData_al7230_24 (struct hw_data *pHwData,u32 *pltmp, +static void Set_ChanIndep_RfData_al7230_24 (struct hw_data *pHwData,u32 *pltmp,char number) {u8 i;
@@ -930,7 +930,7 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp, } } -static void Set_ChanIndep_RfData_al7230_50 (struct hw_data *pHwData,u32 *pltmp, +static void Set_ChanIndep_RfData_al7230_50 (struct hw_data *pHwData,u32 *pltmp,char number) {u8 i;
@@ -1620,13 +1620,13 @@ void BBProcessor_initial(struct hw_data *pHwData) reg->SQ3_filter[i] =0x2f ;/* half of Bit 0 ~ 6 */ } -static inline void set_tx_power_per_channel_max2829 (struct hw_data *pHwData, +static inline void set_tx_power_per_channel_max2829 (struct hw_data *pHwData,struct chan_info Channel) {RFSynthesizer_SetPowerIndex (pHwData,100 ); } -static void set_tx_power_per_channel_al2230 (struct hw_data *pHwData, +static void set_tx_power_per_channel_al2230 (struct hw_data *pHwData,struct chan_info Channel) {u8 index =100 ;
@@ -1636,7 +1636,7 @@ static void set_tx_power_per_channel_al2230(struct hw_data *pHwData,RFSynthesizer_SetPowerIndex (pHwData, index); } -static void set_tx_power_per_channel_al7230 (struct hw_data *pHwData, +static void set_tx_power_per_channel_al7230 (struct hw_data *pHwData,struct chan_info Channel) {u8 i, index =100 ;
@@ -1660,7 +1660,7 @@ static void set_tx_power_per_channel_al7230(struct hw_data *pHwData,RFSynthesizer_SetPowerIndex (pHwData, index); } -static void set_tx_power_per_channel_wb242 (struct hw_data *pHwData, +static void set_tx_power_per_channel_wb242 (struct hw_data *pHwData,struct chan_info Channel) {u8 index =100 ;
Signature · 1 line
1.8.1.2
PATCH 7/24 Staging: winbond: reg: white space deleted
In reply to Iker PedrosaWhite space deleted before semicolons.
--- drivers/staging/winbond/reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/winbond/reg.c +2 -2
@@ -1088,7 +1088,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)msleep (5 ); ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 ); -Wb35Reg_WriteSync (pHwData,0x0864 , ltmp) ; +Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);Wb35Reg_WriteSync (pHwData,0x105c , pHwData->reg.BB5C); pHwData->reg.BB50 &= ~0x13 ;/* (MASK_IQCAL_MODE|MASK_CALIB_START); */
@@ -2096,7 +2096,7 @@ void Mxx_initial(struct hw_data *pHwData) pltmp[5 ] = reg->M38_MacControl;/* M3C */ - tmp = (DEFAULT_PIFST <<26 ) | (DEFAULT_EIFST <<16 ) | (DEFAULT_DIFST <<8 ) | (DEFAULT_SIFST <<4 ) |DEFAULT_OSIFST ; + tmp = (DEFAULT_PIFST <<26 ) | (DEFAULT_EIFST <<16 ) | (DEFAULT_DIFST <<8 ) | (DEFAULT_SIFST <<4 ) |DEFAULT_OSIFST ; reg->M3C_MacControl = tmp; pltmp[6 ] = tmp;
Signature · 1 line
1.8.1.2
PATCH 8/24 Staging: winbond: reg: changed sleep function from msleep to usleep
In reply to Iker PedrosaAccording to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
--- drivers/staging/winbond/reg.c | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/winbond/reg.c +26 -26
@@ -890,9 +890,9 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)else {Wb35Reg_WriteSync (pHwData,0x03f4 ,0xFF5807FF );Wb35Reg_WriteSync (pHwData,0x03d4 ,0x80 );/* regulator on only */ -msleep (10 ); +usleep (10000 );Wb35Reg_WriteSync (pHwData,0x03d4 ,0xb8 );/* REG_ON RF_RSTN on, and */ -msleep (10 ); +usleep (10000 ); ltmp =0x4968 ;if ((pHwData->phy_type ==RF_WB_242 ) || (RF_WB_242_1 == pHwData->phy_type))
@@ -905,7 +905,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)Wb35Reg_ReadSync (pHwData,0x03d0 , <mp); loop =500 ;/* Wait for 5 second */ while (!(ltmp &0x20 ) && loop--) { -msleep (10 ); +usleep (10000 );if (!Wb35Reg_ReadSync (pHwData,0x03d0 , <mp))break ; }
@@ -914,7 +914,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData) }Wb35Reg_WriteSync (pHwData,0x03b0 ,1 );/* Reset hardware first */ -msleep (10 ); +usleep (10000 );/* Set burst write delay */ Wb35Reg_WriteSync (pHwData,0x03f8 ,0x7ff );
@@ -1055,18 +1055,18 @@ void RFSynthesizer_initial(struct hw_data *pHwData)case RF_AIROHA_2230 : ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x07 <<20 ) |0xE168E ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (10 ); +usleep (10000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse (al2230_rf_data[7 ],20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (10 ); +usleep (10000 );case RF_AIROHA_2230S :Wb35Reg_WriteSync (pHwData,0x03d4 ,0x80 );/* regulator on only */ -msleep (10 ); +usleep (10000 );Wb35Reg_WriteSync (pHwData,0x03d4 ,0xa0 );/* PLL_PD REF_PD set to 0 */ -msleep (10 ); +usleep (10000 );Wb35Reg_WriteSync (pHwData,0x03d4 ,0xe0 );/* MLK_EN */ Wb35Reg_WriteSync (pHwData,0x03b0 ,1 );/* Reset hardware first */ -msleep (10 ); +usleep (10000 );/* ========================================================= */ /* The follow code doesn't use the burst-write mode */
@@ -1077,15 +1077,15 @@ void RFSynthesizer_initial(struct hw_data *pHwData)Wb35Reg_WriteSync (pHwData,0x105c , ltmp); pHwData->reg.BB50 |=0x13 ;/* (MASK_IQCAL_MODE|MASK_CALIB_START) */ Wb35Reg_WriteSync (pHwData,0x1050 , pHwData->reg.BB50); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01B0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01E0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);
@@ -1102,13 +1102,13 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* 2.4GHz */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x9ABA8F ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x3ABA8F ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x1ABA8F ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 );/* 5GHz */ Wb35Reg_WriteSync (pHwData,0x03dc ,0x00000000 );
@@ -1119,20 +1119,20 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Write to register. number must less and equal than 16 */ for (i =0 ; i < number; i++)Wb35Reg_WriteSync (pHwData,0x0864 , pltmp[i]); -msleep (5 ); +usleep (5000 );Wb35Reg_WriteSync (pHwData,0x03dc ,0x00000080 );pr_debug ("* PLL_ON high\n" ); ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x9ABA8F ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x3ABA8F ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 ); ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |0x12BACF ;Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 );break ;case RF_WB_242 :case RF_WB_242_1 :
@@ -1147,11 +1147,11 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Calibration (1a.0). Synthesizer reset */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x0F <<24 ) |0x00101E ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 );/* Calibration (1a). VCO frequency calibration mode ; waiting 2msec VCO calibration time */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFE69c0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (2 ); +usleep (2000 );/* ----- Calibration (2). TX baseband Gm-C filter auto-tuning */ /* Calibration (2a). turn off ENCAL signal */
@@ -1210,7 +1210,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (2 ); +usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);
@@ -1222,7 +1222,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (2 ); +usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);
@@ -1234,7 +1234,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (2 ); +usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);
@@ -1246,7 +1246,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (2 ); +usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);
@@ -1258,7 +1258,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* 0x00 0xF86100 ; 3E184 ; Switch RF chip to normal mode */ ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xF86100 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); -msleep (5 ); +usleep (5000 );break ; } }
Signature · 1 line
1.8.1.2
Greg KH
maintainerRe: [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep
Quoted 12 lines · Iker Pedrosa
According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
Signed-off-by Iker Pedrosa <[email protected]>--- drivers/staging/winbond/reg.c | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-)drivers/staging/winbond/reg.c +0
-0
drivers/staging/winbond/reg.c void Uxx_power_on_procedure(struct hw_data *pHwData) · line 893
Quoted 5 lines
drivers/staging/winbond/reg.c +1
-1@@ -890,9 +890,9 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)else {Wb35Reg_WriteSync (pHwData,0x03f4 ,0xFF5807FF );Wb35Reg_WriteSync (pHwData,0x03d4 ,0x80 );/* regulator on only */ -msleep (10 ); +usleep (10000 );
This breaks the build :(
PATCH 9/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaFirst of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
drivers/staging/winbond/reg.c +17 -13
@@ -809,12 +809,12 @@ u32 w89rf242_txvga_data[][5] = { {(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242} }; -/* ================================================================================================== */ +/* ========================================================================= */ /* -* ============================================================================================================= +* ============================================================================ * Uxx_ReadEthernetAddress -- * * Routine Description:
@@ -826,15 +826,16 @@ u32 w89rf242_txvga_data[][5] = {* Return Value: * * The address is stored in EthernetIDAddr. -* ============================================================================================================= +* ============================================================================ */ void Uxx_ReadEthernetAddress (struct hw_data *pHwData) {u32 ltmp;/* -* Reading Ethernet address from EEPROM and set into hardware due to MAC address maybe change. -* Only unplug and plug again can make hardware read EEPROM again. +* Reading Ethernet address from EEPROM and set into hardware due to +* MAC address maybe change. Only unplug and plug again can make +* hardware read EEPROM again. */ Wb35Reg_WriteSync (pHwData,0x03b4 ,0x08000000 );/* Start EEPROM access + Read + address(0x0d) */ Wb35Reg_ReadSync (pHwData,0x03b4 , <mp);
@@ -852,18 +853,19 @@ void Uxx_ReadEthernetAddress(struct hw_data *pHwData)/* -* =============================================================================================================== +* ============================================================================ * CardGetMulticastBit -- * Description: -* For a given multicast address, returns the byte and bit in the card multicast registers that it hashes to. -* Calls CardComputeCrc() to determine the CRC value. +* For a given multicast address, returns the byte and bit in the card +* multicast registers that it hashes to. Calls CardComputeCrc() to +* determine the CRC value. * Arguments: * Address - the address * Byte - the byte that it hashes to * Value - will have a 1 in the relevant bit * Return Value: * None. -* ============================================================================================================== +* ============================================================================ */ void CardGetMulticastBit (u8 Address[ETH_ALEN ],u8 *Byte,u8 *Value) {
@@ -926,7 +928,8 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,u8 i;for (i =0 ; i < number; i++) { pHwData->phy_para[i] = al7230_rf_data_24[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) | (al7230_rf_data_24[i] &0xffffff ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + | (al7230_rf_data_24[i] &0xffffff ); } }
@@ -936,15 +939,16 @@ static void Set_ChanIndep_RfData_al7230_50(struct hw_data *pHwData, u32 *pltmp,u8 i;for (i =0 ; i < number; i++) { pHwData->phy_para[i] = al7230_rf_data_50[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) | (al7230_rf_data_50[i] &0xffffff ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + | (al7230_rf_data_50[i] &0xffffff ); } }/* -* ============================================================================================================= +* ============================================================================ * RFSynthesizer_initial -- -* ============================================================================================================= +* ============================================================================ */ void RFSynthesizer_initial (struct hw_data *pHwData) {
Signature · 1 line
1.8.1.2
Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters
Quoted 12 lines · Iker Pedrosa
First of the patches that fixes the lines over 80 characters in
reg.cSigned-off-by Iker Pedrosa <[email protected]>--- drivers/staging/winbond/reg.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)drivers/staging/winbond/reg.c +0
-0
drivers/staging/winbond/reg.c u32 w89rf242_txvga_data[][5] = { · line 812
Quoted 5 lines
drivers/staging/winbond/reg.c +1
-1@@ -809,12 +809,12 @@ u32 w89rf242_txvga_data[][5] = { {(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242} }; -/* ================================================================================================== */ +/* ========================================================================= */
Just delete these. They are not kernel style.
regards,
dan carpenter
Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker Pedrosadrivers/staging/winbond/reg.c static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp, · line 932
Quoted 7 lines · Iker Pedrosa
drivers/staging/winbond/reg.c +2
-1@@ -926,7 +928,8 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,u8 i;for (i =0 ; i < number; i++) { pHwData->phy_para[i] = al7230_rf_data_24[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) | (al7230_rf_data_24[i] &0xffffff ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + | (al7230_rf_data_24[i] &0xffffff );
It's always a bit hard for me to know how picky to be. Normally the '|' would be on the first line here.
regards,
dan carpenter
PATCH 10/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaSecond of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/staging/winbond/reg.c +20 -10
@@ -974,42 +974,48 @@ void RFSynthesizer_initial(struct hw_data *pHwData) number =ARRAY_SIZE (max2825_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = max2825_rf_data[i];/* Backup Rf parameter */ - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2825_rf_data[i],18 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2825_rf_data[i],18 ); }break ;case RF_MAXIM_2827 : number =ARRAY_SIZE (max2827_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = max2827_rf_data[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2827_rf_data[i],18 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2827_rf_data[i],18 ); }break ;case RF_MAXIM_2828 : number =ARRAY_SIZE (max2828_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = max2828_rf_data[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2828_rf_data[i],18 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2828_rf_data[i],18 ); }break ;case RF_MAXIM_2829 : number =ARRAY_SIZE (max2829_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = max2829_rf_data[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2829_rf_data[i],18 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2829_rf_data[i],18 ); }break ;case RF_AIROHA_2230 : number =ARRAY_SIZE (al2230_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = al2230_rf_data[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse (al2230_rf_data[i],20 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse (al2230_rf_data[i],20 ); }break ;case RF_AIROHA_2230S : number =ARRAY_SIZE (al2230s_rf_data);for (i =0 ; i < number; i++) { pHwData->phy_para[i] = al2230s_rf_data[i]; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse (al2230s_rf_data[i],20 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse (al2230s_rf_data[i],20 ); }break ;case RF_AIROHA_7230 :
@@ -1030,7 +1036,8 @@ void RFSynthesizer_initial(struct hw_data *pHwData) } pHwData->phy_para[i] = ltmp; - pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse (ltmp,24 ); + pltmp[i] = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse (ltmp,24 ); }break ; }
@@ -1057,10 +1064,12 @@ void RFSynthesizer_initial(struct hw_data *pHwData)switch (pHwData->phy_type) {case RF_AIROHA_2230 : - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x07 <<20 ) |0xE168E ,20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse ((0x07 <<20 ) |0xE168E ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (10000 ); - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse (al2230_rf_data[7 ],20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse (al2230_rf_data[7 ],20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (10000 );case RF_AIROHA_2230S :
@@ -1074,7 +1083,8 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* ========================================================= */ /* The follow code doesn't use the burst-write mode */ - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp); ltmp = pHwData->reg.BB5C &0xfffff000 ;
Signature · 1 line
1.8.1.2
PATCH 11/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaThird of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
drivers/staging/winbond/reg.c +20 -10
@@ -1093,15 +1093,18 @@ void RFSynthesizer_initial(struct hw_data *pHwData)Wb35Reg_WriteSync (pHwData,0x1050 , pHwData->reg.BB50);usleep (5000 ); - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01B0 ,20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse ((0x0F <<20 ) |0xF01B0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (5000 ); - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01E0 ,20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse ((0x0F <<20 ) |0xF01E0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (5000 ); - ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse ((0x0F <<20 ) |0xF01A0 ,20 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);Wb35Reg_WriteSync (pHwData,0x105c , pHwData->reg.BB5C);
@@ -1159,30 +1162,37 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* ----- Calibration (1). VCO frequency calibration */ /* Calibration (1a.0). Synthesizer reset */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x0F <<24 ) |0x00101E ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x0F <<24 ) |0x00101E ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (5000 );/* Calibration (1a). VCO frequency calibration mode ; waiting 2msec VCO calibration time */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFE69c0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFE69c0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (2000 );/* ----- Calibration (2). TX baseband Gm-C filter auto-tuning */ /* Calibration (2a). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xF8EBC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xF8EBC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (2b.0). TX filter auto-tuning BW: TFLBW=101 (TC5376A default) */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x07 <<24 ) |0x0C68CE ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x07 <<24 ) |0x0C68CE ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (2b). send TX reset signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x0F <<24 ) |0x00201E ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x0F <<24 ) |0x00201E ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (2c). turn-on TX Gm-C filter auto-tuning */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFCEBC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFCEBC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);udelay (150 );/* Sleep 150 us */ /* turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xF8EBC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xF8EBC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* ----- Calibration (3). RX baseband Gm-C filter auto-tuning */
Signature · 1 line
1.8.1.2
PATCH 12/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaFourth of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-)
drivers/staging/winbond/reg.c +22 -11
@@ -1197,46 +1197,57 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* ----- Calibration (3). RX baseband Gm-C filter auto-tuning */ /* Calibration (3a). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (3b.0). RX filter auto-tuning BW: RFLBW=100 (TC5376A+corner default;) */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x07 <<24 ) |0x0C68CE ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x07 <<24 ) |0x0C68CE ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (3b). send RX reset signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x0F <<24 ) |0x00401E ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x0F <<24 ) |0x00401E ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (3c). turn-on RX Gm-C filter auto-tuning */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFEEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFEEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);udelay (150 );/* Sleep 150 us */ /* Calibration (3e). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* ----- Calibration (4). TX LO leakage calibration */ /* Calibration (4a). TX LO leakage calibration */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFD6BC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFD6BC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);udelay (150 );/* Sleep 150 us */ /* ----- Calibration (5). RX DC offset calibration */ /* Calibration (5a). turn off ENCAL signal and set to RX SW DC calibration mode */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5b). turn off AGC servo-loop & RSSI */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x01 <<24 ) |0xEBFFC2 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x01 <<24 ) |0xEBFFC2 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* for LNA=11 -------- */ /* Calibration (5c-h). RX DC offset current bias ON; & LNA=11; RXVGA=111111 */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x06 <<24 ) |0x343FCC ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x06 <<24 ) |0x343FCC ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* for LNA=10 -------- */
Signature · 1 line
1.8.1.2
PATCH 13/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaFifth of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-)
drivers/staging/winbond/reg.c +22 -11
@@ -1252,46 +1252,57 @@ void RFSynthesizer_initial(struct hw_data *pHwData)/* for LNA=10 -------- */ /* Calibration (5c-m). RX DC offset current bias ON; & LNA=10; RXVGA=111111 */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x06 <<24 ) |0x342FCC ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x06 <<24 ) |0x342FCC ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* for LNA=01 -------- */ /* Calibration (5c-m). RX DC offset current bias ON; & LNA=01; RXVGA=111111 */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x06 <<24 ) |0x341FCC ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x06 <<24 ) |0x341FCC ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* for LNA=00 -------- */ /* Calibration (5c-l). RX DC offset current bias ON; & LNA=00; RXVGA=111111 */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x06 <<24 ) |0x340FCC ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x06 <<24 ) |0x340FCC ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFF6DC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (2000 );/* Calibration (5f). turn off ENCAL signal */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xFAEDC0 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* Calibration (5g). turn on AGC servo-loop */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x01 <<24 ) |0xEFFFC2 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x01 <<24 ) |0xEFFFC2 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);/* ----- Calibration (7). Switch RF chip to normal mode */ /* 0x00 0xF86100 ; 3E184 ; Switch RF chip to normal mode */ - ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse ((0x00 <<24 ) |0xF86100 ,24 ); + ltmp = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse ((0x00 <<24 ) |0xF86100 ,24 );Wb35Reg_WriteSync (pHwData,0x0864 , ltmp);usleep (5000 );break ;
Signature · 1 line
1.8.1.2
PATCH 14/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaSixth of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
drivers/staging/winbond/reg.c +18 -10
@@ -1738,7 +1738,8 @@ static void set_tx_power_per_channel_wb242(struct hw_data *pHwData,* None. * =========================================================================== */ -void RFSynthesizer_SwitchingChannel (struct hw_data *pHwData,struct chan_info Channel) +void RFSynthesizer_SwitchingChannel (struct hw_data *pHwData, +struct chan_info Channel) {struct wb35_reg *reg = &pHwData->reg;u32 pltmp[16 ];/* The 16 is the maximum capability of hardware */
@@ -1891,9 +1892,9 @@ void RFSynthesizer_SwitchingChannel(struct hw_data *pHwData, struct chan_info C/* BB: select 5 GHz */ reg->BB50 &= ~(BIT (11 ) |BIT (12 ));if (Channel.ChanNo <=64 ) - reg->BB50 |=BIT (12 );/* 10-5.25GHz */ + reg->BB50 |=BIT (12 );/* 10-5.25GHz */ else if ((Channel.ChanNo >=100 ) && (Channel.ChanNo <=124 )) - reg->BB50 |=BIT (11 );/* 01-5.48GHz */ + reg->BB50 |=BIT (11 );/* 01-5.48GHz */ else if ((Channel.ChanNo >=128 ) && (Channel.ChanNo <=161 )) reg->BB50 |= (BIT (12 ) |BIT (11 ));/* 11-5.775GHz */ else /* Chan 184 ~ 196 will use bit[12-11] = 10 in version sh-src-1.2.25 */
@@ -1968,7 +1969,8 @@ u8 RFSynthesizer_SetMaxim2828_24Power(struct hw_data *pHwData, u8 index)u32 PowerData;if (index >1 ) index =1 ; - PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2828_power_data_24[index],18 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2828_power_data_24[index],18 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return index; }
@@ -1978,7 +1980,8 @@ u8 RFSynthesizer_SetMaxim2828_50Power(struct hw_data *pHwData, u8 index)u32 PowerData;if (index >1 ) index =1 ; - PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2828_power_data_50[index],18 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2828_power_data_50[index],18 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return index; }
@@ -1988,7 +1991,8 @@ u8 RFSynthesizer_SetMaxim2827_24Power(struct hw_data *pHwData, u8 index)u32 PowerData;if (index >1 ) index =1 ; - PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2827_power_data_24[index],18 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2827_power_data_24[index],18 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return index; }
@@ -1998,7 +2002,8 @@ u8 RFSynthesizer_SetMaxim2827_50Power(struct hw_data *pHwData, u8 index)u32 PowerData;if (index >1 ) index =1 ; - PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2827_power_data_50[index],18 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2827_power_data_50[index],18 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return index; }
@@ -2008,7 +2013,8 @@ u8 RFSynthesizer_SetMaxim2825Power(struct hw_data *pHwData, u8 index)u32 PowerData;if (index >1 ) index =1 ; - PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) |BitReverse (max2825_power_data_24[index],18 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (18 <<24 ) + |BitReverse (max2825_power_data_24[index],18 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return index; }
@@ -2026,7 +2032,8 @@ u8 RFSynthesizer_SetAiroha2230Power(struct hw_data *pHwData, u8 index)if (i == count) i--; - PowerData = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) |BitReverse (al2230_txvga_data[i][0 ],20 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (20 <<24 ) + |BitReverse (al2230_txvga_data[i][0 ],20 );Wb35Reg_Write (pHwData,0x0864 , PowerData);return i; }
@@ -2043,7 +2050,8 @@ u8 RFSynthesizer_SetAiroha7230Power(struct hw_data *pHwData, u8 index) }if (i == count) i--; - PowerData = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) | (al7230_txvga_data[i][0 ] &0xffffff ); + PowerData = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + | (al7230_txvga_data[i][0 ] &0xffffff );Wb35Reg_Write (pHwData,0x0864 , PowerData);return i; }
Signature · 1 line
1.8.1.2
PATCH 15/24 Staging: winbond: reg: fixed some lines over 80 characters
In reply to Iker PedrosaSeventh of the patches that fixes the lines over 80 characters in reg.c
--- drivers/staging/winbond/reg.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/staging/winbond/reg.c +16 -8
@@ -2070,7 +2070,8 @@ u8 RFSynthesizer_SetWinbond242Power(struct hw_data *pHwData, u8 index) i--;/* Set TxVga into RF */ - PowerData = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) |BitReverse (w89rf242_txvga_data[i][0 ],24 ); + PowerData = (1 <<31 ) | (0 <<30 ) | (24 <<24 ) + |BitReverse (w89rf242_txvga_data[i][0 ],24 );Wb35Reg_Write (pHwData,0x0864 , PowerData);/* Update BB48 BB4C BB58 for high precision txvga */
@@ -2146,11 +2147,15 @@ void Mxx_initial(struct hw_data *pHwData) pltmp[4 ] = tmp;/* M38 */ - reg->M38_MacControl = (DEFAULT_RATE_RETRY_LIMIT <<8 ) | (DEFAULT_LONG_RETRY_LIMIT <<4 ) |DEFAULT_SHORT_RETRY_LIMIT ; + reg->M38_MacControl = (DEFAULT_RATE_RETRY_LIMIT <<8 ) | + (DEFAULT_LONG_RETRY_LIMIT <<4 ) | +DEFAULT_SHORT_RETRY_LIMIT ; pltmp[5 ] = reg->M38_MacControl;/* M3C */ - tmp = (DEFAULT_PIFST <<26 ) | (DEFAULT_EIFST <<16 ) | (DEFAULT_DIFST <<8 ) | (DEFAULT_SIFST <<4 ) |DEFAULT_OSIFST ; + tmp = (DEFAULT_PIFST <<26 ) | (DEFAULT_EIFST <<16 ) | + (DEFAULT_DIFST <<8 ) | (DEFAULT_SIFST <<4 ) | +DEFAULT_OSIFST ; reg->M3C_MacControl = tmp; pltmp[6 ] = tmp;
@@ -2173,7 +2178,9 @@ void Mxx_initial(struct hw_data *pHwData) pltmp[9 ] = tmp;/* M4C */ - reg->M4C_MacStatus = (DEFAULT_PROTOCOL_VERSION <<30 ) | (DEFAULT_MAC_POWER_STATE <<28 ) | (DEFAULT_DTIM_ALERT_TIME <<24 ); + reg->M4C_MacStatus = (DEFAULT_PROTOCOL_VERSION <<30 ) | + (DEFAULT_MAC_POWER_STATE <<28 ) | + (DEFAULT_DTIM_ALERT_TIME <<24 ); pltmp[10 ] = reg->M4C_MacStatus;for (i =0 ; i <11 ; i++)
@@ -2245,10 +2252,11 @@ void GetTxVgaFromEEPROM(struct hw_data *pHwData) }/* -* This function will affect the TxVga parameter in HAL. If hal_set_current_channel -* or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect. -* TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35 -* This function will use default TxVgaSettingInEEPROM data to calculate new TxVga. +* This function will affect the TxVga parameter in HAL. If +* hal_set_current_channel or RFSynthesizer_SetPowerIndex be called, new TxVga +* will take effect. TxVgaSettingInEEPROM of sHwData is an u8 array point to +* EEPROM contain for IS89C35. This function will use default +* TxVgaSettingInEEPROM data to calculate new TxVga. */ void EEPROMTxVgaAdjust (struct hw_data *pHwData) {
Signature · 1 line
1.8.1.2
PATCH 16/24 Staging: winbond: wb35reg_f: fixed lines over 80 characters
In reply to Iker PedrosaFixed lines over 80 characters.
--- drivers/staging/winbond/wb35reg_f.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/staging/winbond/wb35reg_f.h +12 -6
@@ -15,7 +15,8 @@ void Uxx_ReadEthernetAddress(struct hw_data *hw_data);void Dxx_initial (struct hw_data *hw_data);void Mxx_initial (struct hw_data *hw_data);void RFSynthesizer_initial (struct hw_data *hw_data); -void RFSynthesizer_SwitchingChannel (struct hw_data *hw_data,struct chan_info channel); +void RFSynthesizer_SwitchingChannel (struct hw_data *hw_data, +struct chan_info channel);void BBProcessor_initial (struct hw_data *hw_data);void BBProcessor_RateChanging (struct hw_data *hw_data,u8 rate);u8 RFSynthesizer_SetPowerIndex (struct hw_data *hw_data,u8 power_index);
@@ -34,10 +35,14 @@ void EEPROMTxVgaAdjust(struct hw_data *hw_data);void Wb35Reg_destroy (struct hw_data *hw_data); -unsigned char Wb35Reg_Read (struct hw_data *hw_data,u16 register_no,u32 *register_value); -unsigned char Wb35Reg_ReadSync (struct hw_data *hw_data,u16 register_no,u32 *register_value); -unsigned char Wb35Reg_Write (struct hw_data *hw_data,u16 register_no,u32 register_value); -unsigned char Wb35Reg_WriteSync (struct hw_data *hw_data,u16 register_no,u32 register_value); +unsigned char Wb35Reg_Read (struct hw_data *hw_data,u16 register_no, +u32 *register_value); +unsigned char Wb35Reg_ReadSync (struct hw_data *hw_data,u16 register_no, +u32 *register_value); +unsigned char Wb35Reg_Write (struct hw_data *hw_data,u16 register_no, +u32 register_value); +unsigned char Wb35Reg_WriteSync (struct hw_data *hw_data,u16 register_no, +u32 register_value); unsigned char Wb35Reg_WriteWithCallbackValue(struct hw_data *hw_data, u16 register_no, u32 register_value,
@@ -59,7 +64,8 @@ void CardGetMulticastBit(u8 address[MAC_ADDR_LENGTH], u8 *byte, u8 *value);u32 CardComputeCrc (u8 *buffer,u32 length);void Wb35Reg_phy_calibration (struct hw_data *hw_data); -void Wb35Reg_Update (struct hw_data *hw_data,u16 register_no,u32 register_value); +void Wb35Reg_Update (struct hw_data *hw_data,u16 register_no, +u32 register_value);unsigned char adjust_TXVGA_for_iq_mag (struct hw_data *hw_data);#endif
Signature · 1 line
1.8.1.2
PATCH 17/24 Staging: winbond: wb35reg_s: deleted space before tabulation
In reply to Iker PedrosaDeleted an space before a tabulation.
--- drivers/staging/winbond/wb35reg_s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/winbond/wb35reg_s.h +1 -1
@@ -12,7 +12,7 @@ struct hw_data;* HAL setting function * * ======================================== -* |Uxx| |Dxx| |Mxx| |BB| |RF| +* |Uxx| |Dxx| |Mxx| |BB| |RF| * ======================================== * | | * Wb35Reg_Read Wb35Reg_Write
Signature · 1 line
1.8.1.2
PATCH 18/24 Staging: winbond: wb35rx: changed sleep function from msleep to usleep
In reply to Iker PedrosaAccording to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
--- drivers/staging/winbond/wb35rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/winbond/wb35rx.c +2 -2
@@ -339,9 +339,9 @@ void Wb35Rx_destroy(struct hw_data *pHwData)struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;do { -msleep (10 );/* Delay for waiting function enter */ +usleep (10000 );/* Delay for waiting function enter */ }while (pWb35Rx->EP3vm_state !=VM_STOP ); -msleep (10 );/* Delay for waiting function exit */ +usleep (10000 );/* Delay for waiting function exit */ usb_free_urb (pWb35Rx->RxUrb);pr_debug ("Wb35Rx_destroy OK\n" );
Signature · 1 line
1.8.1.2
PATCH 19/24 Staging: winbond: wb35rx: fixed some lines over 80 characters
In reply to Iker PedrosaFixed some lines over 80 characters.
--- drivers/staging/winbond/wb35rx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/staging/winbond/wb35rx.c +5 -2
@@ -16,7 +16,8 @@#include "core.h" #include "wb35rx_f.h" -static void packet_came (struct ieee80211_hw *hw,char *pRxBufferAddress,int PacketSize) +static void packet_came (struct ieee80211_hw *hw,char *pRxBufferAddress, +int PacketSize) {struct wbsoft_priv *priv = hw->priv;struct sk_buff *skb;
@@ -306,7 +307,9 @@ static void Wb35Rx_reset_descriptor(struct hw_data *pHwData) pWb35Rx->EP3vm_state =VM_STOP ; pWb35Rx->rx_halt =0 ; -/* Initial the Queue. The last buffer is reserved for used if the Rx resource is unavailable. */ +/* Initial the Queue. The last buffer is reserved for used if the Rx +* resource is unavailable. +*/ for (i =0 ; i <MAX_USB_RX_BUFFER_NUMBER ; i++) pWb35Rx->RxOwner[i] =1 ; }
Signature · 1 line
1.8.1.2
PATCH 20/24 Staging: winbond: wb35tx: changed sleep function from msleep to usleep
In reply to Iker PedrosaAccording to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
--- drivers/staging/winbond/wb35tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/winbond/wb35tx.c +2 -2
@@ -166,9 +166,9 @@ void Wb35Tx_destroy(struct hw_data *pHwData)/* Wait for VM stop */ do { -msleep (10 );/* Delay for waiting function enter 940623.1.a */ +usleep (10000 );/* Delay for waiting function enter 940623.1.a */ }while ((pWb35Tx->EP2vm_state !=VM_STOP ) && (pWb35Tx->EP4vm_state !=VM_STOP )); -msleep (10 );/* Delay for waiting function enter 940623.1.b */ +usleep (10000 );/* Delay for waiting function enter 940623.1.b */ usb_free_urb (pWb35Tx->Tx4Urb);usb_free_urb (pWb35Tx->Tx2Urb);
Signature · 1 line
1.8.1.2
Greg KH
maintainerRe: [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep
Quoted 12 lines · Iker Pedrosa
According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
Signed-off-by Iker Pedrosa <[email protected]>--- drivers/staging/winbond/wb35tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/winbond/wb35tx.c +0
-0
drivers/staging/winbond/wb35tx.c void Wb35Tx_destroy(struct hw_data *pHwData) · line 169
Quoted 5 lines
drivers/staging/winbond/wb35tx.c +1
-1@@ -166,9 +166,9 @@ void Wb35Tx_destroy(struct hw_data *pHwData)/* Wait for VM stop */ do { - msleep(10); /* Delay for waiting function enter 940623.1.a */ + usleep(10000); /* Delay for waiting function enter 940623.1.a */
It looks like you didn't try to build this patch, as it breaks the build for me here :(
greg k-h
PATCH 21/24 Staging: winbond: wb35tx: Replace printk with netdev_err
In reply to Iker PedrosaThe previously used printk lacked the warning level, now we've got a more accurate way to know the error.
--- drivers/staging/winbond/wb35tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/winbond/wb35tx.c +4 -4
@@ -32,7 +32,7 @@ static void Wb35Tx_complete(struct urb *pUrb)struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;struct wb35_mds *pMds = &adapter->Mds; -printk ("wb35: tx complete\n" ); +netdev_err (pUrb->dev,"wb35: tx complete\n" );/* Variable setting */ pWb35Tx->EP4vm_state =VM_COMPLETED ; pWb35Tx->EP4VM_status = pUrb->status;/* Store the last result of Irp */
@@ -49,7 +49,7 @@ static void Wb35Tx_complete(struct urb *pUrb)/* The URB is completed, check the result */ if (pWb35Tx->EP4VM_status !=0 ) { -printk ("URB submission failed\n" ); +netdev_err (pUrb->dev,"URB submission failed\n" ); pWb35Tx->EP4vm_state =VM_STOP ; goto error; }
@@ -96,7 +96,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter) pWb35Tx->EP4vm_state =VM_RUNNING ; retv =usb_submit_urb (pUrb,GFP_ATOMIC );if (retv <0 ) { -printk ("EP4 Tx Irp sending error\n" ); +netdev_err (pUrb->dev,"EP4 Tx Irp sending error\n" ); goto cleanup; }
@@ -218,7 +218,7 @@ static void Wb35Tx_EP2VM_complete(struct urb *pUrb)/* The Urb is completed, check the result */ if (pWb35Tx->EP2VM_status !=0 ) { -printk ("EP2 IoCompleteRoutine return error\n" ); +netdev_err (pUrb->dev,"EP2 IoCompleteRoutine return error\n" ); pWb35Tx->EP2vm_state =VM_STOP ; goto error; }
Signature · 1 line
1.8.1.2
PATCH 22/24 Staging: winbond: wb35tx_s: erased the spaces after opening a '['
In reply to Iker PedrosaErased the spaces that existed after opening some square brackets '['.
--- drivers/staging/winbond/wb35tx_s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/winbond/wb35tx_s.h +1 -1
@@ -12,7 +12,7 @@/* Internal variable for module */ struct wb35_tx {/* For Tx buffer */ -u8 TxBuffer[MAX_USB_TX_BUFFER_NUMBER ][MAX_USB_TX_BUFFER ]; +u8 TxBuffer[MAX_USB_TX_BUFFER_NUMBER ][MAX_USB_TX_BUFFER ];/* For Interrupt pipe */ u8 EP2_buf[MAX_INTERRUPT_LENGTH ];
Signature · 1 line
1.8.1.2
PATCH 23/24 Staging: winbond: wbusb: fixed some lines over 80 characters
In reply to Iker PedrosaFixed some lines over 80 characters.
--- drivers/staging/winbond/wbusb.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/staging/winbond/wbusb.c +11 -5
@@ -169,7 +169,8 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)Wb35Reg_Write (pHwData,0x0824 , reg->M24_MacControl); } -static void hal_set_current_channel_ex (struct hw_data *pHwData,struct chan_info channel) +static void hal_set_current_channel_ex (struct hw_data *pHwData, +struct chan_info channel) {struct wb35_reg *reg = &pHwData->reg;
@@ -186,7 +187,8 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info sizeof(struct chan_info)); } -static void hal_set_current_channel (struct hw_data *pHwData,struct chan_info channel) +static void hal_set_current_channel (struct hw_data *pHwData, +struct chan_info channel) {hal_set_current_channel_ex (pHwData, channel); }
@@ -206,7 +208,9 @@ static void hal_set_accept_broadcast(struct hw_data *pHwData, u8 enable)Wb35Reg_Write (pHwData,0x0800 , reg->M00_MacControl); } -/* For wep key error detection, we need to accept broadcast packets to be received temporary. */ +/* For wep key error detection, we need to accept broadcast packets to be +* received temporary. +*/ static void hal_set_accept_promiscuous (struct hw_data *pHwData,u8 enable) {struct wb35_reg *reg = &pHwData->reg;
@@ -290,7 +294,8 @@ static const struct ieee80211_ops wbsoft_ops = { .get_tsf = wbsoft_get_tsf, }; -static void hal_set_ethernet_address (struct hw_data *pHwData,u8 *current_address) +static void hal_set_ethernet_address (struct hw_data *pHwData, +u8 *current_address) {u32 ltmp[2 ];
@@ -305,7 +310,8 @@ static void hal_set_ethernet_address(struct hw_data *pHwData, u8 *current_addresWb35Reg_BurstWrite (pHwData,0x03e8 , ltmp,2 ,AUTO_INCREMENT ); } -static void hal_get_permanent_address (struct hw_data *pHwData,u8 *pethernet_address) +static void hal_get_permanent_address (struct hw_data *pHwData, +u8 *pethernet_address) {if (pHwData->SurpriseRemove)return ;
Signature · 1 line
1.8.1.2
Re: [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters
Quoted 12 lines · Iker Pedrosa
Fixed some lines over 80 characters.
Signed-off-by Iker Pedrosa <[email protected]>--- drivers/staging/winbond/wbusb.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)drivers/staging/winbond/wbusb.c +0
-0
drivers/staging/winbond/wbusb.c static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off) · line 173
Quoted 6 lines
drivers/staging/winbond/wbusb.c +2
-1@@ -169,7 +169,8 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)Wb35Reg_Write (pHwData,0x0824 , reg->M24_MacControl); } -static void hal_set_current_channel_ex (struct hw_data *pHwData,struct chan_info channel) +static void hal_set_current_channel_ex (struct hw_data *pHwData, +struct chan_info channel)
These should be aligned like this:
static void hal_set_current_channel_ex(struct hw_data *pHwData,
struct chan_info channel)
{
regards,
dan carpenter
PATCH 24/24 Staging: winbond: wbusb: changed sleep function from msleep to usleep
In reply to Iker PedrosaAccording to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
--- drivers/staging/winbond/wbusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/winbond/wbusb.c +1 -1
@@ -717,7 +717,7 @@ static int wb35_hw_init(struct ieee80211_hw *hw)/* Waiting for HAL setting OK */ while (!hal_idle (pHwData)) -msleep (10 ); +usleep (10000 );MTO_Init (priv);
Signature · 1 line
1.8.1.2
Btw, all the white space nit-pick I pointed out were pretty minor. I don't like making people redo stuff so you can fix anything you want to in later patches.
regards,
dan carpenter
Quoted 7 lines · On Mon, 26 Aug 2013 19:43:06 +0300 Dan Carpenter <[email protected]>…
Btw, all the white space nit-pick I pointed out were pretty minor. I don't like making people redo stuff so you can fix anything you want to in later patches.
regards,
dan carpenter
I write it down for the next series of patches but I will wait to start them until the previous are accepted.
Signature · 3 lines
Regards, Iker Pedrosa <[email protected]>
Quoted 1 line · Iker Pedrosa
Fixes some coding style issues from
drivers/staging/winbond
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html