Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: w35und: remove hw_data_t typedef

As this typedef is used everywhere in the driver, remove it in a separate
patch.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Pekka Enberg and committed by
Greg Kroah-Hartman
8e41b4b6 eb62f3ea

+196 -197
+1 -1
drivers/staging/winbond/core.h
··· 20 20 MLME_FRAME sMlmeFrame; // connect to peerSTA parameters 21 21 22 22 MTO_PARAMETERS sMtoPara; // MTO_struct ... 23 - hw_data_t sHwData; //For HAL 23 + struct hw_data sHwData; //For HAL 24 24 MDS Mds; 25 25 26 26 spinlock_t SpinLock;
+2 -2
drivers/staging/winbond/mds.c
··· 418 418 void 419 419 Mds_Tx(struct wbsoft_priv * adapter) 420 420 { 421 - phw_data_t pHwData = &adapter->sHwData; 421 + struct hw_data * pHwData = &adapter->sHwData; 422 422 PMDS pMds = &adapter->Mds; 423 423 DESCRIPTOR TxDes; 424 424 PDESCRIPTOR pTxDes = &TxDes; ··· 561 561 Mds_SendComplete(struct wbsoft_priv * adapter, PT02_DESCRIPTOR pT02) 562 562 { 563 563 PMDS pMds = &adapter->Mds; 564 - phw_data_t pHwData = &adapter->sHwData; 564 + struct hw_data * pHwData = &adapter->sHwData; 565 565 u8 PacketId = (u8)pT02->T02_Tx_PktID; 566 566 unsigned char SendOK = true; 567 567 u8 RetryCount, TxRate;
+13 -13
drivers/staging/winbond/phy_calibration.c
··· 37 37 }; 38 38 39 39 /****************** LOCAL FUNCTION DECLARATION SECTION **********************/ 40 - //void _phy_rf_write_delay(hw_data_t *phw_data); 41 - //void phy_init_rf(hw_data_t *phw_data); 40 + //void _phy_rf_write_delay(struct hw_data *phw_data); 41 + //void phy_init_rf(struct hw_data *phw_data); 42 42 43 43 /****************** FUNCTION DEFINITION SECTION *****************************/ 44 44 ··· 341 341 } 342 342 343 343 344 - void _reset_rx_cal(hw_data_t *phw_data) 344 + void _reset_rx_cal(struct hw_data *phw_data) 345 345 { 346 346 u32 val; 347 347 ··· 366 366 // 367 367 // 368 368 // ********************************************* 369 - void _rxadc_dc_offset_cancellation_winbond(hw_data_t *phw_data, u32 frequency) 369 + void _rxadc_dc_offset_cancellation_winbond(struct hw_data *phw_data, u32 frequency) 370 370 { 371 371 u32 reg_agc_ctrl3; 372 372 u32 reg_a_acq_ctrl; ··· 465 465 } 466 466 467 467 //////////////////////////////////////////////////////// 468 - void _txidac_dc_offset_cancellation_winbond(hw_data_t *phw_data) 468 + void _txidac_dc_offset_cancellation_winbond(struct hw_data *phw_data) 469 469 { 470 470 u32 reg_agc_ctrl3; 471 471 u32 reg_mode_ctrl; ··· 600 600 } 601 601 602 602 /////////////////////////////////////////////////////// 603 - void _txqdac_dc_offset_cacellation_winbond(hw_data_t *phw_data) 603 + void _txqdac_dc_offset_cacellation_winbond(struct hw_data *phw_data) 604 604 { 605 605 u32 reg_agc_ctrl3; 606 606 u32 reg_mode_ctrl; ··· 726 726 } 727 727 728 728 //20060612.1.a 20060718.1 Modify 729 - u8 _tx_iq_calibration_loop_winbond(hw_data_t *phw_data, 729 + u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data, 730 730 s32 a_2_threshold, 731 731 s32 b_2_threshold) 732 732 { ··· 1032 1032 return 1; 1033 1033 } 1034 1034 1035 - void _tx_iq_calibration_winbond(hw_data_t *phw_data) 1035 + void _tx_iq_calibration_winbond(struct hw_data *phw_data) 1036 1036 { 1037 1037 u32 reg_agc_ctrl3; 1038 1038 #ifdef _DEBUG ··· 1195 1195 } 1196 1196 1197 1197 ///////////////////////////////////////////////////////////////////////////////////////// 1198 - u8 _rx_iq_calibration_loop_winbond(hw_data_t *phw_data, u16 factor, u32 frequency) 1198 + u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 frequency) 1199 1199 { 1200 1200 u32 reg_mode_ctrl; 1201 1201 s32 iqcal_tone_i; ··· 1501 1501 ////////////////////////////////////////////////////////// 1502 1502 1503 1503 ////////////////////////////////////////////////////////////////////////// 1504 - void _rx_iq_calibration_winbond(hw_data_t *phw_data, u32 frequency) 1504 + void _rx_iq_calibration_winbond(struct hw_data *phw_data, u32 frequency) 1505 1505 { 1506 1506 // figo 20050523 marked thsi flag for can't compile for relesase 1507 1507 #ifdef _DEBUG ··· 1579 1579 } 1580 1580 1581 1581 //////////////////////////////////////////////////////////////////////// 1582 - void phy_calibration_winbond(hw_data_t *phw_data, u32 frequency) 1582 + void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency) 1583 1583 { 1584 1584 u32 reg_mode_ctrl; 1585 1585 u32 iq_alpha; ··· 1618 1618 } 1619 1619 1620 1620 //=========================== 1621 - void phy_set_rf_data( phw_data_t pHwData, u32 index, u32 value ) 1621 + void phy_set_rf_data( struct hw_data * pHwData, u32 index, u32 value ) 1622 1622 { 1623 1623 u32 ltmp=0; 1624 1624 ··· 1660 1660 } 1661 1661 1662 1662 // 20060717 modify as Bruce's mail 1663 - unsigned char adjust_TXVGA_for_iq_mag(hw_data_t *phw_data) 1663 + unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *phw_data) 1664 1664 { 1665 1665 int init_txvga = 0; 1666 1666 u32 reg_mode_ctrl;
+1 -1
drivers/staging/winbond/phy_calibration.h
··· 101 101 //#define MASK_IQCAL_IMAGE_Q 0x03FFE000 102 102 //#define SHIFT_IQCAL_IMAGE_Q(x) ((x)>>13) 103 103 104 - void phy_set_rf_data( phw_data_t pHwData, u32 index, u32 value ); 104 + void phy_set_rf_data( struct hw_data * pHwData, u32 index, u32 value ); 105 105 #define phy_init_rf( _A ) //RFSynthesizer_initial( _A ) 106 106 107 107 #endif
+28 -28
drivers/staging/winbond/reg.c
··· 915 915 // The address is stored in EthernetIDAddr. 916 916 //============================================================================================================= 917 917 void 918 - Uxx_ReadEthernetAddress( phw_data_t pHwData ) 918 + Uxx_ReadEthernetAddress( struct hw_data * pHwData ) 919 919 { 920 920 u32 ltmp; 921 921 ··· 964 964 *Value = (u8) ((u8)1 << (BitNumber % 8)); 965 965 } 966 966 967 - void Uxx_power_on_procedure( phw_data_t pHwData ) 967 + void Uxx_power_on_procedure( struct hw_data * pHwData ) 968 968 { 969 969 u32 ltmp, loop; 970 970 ··· 1008 1008 Wb35Reg_WriteSync( pHwData, 0x03f8, 0x7ff ); 1009 1009 } 1010 1010 1011 - void Set_ChanIndep_RfData_al7230_24( phw_data_t pHwData, u32 *pltmp ,char number) 1011 + void Set_ChanIndep_RfData_al7230_24( struct hw_data * pHwData, u32 *pltmp ,char number) 1012 1012 { 1013 1013 u8 i; 1014 1014 ··· 1019 1019 } 1020 1020 } 1021 1021 1022 - void Set_ChanIndep_RfData_al7230_50( phw_data_t pHwData, u32 *pltmp, char number) 1022 + void Set_ChanIndep_RfData_al7230_50( struct hw_data * pHwData, u32 *pltmp, char number) 1023 1023 { 1024 1024 u8 i; 1025 1025 ··· 1035 1035 // RFSynthesizer_initial -- 1036 1036 //============================================================================================================= 1037 1037 void 1038 - RFSynthesizer_initial(phw_data_t pHwData) 1038 + RFSynthesizer_initial(struct hw_data * pHwData) 1039 1039 { 1040 1040 u32 altmp[32]; 1041 1041 u32 * pltmp = altmp; ··· 1413 1413 } 1414 1414 } 1415 1415 1416 - void BBProcessor_AL7230_2400( phw_data_t pHwData) 1416 + void BBProcessor_AL7230_2400( struct hw_data * pHwData) 1417 1417 { 1418 1418 struct wb35_reg *reg = &pHwData->reg; 1419 1419 u32 pltmp[12]; ··· 1455 1455 1456 1456 } 1457 1457 1458 - void BBProcessor_AL7230_5000( phw_data_t pHwData) 1458 + void BBProcessor_AL7230_5000( struct hw_data * pHwData) 1459 1459 { 1460 1460 struct wb35_reg *reg = &pHwData->reg; 1461 1461 u32 pltmp[12]; ··· 1509 1509 // None. 1510 1510 //============================================================================================================= 1511 1511 void 1512 - BBProcessor_initial( phw_data_t pHwData ) 1512 + BBProcessor_initial( struct hw_data * pHwData ) 1513 1513 { 1514 1514 struct wb35_reg *reg = &pHwData->reg; 1515 1515 u32 i, pltmp[12]; ··· 1823 1823 reg->SQ3_filter[i] = 0x2f; // half of Bit 0 ~ 6 1824 1824 } 1825 1825 1826 - void set_tx_power_per_channel_max2829( phw_data_t pHwData, ChanInfo Channel) 1826 + void set_tx_power_per_channel_max2829( struct hw_data * pHwData, ChanInfo Channel) 1827 1827 { 1828 1828 RFSynthesizer_SetPowerIndex( pHwData, 100 ); // 20060620.1 Modify 1829 1829 } 1830 1830 1831 - void set_tx_power_per_channel_al2230( phw_data_t pHwData, ChanInfo Channel ) 1831 + void set_tx_power_per_channel_al2230( struct hw_data * pHwData, ChanInfo Channel ) 1832 1832 { 1833 1833 u8 index = 100; 1834 1834 ··· 1838 1838 RFSynthesizer_SetPowerIndex( pHwData, index ); 1839 1839 } 1840 1840 1841 - void set_tx_power_per_channel_al7230( phw_data_t pHwData, ChanInfo Channel) 1841 + void set_tx_power_per_channel_al7230( struct hw_data * pHwData, ChanInfo Channel) 1842 1842 { 1843 1843 u8 i, index = 100; 1844 1844 ··· 1868 1868 RFSynthesizer_SetPowerIndex( pHwData, index ); 1869 1869 } 1870 1870 1871 - void set_tx_power_per_channel_wb242( phw_data_t pHwData, ChanInfo Channel) 1871 + void set_tx_power_per_channel_wb242( struct hw_data * pHwData, ChanInfo Channel) 1872 1872 { 1873 1873 u8 index = 100; 1874 1874 ··· 1901 1901 // None. 1902 1902 //============================================================================================================= 1903 1903 void 1904 - RFSynthesizer_SwitchingChannel( phw_data_t pHwData, ChanInfo Channel ) 1904 + RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ) 1905 1905 { 1906 1906 struct wb35_reg *reg = &pHwData->reg; 1907 1907 u32 pltmp[16]; // The 16 is the maximum capability of hardware ··· 2129 2129 } 2130 2130 2131 2131 //Set the tx power directly from DUT GUI, not from the EEPROM. Return the current setting 2132 - u8 RFSynthesizer_SetPowerIndex( phw_data_t pHwData, u8 PowerIndex ) 2132 + u8 RFSynthesizer_SetPowerIndex( struct hw_data * pHwData, u8 PowerIndex ) 2133 2133 { 2134 2134 u32 Band = pHwData->band; 2135 2135 u8 index=0; ··· 2187 2187 } 2188 2188 2189 2189 //-- Sub function 2190 - u8 RFSynthesizer_SetMaxim2828_24Power( phw_data_t pHwData, u8 index ) 2190 + u8 RFSynthesizer_SetMaxim2828_24Power( struct hw_data * pHwData, u8 index ) 2191 2191 { 2192 2192 u32 PowerData; 2193 2193 if( index > 1 ) index = 1; ··· 2196 2196 return index; 2197 2197 } 2198 2198 //-- 2199 - u8 RFSynthesizer_SetMaxim2828_50Power( phw_data_t pHwData, u8 index ) 2199 + u8 RFSynthesizer_SetMaxim2828_50Power( struct hw_data * pHwData, u8 index ) 2200 2200 { 2201 2201 u32 PowerData; 2202 2202 if( index > 1 ) index = 1; ··· 2205 2205 return index; 2206 2206 } 2207 2207 //-- 2208 - u8 RFSynthesizer_SetMaxim2827_24Power( phw_data_t pHwData, u8 index ) 2208 + u8 RFSynthesizer_SetMaxim2827_24Power( struct hw_data * pHwData, u8 index ) 2209 2209 { 2210 2210 u32 PowerData; 2211 2211 if( index > 1 ) index = 1; ··· 2214 2214 return index; 2215 2215 } 2216 2216 //-- 2217 - u8 RFSynthesizer_SetMaxim2827_50Power( phw_data_t pHwData, u8 index ) 2217 + u8 RFSynthesizer_SetMaxim2827_50Power( struct hw_data * pHwData, u8 index ) 2218 2218 { 2219 2219 u32 PowerData; 2220 2220 if( index > 1 ) index = 1; ··· 2223 2223 return index; 2224 2224 } 2225 2225 //-- 2226 - u8 RFSynthesizer_SetMaxim2825Power( phw_data_t pHwData, u8 index ) 2226 + u8 RFSynthesizer_SetMaxim2825Power( struct hw_data * pHwData, u8 index ) 2227 2227 { 2228 2228 u32 PowerData; 2229 2229 if( index > 1 ) index = 1; ··· 2232 2232 return index; 2233 2233 } 2234 2234 //-- 2235 - u8 RFSynthesizer_SetAiroha2230Power( phw_data_t pHwData, u8 index ) 2235 + u8 RFSynthesizer_SetAiroha2230Power( struct hw_data * pHwData, u8 index ) 2236 2236 { 2237 2237 u32 PowerData; 2238 2238 u8 i,count; ··· 2251 2251 return i; 2252 2252 } 2253 2253 //-- 2254 - u8 RFSynthesizer_SetAiroha7230Power( phw_data_t pHwData, u8 index ) 2254 + u8 RFSynthesizer_SetAiroha7230Power( struct hw_data * pHwData, u8 index ) 2255 2255 { 2256 2256 u32 PowerData; 2257 2257 u8 i,count; ··· 2270 2270 return i; 2271 2271 } 2272 2272 2273 - u8 RFSynthesizer_SetWinbond242Power( phw_data_t pHwData, u8 index ) 2273 + u8 RFSynthesizer_SetWinbond242Power( struct hw_data * pHwData, u8 index ) 2274 2274 { 2275 2275 u32 PowerData; 2276 2276 u8 i,count; ··· 2311 2311 // Initial the hardware setting and module variable 2312 2312 // 2313 2313 //=========================================================================================================== 2314 - void Dxx_initial( phw_data_t pHwData ) 2314 + void Dxx_initial( struct hw_data * pHwData ) 2315 2315 { 2316 2316 struct wb35_reg *reg = &pHwData->reg; 2317 2317 ··· 2325 2325 Wb35Reg_WriteSync( pHwData, 0x0400, reg->D00_DmaControl ); 2326 2326 } 2327 2327 2328 - void Mxx_initial( phw_data_t pHwData ) 2328 + void Mxx_initial( struct hw_data * pHwData ) 2329 2329 { 2330 2330 struct wb35_reg *reg = &pHwData->reg; 2331 2331 u32 tmp; ··· 2416 2416 } 2417 2417 2418 2418 2419 - void Uxx_power_off_procedure( phw_data_t pHwData ) 2419 + void Uxx_power_off_procedure( struct hw_data * pHwData ) 2420 2420 { 2421 2421 // SW, PMU reset and turn off clock 2422 2422 Wb35Reg_WriteSync( pHwData, 0x03b0, 3 ); ··· 2424 2424 } 2425 2425 2426 2426 //Decide the TxVga of every channel 2427 - void GetTxVgaFromEEPROM( phw_data_t pHwData ) 2427 + void GetTxVgaFromEEPROM( struct hw_data * pHwData ) 2428 2428 { 2429 2429 u32 i, j, ltmp; 2430 2430 u16 Value[MAX_TXVGA_EEPROM]; ··· 2478 2478 // or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect. 2479 2479 // TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35 2480 2480 // This function will use default TxVgaSettingInEEPROM data to calculate new TxVga. 2481 - void EEPROMTxVgaAdjust( phw_data_t pHwData ) // 20060619.5 Add 2481 + void EEPROMTxVgaAdjust( struct hw_data * pHwData ) // 20060619.5 Add 2482 2482 { 2483 2483 u8 * pTxVga = pHwData->TxVgaSettingInEEPROM; 2484 2484 s16 i, stmp; ··· 2618 2618 #endif 2619 2619 } 2620 2620 2621 - void BBProcessor_RateChanging( phw_data_t pHwData, u8 rate ) // 20060613.1 2621 + void BBProcessor_RateChanging( struct hw_data * pHwData, u8 rate ) // 20060613.1 2622 2622 { 2623 2623 struct wb35_reg *reg = &pHwData->reg; 2624 2624 unsigned char Is11bRate;
+14 -14
drivers/staging/winbond/wb35reg.c
··· 3 3 4 4 #include <linux/usb.h> 5 5 6 - extern void phy_calibration_winbond(hw_data_t *phw_data, u32 frequency); 6 + extern void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency); 7 7 8 8 // true : read command process successfully 9 9 // false : register not support ··· 13 13 // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4 14 14 // NO_INCREMENT - Function will write data into the same register 15 15 unsigned char 16 - Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag) 16 + Wb35Reg_BurstWrite(struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag) 17 17 { 18 18 struct wb35_reg *reg = &pHwData->reg; 19 19 struct urb *urb = NULL; ··· 73 73 } 74 74 75 75 void 76 - Wb35Reg_Update(phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue) 76 + Wb35Reg_Update(struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue) 77 77 { 78 78 struct wb35_reg *reg = &pHwData->reg; 79 79 switch (RegisterNo) { ··· 118 118 // true : read command process successfully 119 119 // false : register not support 120 120 unsigned char 121 - Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) 121 + Wb35Reg_WriteSync( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ) 122 122 { 123 123 struct wb35_reg *reg = &pHwData->reg; 124 124 int ret = -1; ··· 162 162 // true : read command process successfully 163 163 // false : register not support 164 164 unsigned char 165 - Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) 165 + Wb35Reg_Write( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ) 166 166 { 167 167 struct wb35_reg *reg = &pHwData->reg; 168 168 struct usb_ctrlrequest *dr; ··· 222 222 // true : read command process successfully 223 223 // false : register not support 224 224 unsigned char 225 - Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue, 225 + Wb35Reg_WriteWithCallbackValue( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue, 226 226 s8 *pValue, s8 Len) 227 227 { 228 228 struct wb35_reg *reg = &pHwData->reg; ··· 281 281 // false : register not support 282 282 // pRegisterValue : It must be a resident buffer due to asynchronous read register. 283 283 unsigned char 284 - Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) 284 + Wb35Reg_ReadSync( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ) 285 285 { 286 286 struct wb35_reg *reg = &pHwData->reg; 287 287 u32 * pltmp = pRegisterValue; ··· 330 330 // false : register not support 331 331 // pRegisterValue : It must be a resident buffer due to asynchronous read register. 332 332 unsigned char 333 - Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) 333 + Wb35Reg_Read(struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ) 334 334 { 335 335 struct wb35_reg *reg = &pHwData->reg; 336 336 struct usb_ctrlrequest * dr; ··· 385 385 386 386 387 387 void 388 - Wb35Reg_EP0VM_start( phw_data_t pHwData ) 388 + Wb35Reg_EP0VM_start( struct hw_data * pHwData ) 389 389 { 390 390 struct wb35_reg *reg = &pHwData->reg; 391 391 ··· 397 397 } 398 398 399 399 void 400 - Wb35Reg_EP0VM(phw_data_t pHwData ) 400 + Wb35Reg_EP0VM(struct hw_data * pHwData ) 401 401 { 402 402 struct wb35_reg *reg = &pHwData->reg; 403 403 struct urb *urb; ··· 457 457 void 458 458 Wb35Reg_EP0VM_complete(struct urb *urb) 459 459 { 460 - phw_data_t pHwData = (phw_data_t)urb->context; 460 + struct hw_data * pHwData = (struct hw_data *)urb->context; 461 461 struct wb35_reg *reg = &pHwData->reg; 462 462 struct wb35_reg_queue *reg_queue; 463 463 ··· 499 499 500 500 501 501 void 502 - Wb35Reg_destroy(phw_data_t pHwData) 502 + Wb35Reg_destroy(struct hw_data * pHwData) 503 503 { 504 504 struct wb35_reg *reg = &pHwData->reg; 505 505 struct urb *urb; ··· 542 542 //==================================================================================== 543 543 // The function can be run in passive-level only. 544 544 //==================================================================================== 545 - unsigned char Wb35Reg_initial(phw_data_t pHwData) 545 + unsigned char Wb35Reg_initial(struct hw_data * pHwData) 546 546 { 547 547 struct wb35_reg *reg=&pHwData->reg; 548 548 u32 ltmp; ··· 722 722 return dwData; 723 723 } 724 724 725 - void Wb35Reg_phy_calibration( phw_data_t pHwData ) 725 + void Wb35Reg_phy_calibration( struct hw_data * pHwData ) 726 726 { 727 727 u32 BB3c, BB54; 728 728
+35 -35
drivers/staging/winbond/wb35reg_f.h
··· 6 6 //==================================== 7 7 // Interface function declare 8 8 //==================================== 9 - unsigned char Wb35Reg_initial( phw_data_t pHwData ); 10 - void Uxx_power_on_procedure( phw_data_t pHwData ); 11 - void Uxx_power_off_procedure( phw_data_t pHwData ); 12 - void Uxx_ReadEthernetAddress( phw_data_t pHwData ); 13 - void Dxx_initial( phw_data_t pHwData ); 14 - void Mxx_initial( phw_data_t pHwData ); 15 - void RFSynthesizer_initial( phw_data_t pHwData ); 16 - //void RFSynthesizer_SwitchingChannel( phw_data_t pHwData, s8 Channel ); 17 - void RFSynthesizer_SwitchingChannel( phw_data_t pHwData, ChanInfo Channel ); 18 - void BBProcessor_initial( phw_data_t pHwData ); 19 - void BBProcessor_RateChanging( phw_data_t pHwData, u8 rate ); // 20060613.1 20 - //void RF_RateChanging( phw_data_t pHwData, u8 rate ); // 20060626.5.c Add 21 - u8 RFSynthesizer_SetPowerIndex( phw_data_t pHwData, u8 PowerIndex ); 22 - u8 RFSynthesizer_SetMaxim2828_24Power( phw_data_t, u8 index ); 23 - u8 RFSynthesizer_SetMaxim2828_50Power( phw_data_t, u8 index ); 24 - u8 RFSynthesizer_SetMaxim2827_24Power( phw_data_t, u8 index ); 25 - u8 RFSynthesizer_SetMaxim2827_50Power( phw_data_t, u8 index ); 26 - u8 RFSynthesizer_SetMaxim2825Power( phw_data_t, u8 index ); 27 - u8 RFSynthesizer_SetAiroha2230Power( phw_data_t, u8 index ); 28 - u8 RFSynthesizer_SetAiroha7230Power( phw_data_t, u8 index ); 29 - u8 RFSynthesizer_SetWinbond242Power( phw_data_t, u8 index ); 30 - void GetTxVgaFromEEPROM( phw_data_t pHwData ); 31 - void EEPROMTxVgaAdjust( phw_data_t pHwData ); // 20060619.5 Add 9 + unsigned char Wb35Reg_initial( struct hw_data * pHwData ); 10 + void Uxx_power_on_procedure( struct hw_data * pHwData ); 11 + void Uxx_power_off_procedure( struct hw_data * pHwData ); 12 + void Uxx_ReadEthernetAddress( struct hw_data * pHwData ); 13 + void Dxx_initial( struct hw_data * pHwData ); 14 + void Mxx_initial( struct hw_data * pHwData ); 15 + void RFSynthesizer_initial( struct hw_data * pHwData ); 16 + //void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, s8 Channel ); 17 + void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ); 18 + void BBProcessor_initial( struct hw_data * pHwData ); 19 + void BBProcessor_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060613.1 20 + //void RF_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060626.5.c Add 21 + u8 RFSynthesizer_SetPowerIndex( struct hw_data * pHwData, u8 PowerIndex ); 22 + u8 RFSynthesizer_SetMaxim2828_24Power( struct hw_data *, u8 index ); 23 + u8 RFSynthesizer_SetMaxim2828_50Power( struct hw_data *, u8 index ); 24 + u8 RFSynthesizer_SetMaxim2827_24Power( struct hw_data *, u8 index ); 25 + u8 RFSynthesizer_SetMaxim2827_50Power( struct hw_data *, u8 index ); 26 + u8 RFSynthesizer_SetMaxim2825Power( struct hw_data *, u8 index ); 27 + u8 RFSynthesizer_SetAiroha2230Power( struct hw_data *, u8 index ); 28 + u8 RFSynthesizer_SetAiroha7230Power( struct hw_data *, u8 index ); 29 + u8 RFSynthesizer_SetWinbond242Power( struct hw_data *, u8 index ); 30 + void GetTxVgaFromEEPROM( struct hw_data * pHwData ); 31 + void EEPROMTxVgaAdjust( struct hw_data * pHwData ); // 20060619.5 Add 32 32 33 33 #define RFWriteControlData( _A, _V ) Wb35Reg_Write( _A, 0x0864, _V ) 34 34 35 - void Wb35Reg_destroy( phw_data_t pHwData ); 35 + void Wb35Reg_destroy( struct hw_data * pHwData ); 36 36 37 - unsigned char Wb35Reg_Read( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ); 38 - unsigned char Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ); 39 - unsigned char Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); 40 - unsigned char Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); 41 - unsigned char Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, 37 + unsigned char Wb35Reg_Read( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); 38 + unsigned char Wb35Reg_ReadSync( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); 39 + unsigned char Wb35Reg_Write( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); 40 + unsigned char Wb35Reg_WriteSync( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); 41 + unsigned char Wb35Reg_WriteWithCallbackValue( struct hw_data * pHwData, 42 42 u16 RegisterNo, 43 43 u32 RegisterValue, 44 44 s8 *pValue, 45 45 s8 Len); 46 - unsigned char Wb35Reg_BurstWrite( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag ); 46 + unsigned char Wb35Reg_BurstWrite( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterData, u8 NumberOfData, u8 Flag ); 47 47 48 - void Wb35Reg_EP0VM( phw_data_t pHwData ); 49 - void Wb35Reg_EP0VM_start( phw_data_t pHwData ); 48 + void Wb35Reg_EP0VM( struct hw_data * pHwData ); 49 + void Wb35Reg_EP0VM_start( struct hw_data * pHwData ); 50 50 void Wb35Reg_EP0VM_complete(struct urb *urb); 51 51 52 52 u32 BitReverse( u32 dwData, u32 DataLength); ··· 54 54 void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); 55 55 u32 CardComputeCrc( u8 * Buffer, u32 Length ); 56 56 57 - void Wb35Reg_phy_calibration( phw_data_t pHwData ); 58 - void Wb35Reg_Update( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); 59 - unsigned char adjust_TXVGA_for_iq_mag( phw_data_t pHwData ); 57 + void Wb35Reg_phy_calibration( struct hw_data * pHwData ); 58 + void Wb35Reg_Update( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); 59 + unsigned char adjust_TXVGA_for_iq_mag( struct hw_data * pHwData ); 60 60 61 61 #endif
+8 -8
drivers/staging/winbond/wb35rx.c
··· 82 82 static u16 Wb35Rx_indicate(struct ieee80211_hw *hw) 83 83 { 84 84 struct wbsoft_priv *priv = hw->priv; 85 - phw_data_t pHwData = &priv->sHwData; 85 + struct hw_data * pHwData = &priv->sHwData; 86 86 DESCRIPTOR RxDes; 87 87 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 88 88 u8 * pRxBufferAddress; ··· 161 161 { 162 162 struct ieee80211_hw *hw = urb->context; 163 163 struct wbsoft_priv *priv = hw->priv; 164 - phw_data_t pHwData = &priv->sHwData; 164 + struct hw_data * pHwData = &priv->sHwData; 165 165 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 166 166 u8 * pRxBufferAddress; 167 167 u32 SizeCheck; ··· 238 238 static void Wb35Rx(struct ieee80211_hw *hw) 239 239 { 240 240 struct wbsoft_priv *priv = hw->priv; 241 - phw_data_t pHwData = &priv->sHwData; 241 + struct hw_data * pHwData = &priv->sHwData; 242 242 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 243 243 u8 * pRxBufferAddress; 244 244 struct urb *urb = pWb35Rx->RxUrb; ··· 301 301 void Wb35Rx_start(struct ieee80211_hw *hw) 302 302 { 303 303 struct wbsoft_priv *priv = hw->priv; 304 - phw_data_t pHwData = &priv->sHwData; 304 + struct hw_data * pHwData = &priv->sHwData; 305 305 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 306 306 307 307 // Allow only one thread to run into the Wb35Rx() function ··· 313 313 } 314 314 315 315 //===================================================================================== 316 - static void Wb35Rx_reset_descriptor( phw_data_t pHwData ) 316 + static void Wb35Rx_reset_descriptor( struct hw_data * pHwData ) 317 317 { 318 318 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 319 319 u32 i; ··· 329 329 pWb35Rx->RxOwner[i] = 1; 330 330 } 331 331 332 - unsigned char Wb35Rx_initial(phw_data_t pHwData) 332 + unsigned char Wb35Rx_initial(struct hw_data * pHwData) 333 333 { 334 334 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 335 335 ··· 340 340 return (!!pWb35Rx->RxUrb); 341 341 } 342 342 343 - void Wb35Rx_stop(phw_data_t pHwData) 343 + void Wb35Rx_stop(struct hw_data * pHwData) 344 344 { 345 345 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 346 346 ··· 354 354 } 355 355 356 356 // Needs process context 357 - void Wb35Rx_destroy(phw_data_t pHwData) 357 + void Wb35Rx_destroy(struct hw_data * pHwData) 358 358 { 359 359 struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; 360 360
+3 -3
drivers/staging/winbond/wb35rx_f.h
··· 7 7 //==================================== 8 8 // Interface function declare 9 9 //==================================== 10 - unsigned char Wb35Rx_initial( phw_data_t pHwData ); 11 - void Wb35Rx_destroy( phw_data_t pHwData ); 12 - void Wb35Rx_stop( phw_data_t pHwData ); 10 + unsigned char Wb35Rx_initial( struct hw_data * pHwData ); 11 + void Wb35Rx_destroy( struct hw_data * pHwData ); 12 + void Wb35Rx_stop( struct hw_data * pHwData ); 13 13 void Wb35Rx_start(struct ieee80211_hw *hw); 14 14 15 15 #endif
+11 -11
drivers/staging/winbond/wb35tx.c
··· 15 15 #include "sysdef.h" 16 16 17 17 unsigned char 18 - Wb35Tx_get_tx_buffer(phw_data_t pHwData, u8 **pBuffer) 18 + Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer) 19 19 { 20 20 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 21 21 ··· 28 28 static void Wb35Tx_complete(struct urb * pUrb) 29 29 { 30 30 struct wbsoft_priv *adapter = pUrb->context; 31 - phw_data_t pHwData = &adapter->sHwData; 31 + struct hw_data * pHwData = &adapter->sHwData; 32 32 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 33 33 PMDS pMds = &adapter->Mds; 34 34 ··· 64 64 65 65 static void Wb35Tx(struct wbsoft_priv *adapter) 66 66 { 67 - phw_data_t pHwData = &adapter->sHwData; 67 + struct hw_data * pHwData = &adapter->sHwData; 68 68 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 69 69 u8 *pTxBufferAddress; 70 70 PMDS pMds = &adapter->Mds; ··· 115 115 116 116 void Wb35Tx_start(struct wbsoft_priv *adapter) 117 117 { 118 - phw_data_t pHwData = &adapter->sHwData; 118 + struct hw_data * pHwData = &adapter->sHwData; 119 119 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 120 120 121 121 // Allow only one thread to run into function ··· 126 126 atomic_dec(&pWb35Tx->TxFireCounter); 127 127 } 128 128 129 - unsigned char Wb35Tx_initial(phw_data_t pHwData) 129 + unsigned char Wb35Tx_initial(struct hw_data * pHwData) 130 130 { 131 131 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 132 132 ··· 145 145 } 146 146 147 147 //====================================================== 148 - void Wb35Tx_stop(phw_data_t pHwData) 148 + void Wb35Tx_stop(struct hw_data * pHwData) 149 149 { 150 150 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 151 151 ··· 165 165 } 166 166 167 167 //====================================================== 168 - void Wb35Tx_destroy(phw_data_t pHwData) 168 + void Wb35Tx_destroy(struct hw_data * pHwData) 169 169 { 170 170 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 171 171 ··· 188 188 189 189 void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount) 190 190 { 191 - phw_data_t pHwData = &adapter->sHwData; 191 + struct hw_data * pHwData = &adapter->sHwData; 192 192 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 193 193 unsigned char Trigger = false; 194 194 ··· 208 208 static void Wb35Tx_EP2VM_complete(struct urb * pUrb) 209 209 { 210 210 struct wbsoft_priv *adapter = pUrb->context; 211 - phw_data_t pHwData = &adapter->sHwData; 211 + struct hw_data * pHwData = &adapter->sHwData; 212 212 T02_DESCRIPTOR T02, TSTATUS; 213 213 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 214 214 u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; ··· 256 256 257 257 static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter) 258 258 { 259 - phw_data_t pHwData = &adapter->sHwData; 259 + struct hw_data * pHwData = &adapter->sHwData; 260 260 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 261 261 struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; 262 262 u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; ··· 292 292 293 293 void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter) 294 294 { 295 - phw_data_t pHwData = &adapter->sHwData; 295 + struct hw_data * pHwData = &adapter->sHwData; 296 296 struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; 297 297 298 298 // Allow only one thread to run into function
+4 -4
drivers/staging/winbond/wb35tx_f.h
··· 7 7 //==================================== 8 8 // Interface function declare 9 9 //==================================== 10 - unsigned char Wb35Tx_initial( phw_data_t pHwData ); 11 - void Wb35Tx_destroy( phw_data_t pHwData ); 12 - unsigned char Wb35Tx_get_tx_buffer( phw_data_t pHwData, u8 **pBuffer ); 10 + unsigned char Wb35Tx_initial( struct hw_data * pHwData ); 11 + void Wb35Tx_destroy( struct hw_data * pHwData ); 12 + unsigned char Wb35Tx_get_tx_buffer( struct hw_data * pHwData, u8 **pBuffer ); 13 13 14 14 void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter); 15 15 16 16 void Wb35Tx_start(struct wbsoft_priv *adapter); 17 - void Wb35Tx_stop( phw_data_t pHwData ); 17 + void Wb35Tx_stop( struct hw_data * pHwData ); 18 18 19 19 void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount); 20 20
+21 -21
drivers/staging/winbond/wbhal.c
··· 2 2 #include "wbhal_f.h" 3 3 #include "wblinux_f.h" 4 4 5 - void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ) 5 + void hal_set_ethernet_address( struct hw_data * pHwData, u8 *current_address ) 6 6 { 7 7 u32 ltmp[2]; 8 8 ··· 16 16 Wb35Reg_BurstWrite( pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT ); 17 17 } 18 18 19 - void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ) 19 + void hal_get_permanent_address( struct hw_data * pHwData, u8 *pethernet_address ) 20 20 { 21 21 if( pHwData->SurpriseRemove ) return; 22 22 ··· 26 26 static void hal_led_control(unsigned long data) 27 27 { 28 28 struct wbsoft_priv *adapter = (struct wbsoft_priv *) data; 29 - phw_data_t pHwData = &adapter->sHwData; 29 + struct hw_data * pHwData = &adapter->sHwData; 30 30 struct wb35_reg *reg = &pHwData->reg; 31 31 u32 LEDSet = (pHwData->SoftwareSet & HAL_LED_SET_MASK) >> HAL_LED_SET_SHIFT; 32 32 u8 LEDgray[20] = { 0,3,4,6,8,10,11,12,13,14,15,14,13,12,11,10,8,6,4,2 }; ··· 311 311 u8 hal_init_hardware(struct ieee80211_hw *hw) 312 312 { 313 313 struct wbsoft_priv *priv = hw->priv; 314 - phw_data_t pHwData = &priv->sHwData; 314 + struct hw_data * pHwData = &priv->sHwData; 315 315 u16 SoftwareSet; 316 316 317 317 // Initial the variable ··· 356 356 } 357 357 358 358 359 - void hal_halt(phw_data_t pHwData, void *ppa_data) 359 + void hal_halt(struct hw_data * pHwData, void *ppa_data) 360 360 { 361 361 switch( pHwData->InitialResource ) 362 362 { ··· 370 370 } 371 371 372 372 //--------------------------------------------------------------------------------------------------- 373 - void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ) 373 + void hal_set_beacon_period( struct hw_data * pHwData, u16 beacon_period ) 374 374 { 375 375 u32 tmp; 376 376 ··· 383 383 } 384 384 385 385 386 - static void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ) 386 + static void hal_set_current_channel_ex( struct hw_data * pHwData, ChanInfo channel ) 387 387 { 388 388 struct wb35_reg *reg = &pHwData->reg; 389 389 ··· 404 404 (s8 *)&channel, sizeof(ChanInfo)); 405 405 } 406 406 //--------------------------------------------------------------------------------------------------- 407 - void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ) 407 + void hal_set_current_channel( struct hw_data * pHwData, ChanInfo channel ) 408 408 { 409 409 hal_set_current_channel_ex( pHwData, channel ); 410 410 } 411 411 //--------------------------------------------------------------------------------------------------- 412 - void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ) 412 + void hal_set_accept_broadcast( struct hw_data * pHwData, u8 enable ) 413 413 { 414 414 struct wb35_reg *reg = &pHwData->reg; 415 415 ··· 424 424 } 425 425 426 426 //for wep key error detection, we need to accept broadcast packets to be received temporary. 427 - void hal_set_accept_promiscuous( phw_data_t pHwData, u8 enable) 427 + void hal_set_accept_promiscuous( struct hw_data * pHwData, u8 enable) 428 428 { 429 429 struct wb35_reg *reg = &pHwData->reg; 430 430 ··· 438 438 } 439 439 } 440 440 441 - void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ) 441 + void hal_set_accept_multicast( struct hw_data * pHwData, u8 enable ) 442 442 { 443 443 struct wb35_reg *reg = &pHwData->reg; 444 444 ··· 449 449 Wb35Reg_Write( pHwData, 0x0800, reg->M00_MacControl ); 450 450 } 451 451 452 - void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ) 452 + void hal_set_accept_beacon( struct hw_data * pHwData, u8 enable ) 453 453 { 454 454 struct wb35_reg *reg = &pHwData->reg; 455 455 ··· 467 467 } 468 468 //--------------------------------------------------------------------------------------------------- 469 469 470 - void hal_stop( phw_data_t pHwData ) 470 + void hal_stop( struct hw_data * pHwData ) 471 471 { 472 472 struct wb35_reg *reg = &pHwData->reg; 473 473 ··· 481 481 Wb35Reg_Write( pHwData, 0x0400, reg->D00_DmaControl ); 482 482 } 483 483 484 - unsigned char hal_idle(phw_data_t pHwData) 484 + unsigned char hal_idle(struct hw_data * pHwData) 485 485 { 486 486 struct wb35_reg *reg = &pHwData->reg; 487 487 struct wb_usb *pWbUsb = &pHwData->WbUsb; ··· 492 492 return true; 493 493 } 494 494 //--------------------------------------------------------------------------------------------------- 495 - void hal_set_phy_type( phw_data_t pHwData, u8 PhyType ) 495 + void hal_set_phy_type( struct hw_data * pHwData, u8 PhyType ) 496 496 { 497 497 pHwData->phy_type = PhyType; 498 498 } 499 499 500 - void hal_set_radio_mode( phw_data_t pHwData, unsigned char radio_off) 500 + void hal_set_radio_mode( struct hw_data * pHwData, unsigned char radio_off) 501 501 { 502 502 struct wb35_reg *reg = &pHwData->reg; 503 503 ··· 516 516 Wb35Reg_Write( pHwData, 0x0824, reg->M24_MacControl ); 517 517 } 518 518 519 - u8 hal_get_antenna_number( phw_data_t pHwData ) 519 + u8 hal_get_antenna_number( struct hw_data * pHwData ) 520 520 { 521 521 struct wb35_reg *reg = &pHwData->reg; 522 522 ··· 528 528 529 529 //---------------------------------------------------------------------------------------------------- 530 530 //0 : radio on; 1: radio off 531 - u8 hal_get_hw_radio_off( phw_data_t pHwData ) 531 + u8 hal_get_hw_radio_off( struct hw_data * pHwData ) 532 532 { 533 533 struct wb35_reg *reg = &pHwData->reg; 534 534 ··· 545 545 } 546 546 } 547 547 548 - unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ) 548 + unsigned char hal_get_dxx_reg( struct hw_data * pHwData, u16 number, u32 * pValue ) 549 549 { 550 550 if( number < 0x1000 ) 551 551 number += 0x1000; 552 552 return Wb35Reg_ReadSync( pHwData, number, pValue ); 553 553 } 554 554 555 - unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ) 555 + unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 value ) 556 556 { 557 557 unsigned char ret; 558 558 ··· 562 562 return ret; 563 563 } 564 564 565 - void hal_set_rf_power(phw_data_t pHwData, u8 PowerIndex) 565 + void hal_set_rf_power(struct hw_data * pHwData, u8 PowerIndex) 566 566 { 567 567 RFSynthesizer_SetPowerIndex( pHwData, PowerIndex ); 568 568 }
+47 -47
drivers/staging/winbond/wbhal_f.h
··· 10 10 //==================================================================================== 11 11 // Function declaration 12 12 //==================================================================================== 13 - void hal_remove_mapping_key( phw_data_t pHwData, u8 *pmac_addr ); 14 - void hal_remove_default_key( phw_data_t pHwData, u32 index ); 15 - unsigned char hal_set_mapping_key( phw_data_t adapter, u8 *pmac_addr, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 16 - unsigned char hal_set_default_key( phw_data_t adapter, u8 index, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 17 - void hal_clear_all_default_key( phw_data_t pHwData ); 18 - void hal_clear_all_group_key( phw_data_t pHwData ); 19 - void hal_clear_all_mapping_key( phw_data_t pHwData ); 20 - void hal_clear_all_key( phw_data_t pHwData ); 21 - void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address ); 22 - void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ); 23 - void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ); 13 + void hal_remove_mapping_key( struct hw_data * pHwData, u8 *pmac_addr ); 14 + void hal_remove_default_key( struct hw_data * pHwData, u32 index ); 15 + unsigned char hal_set_mapping_key( struct hw_data * adapter, u8 *pmac_addr, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 16 + unsigned char hal_set_default_key( struct hw_data * adapter, u8 index, u8 null_key, u8 wep_on, u8 *ptx_tsc, u8 *prx_tsc, u8 key_type, u8 key_len, u8 *pkey_data ); 17 + void hal_clear_all_default_key( struct hw_data * pHwData ); 18 + void hal_clear_all_group_key( struct hw_data * pHwData ); 19 + void hal_clear_all_mapping_key( struct hw_data * pHwData ); 20 + void hal_clear_all_key( struct hw_data * pHwData ); 21 + void hal_get_ethernet_address( struct hw_data * pHwData, u8 *current_address ); 22 + void hal_set_ethernet_address( struct hw_data * pHwData, u8 *current_address ); 23 + void hal_get_permanent_address( struct hw_data * pHwData, u8 *pethernet_address ); 24 24 u8 hal_init_hardware(struct ieee80211_hw *hw); 25 - void hal_set_power_save_mode( phw_data_t pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); 26 - void hal_get_power_save_mode( phw_data_t pHwData, u8 *pin_pwr_save ); 27 - void hal_set_slot_time( phw_data_t pHwData, u8 type ); 25 + void hal_set_power_save_mode( struct hw_data * pHwData, unsigned char power_save, unsigned char wakeup, unsigned char dtim ); 26 + void hal_get_power_save_mode( struct hw_data * pHwData, u8 *pin_pwr_save ); 27 + void hal_set_slot_time( struct hw_data * pHwData, u8 type ); 28 28 #define hal_set_atim_window( _A, _ATM ) 29 - void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); 30 - void hal_join_request( phw_data_t pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// 31 - void hal_stop_sync_bss( phw_data_t pHwData ); 32 - void hal_resume_sync_bss( phw_data_t pHwData); 33 - void hal_set_aid( phw_data_t pHwData, u16 aid ); 34 - void hal_set_bssid( phw_data_t pHwData, u8 *pbssid ); 35 - void hal_get_bssid( phw_data_t pHwData, u8 *pbssid ); 36 - void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); 37 - void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); 38 - void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); 39 - void hal_set_ssid( phw_data_t pHwData, u8 *pssid, u8 ssid_len ); 40 - void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); 41 - void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); 42 - void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); 43 - void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); 44 - void hal_stop( phw_data_t pHwData ); 45 - void hal_halt( phw_data_t pHwData, void *ppa_data ); 46 - void hal_start_tx0( phw_data_t pHwData ); 47 - void hal_set_phy_type( phw_data_t pHwData, u8 PhyType ); 29 + void hal_start_bss( struct hw_data * pHwData, u8 mac_op_mode ); 30 + void hal_join_request( struct hw_data * pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// 31 + void hal_stop_sync_bss( struct hw_data * pHwData ); 32 + void hal_resume_sync_bss( struct hw_data * pHwData); 33 + void hal_set_aid( struct hw_data * pHwData, u16 aid ); 34 + void hal_set_bssid( struct hw_data * pHwData, u8 *pbssid ); 35 + void hal_get_bssid( struct hw_data * pHwData, u8 *pbssid ); 36 + void hal_set_beacon_period( struct hw_data * pHwData, u16 beacon_period ); 37 + void hal_set_listen_interval( struct hw_data * pHwData, u16 listen_interval ); 38 + void hal_set_cap_info( struct hw_data * pHwData, u16 capability_info ); 39 + void hal_set_ssid( struct hw_data * pHwData, u8 *pssid, u8 ssid_len ); 40 + void hal_set_current_channel( struct hw_data * pHwData, ChanInfo channel ); 41 + void hal_set_accept_broadcast( struct hw_data * pHwData, u8 enable ); 42 + void hal_set_accept_multicast( struct hw_data * pHwData, u8 enable ); 43 + void hal_set_accept_beacon( struct hw_data * pHwData, u8 enable ); 44 + void hal_stop( struct hw_data * pHwData ); 45 + void hal_halt( struct hw_data * pHwData, void *ppa_data ); 46 + void hal_start_tx0( struct hw_data * pHwData ); 47 + void hal_set_phy_type( struct hw_data * pHwData, u8 PhyType ); 48 48 #define hal_get_cwmin( _A ) ( (_A)->cwmin ) 49 - void hal_set_cwmax( phw_data_t pHwData, u16 cwin_max ); 49 + void hal_set_cwmax( struct hw_data * pHwData, u16 cwin_max ); 50 50 #define hal_get_cwmax( _A ) ( (_A)->cwmax ) 51 - void hal_set_rsn_wpa( phw_data_t pHwData, u32 * RSN_IE_Bitmap , u32 * RSN_OUI_type , unsigned char bDesiredAuthMode); 52 - void hal_set_connect_info( phw_data_t pHwData, unsigned char boConnect ); 53 - u8 hal_get_est_sq3( phw_data_t pHwData, u8 Count ); 54 - void hal_set_rf_power( phw_data_t pHwData, u8 PowerIndex ); // 20060621 Modify 55 - void hal_set_radio_mode( phw_data_t pHwData, unsigned char boValue); 56 - void hal_descriptor_indicate( phw_data_t pHwData, PDESCRIPTOR pDes ); 57 - u8 hal_get_antenna_number( phw_data_t pHwData ); 58 - u32 hal_get_bss_pk_cnt( phw_data_t pHwData ); 51 + void hal_set_rsn_wpa( struct hw_data * pHwData, u32 * RSN_IE_Bitmap , u32 * RSN_OUI_type , unsigned char bDesiredAuthMode); 52 + void hal_set_connect_info( struct hw_data * pHwData, unsigned char boConnect ); 53 + u8 hal_get_est_sq3( struct hw_data * pHwData, u8 Count ); 54 + void hal_set_rf_power( struct hw_data * pHwData, u8 PowerIndex ); // 20060621 Modify 55 + void hal_set_radio_mode( struct hw_data * pHwData, unsigned char boValue); 56 + void hal_descriptor_indicate( struct hw_data * pHwData, PDESCRIPTOR pDes ); 57 + u8 hal_get_antenna_number( struct hw_data * pHwData ); 58 + u32 hal_get_bss_pk_cnt( struct hw_data * pHwData ); 59 59 #define hal_get_region_from_EEPROM( _A ) ( (_A)->reg.EEPROMRegion ) 60 - void hal_set_accept_promiscuous ( phw_data_t pHwData, u8 enable); 60 + void hal_set_accept_promiscuous ( struct hw_data * pHwData, u8 enable); 61 61 #define hal_get_tx_buffer( _A, _B ) Wb35Tx_get_tx_buffer( _A, _B ) 62 - u8 hal_get_hw_radio_off ( phw_data_t pHwData ); 62 + u8 hal_get_hw_radio_off ( struct hw_data * pHwData ); 63 63 #define hal_software_set( _A ) (_A->SoftwareSet) 64 64 #define hal_driver_init_OK( _A ) (_A->IsInitOK) 65 65 #define hal_rssi_boundary_high( _A ) (_A->RSSI_high) ··· 68 68 69 69 #define PHY_DEBUG( msg, args... ) 70 70 71 - unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ); 72 - unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); 71 + unsigned char hal_get_dxx_reg( struct hw_data * pHwData, u16 number, u32 * pValue ); 72 + unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 value ); 73 73 #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count 74 74 #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) 75 75 ··· 82 82 #define hal_get_clear_interrupt(_A) 83 83 #define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A) 84 84 #define hal_join_request_stop(_A) 85 - unsigned char hal_idle( phw_data_t pHwData ); 85 + unsigned char hal_idle( struct hw_data * pHwData ); 86 86 #define hw_get_cxx_reg( _A, _B, _C ) 87 87 #define hw_set_cxx_reg( _A, _B, _C ) 88 88 #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C )
+2 -3
drivers/staging/winbond/wbhal_s.h
··· 392 392 #include "wb35rx_s.h" 393 393 394 394 // For Hal using ================================================================== 395 - typedef struct _HW_DATA_T 396 - { 395 + struct hw_data { 397 396 // For compatible with 33 398 397 u32 revision; 399 398 u32 BB3c_cal; // The value for Tx calibration comes from EEPROM ··· 540 541 // 20060828.1 for avoid AP disconnect 541 542 u32 NullPacketCount; 542 543 543 - } hw_data_t, *phw_data_t; 544 + }; 544 545 545 546 #endif
+6 -6
drivers/staging/winbond/wbusb.c
··· 149 149 hal_set_current_channel(&priv->sHwData, ch); 150 150 hal_set_beacon_period(&priv->sHwData, conf->beacon_int); 151 151 // hal_set_cap_info(&priv->sHwData, ?? ); 152 - // hal_set_ssid(phw_data_t pHwData, u8 * pssid, u8 ssid_len); ?? 152 + // hal_set_ssid(struct hw_data * pHwData, u8 * pssid, u8 ssid_len); ?? 153 153 hal_set_accept_broadcast(&priv->sHwData, 1); 154 154 hal_set_accept_promiscuous(&priv->sHwData, 1); 155 155 hal_set_accept_multicast(&priv->sHwData, 1); 156 156 hal_set_accept_beacon(&priv->sHwData, 1); 157 157 hal_set_radio_mode(&priv->sHwData, 0); 158 - //hal_set_antenna_number( phw_data_t pHwData, u8 number ) 159 - //hal_set_rf_power(phw_data_t pHwData, u8 PowerIndex) 158 + //hal_set_antenna_number( struct hw_data * pHwData, u8 number ) 159 + //hal_set_rf_power(struct hw_data * pHwData, u8 PowerIndex) 160 160 161 161 162 162 // hal_start_bss(&priv->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ?? 163 163 164 - //void hal_set_rates(phw_data_t pHwData, u8 * pbss_rates, 164 + //void hal_set_rates(struct hw_data * pHwData, u8 * pbss_rates, 165 165 // u8 length, unsigned char basic_rate_set) 166 166 167 167 return 0; ··· 199 199 static unsigned char wb35_hw_init(struct ieee80211_hw *hw) 200 200 { 201 201 struct wbsoft_priv *priv = hw->priv; 202 - phw_data_t pHwData; 202 + struct hw_data * pHwData; 203 203 u8 *pMacAddr; 204 204 u8 *pMacAddr2; 205 205 u32 InitStep = 0; ··· 366 366 367 367 SET_IEEE80211_DEV(dev, &udev->dev); 368 368 { 369 - phw_data_t pHwData = &priv->sHwData; 369 + struct hw_data * pHwData = &priv->sHwData; 370 370 unsigned char dev_addr[MAX_ADDR_LEN]; 371 371 hal_get_permanent_address(pHwData, dev_addr); 372 372 SET_IEEE80211_PERM_ADDR(dev, dev_addr);