diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-01-12 11:02:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 17:53:16 -0400 |
commit | 8e41b4b65d20f1321bc969b5de6038d5be33c9bd (patch) | |
tree | 50ef043ff50673f5a1c4db6be18fc8d929217cf4 /drivers/staging | |
parent | eb62f3eaf7ff1e021a0f066a0f04ee45d0d1eadb (diff) |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/winbond/core.h | 2 | ||||
-rw-r--r-- | drivers/staging/winbond/mds.c | 4 | ||||
-rw-r--r-- | drivers/staging/winbond/phy_calibration.c | 26 | ||||
-rw-r--r-- | drivers/staging/winbond/phy_calibration.h | 2 | ||||
-rw-r--r-- | drivers/staging/winbond/reg.c | 56 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35reg.c | 28 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35reg_f.h | 70 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35rx.c | 16 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35rx_f.h | 6 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35tx.c | 22 | ||||
-rw-r--r-- | drivers/staging/winbond/wb35tx_f.h | 8 | ||||
-rw-r--r-- | drivers/staging/winbond/wbhal.c | 42 | ||||
-rw-r--r-- | drivers/staging/winbond/wbhal_f.h | 94 | ||||
-rw-r--r-- | drivers/staging/winbond/wbhal_s.h | 5 | ||||
-rw-r--r-- | drivers/staging/winbond/wbusb.c | 12 |
15 files changed, 196 insertions, 197 deletions
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h index cf59a7a24ae..cd6a419646f 100644 --- a/drivers/staging/winbond/core.h +++ b/drivers/staging/winbond/core.h | |||
@@ -20,7 +20,7 @@ struct wbsoft_priv { | |||
20 | MLME_FRAME sMlmeFrame; // connect to peerSTA parameters | 20 | MLME_FRAME sMlmeFrame; // connect to peerSTA parameters |
21 | 21 | ||
22 | MTO_PARAMETERS sMtoPara; // MTO_struct ... | 22 | MTO_PARAMETERS sMtoPara; // MTO_struct ... |
23 | hw_data_t sHwData; //For HAL | 23 | struct hw_data sHwData; //For HAL |
24 | MDS Mds; | 24 | MDS Mds; |
25 | 25 | ||
26 | spinlock_t SpinLock; | 26 | spinlock_t SpinLock; |
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c index 9a1483678e2..59cdba8592b 100644 --- a/drivers/staging/winbond/mds.c +++ b/drivers/staging/winbond/mds.c | |||
@@ -418,7 +418,7 @@ static void Mds_HeaderCopy(struct wbsoft_priv * adapter, PDESCRIPTOR pDes, u8 *T | |||
418 | void | 418 | void |
419 | Mds_Tx(struct wbsoft_priv * adapter) | 419 | Mds_Tx(struct wbsoft_priv * adapter) |
420 | { | 420 | { |
421 | phw_data_t pHwData = &adapter->sHwData; | 421 | struct hw_data * pHwData = &adapter->sHwData; |
422 | PMDS pMds = &adapter->Mds; | 422 | PMDS pMds = &adapter->Mds; |
423 | DESCRIPTOR TxDes; | 423 | DESCRIPTOR TxDes; |
424 | PDESCRIPTOR pTxDes = &TxDes; | 424 | PDESCRIPTOR pTxDes = &TxDes; |
@@ -561,7 +561,7 @@ void | |||
561 | Mds_SendComplete(struct wbsoft_priv * adapter, PT02_DESCRIPTOR pT02) | 561 | Mds_SendComplete(struct wbsoft_priv * adapter, PT02_DESCRIPTOR pT02) |
562 | { | 562 | { |
563 | PMDS pMds = &adapter->Mds; | 563 | PMDS pMds = &adapter->Mds; |
564 | phw_data_t pHwData = &adapter->sHwData; | 564 | struct hw_data * pHwData = &adapter->sHwData; |
565 | u8 PacketId = (u8)pT02->T02_Tx_PktID; | 565 | u8 PacketId = (u8)pT02->T02_Tx_PktID; |
566 | unsigned char SendOK = true; | 566 | unsigned char SendOK = true; |
567 | u8 RetryCount, TxRate; | 567 | u8 RetryCount, TxRate; |
diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c index b56a2a94961..af8c01e313b 100644 --- a/drivers/staging/winbond/phy_calibration.c +++ b/drivers/staging/winbond/phy_calibration.c | |||
@@ -37,8 +37,8 @@ static const fixed Angles[]= | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | /****************** LOCAL FUNCTION DECLARATION SECTION **********************/ | 39 | /****************** LOCAL FUNCTION DECLARATION SECTION **********************/ |
40 | //void _phy_rf_write_delay(hw_data_t *phw_data); | 40 | //void _phy_rf_write_delay(struct hw_data *phw_data); |
41 | //void phy_init_rf(hw_data_t *phw_data); | 41 | //void phy_init_rf(struct hw_data *phw_data); |
42 | 42 | ||
43 | /****************** FUNCTION DEFINITION SECTION *****************************/ | 43 | /****************** FUNCTION DEFINITION SECTION *****************************/ |
44 | 44 | ||
@@ -341,7 +341,7 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos) | |||
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 | u32 val; | 346 | u32 val; |
347 | 347 | ||
@@ -366,7 +366,7 @@ void _reset_rx_cal(hw_data_t *phw_data) | |||
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 | u32 reg_agc_ctrl3; | 371 | u32 reg_agc_ctrl3; |
372 | u32 reg_a_acq_ctrl; | 372 | u32 reg_a_acq_ctrl; |
@@ -465,7 +465,7 @@ void _rxadc_dc_offset_cancellation_winbond(hw_data_t *phw_data, u32 frequency) | |||
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 | u32 reg_agc_ctrl3; | 470 | u32 reg_agc_ctrl3; |
471 | u32 reg_mode_ctrl; | 471 | u32 reg_mode_ctrl; |
@@ -600,7 +600,7 @@ void _txidac_dc_offset_cancellation_winbond(hw_data_t *phw_data) | |||
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 | u32 reg_agc_ctrl3; | 605 | u32 reg_agc_ctrl3; |
606 | u32 reg_mode_ctrl; | 606 | u32 reg_mode_ctrl; |
@@ -726,7 +726,7 @@ void _txqdac_dc_offset_cacellation_winbond(hw_data_t *phw_data) | |||
726 | } | 726 | } |
727 | 727 | ||
728 | //20060612.1.a 20060718.1 Modify | 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 | s32 a_2_threshold, | 730 | s32 a_2_threshold, |
731 | s32 b_2_threshold) | 731 | s32 b_2_threshold) |
732 | { | 732 | { |
@@ -1032,7 +1032,7 @@ u8 _tx_iq_calibration_loop_winbond(hw_data_t *phw_data, | |||
1032 | return 1; | 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 | u32 reg_agc_ctrl3; | 1037 | u32 reg_agc_ctrl3; |
1038 | #ifdef _DEBUG | 1038 | #ifdef _DEBUG |
@@ -1195,7 +1195,7 @@ void _tx_iq_calibration_winbond(hw_data_t *phw_data) | |||
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 | u32 reg_mode_ctrl; | 1200 | u32 reg_mode_ctrl; |
1201 | s32 iqcal_tone_i; | 1201 | s32 iqcal_tone_i; |
@@ -1501,7 +1501,7 @@ u8 _rx_iq_calibration_loop_winbond(hw_data_t *phw_data, u16 factor, u32 frequenc | |||
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 | // figo 20050523 marked thsi flag for can't compile for relesase | 1506 | // figo 20050523 marked thsi flag for can't compile for relesase |
1507 | #ifdef _DEBUG | 1507 | #ifdef _DEBUG |
@@ -1579,7 +1579,7 @@ void _rx_iq_calibration_winbond(hw_data_t *phw_data, u32 frequency) | |||
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 | u32 reg_mode_ctrl; | 1584 | u32 reg_mode_ctrl; |
1585 | u32 iq_alpha; | 1585 | u32 iq_alpha; |
@@ -1618,7 +1618,7 @@ void phy_calibration_winbond(hw_data_t *phw_data, u32 frequency) | |||
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 | u32 ltmp=0; | 1623 | u32 ltmp=0; |
1624 | 1624 | ||
@@ -1660,7 +1660,7 @@ void phy_set_rf_data( phw_data_t pHwData, u32 index, u32 value ) | |||
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | // 20060717 modify as Bruce's mail | 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 | int init_txvga = 0; | 1665 | int init_txvga = 0; |
1666 | u32 reg_mode_ctrl; | 1666 | u32 reg_mode_ctrl; |
diff --git a/drivers/staging/winbond/phy_calibration.h b/drivers/staging/winbond/phy_calibration.h index 03b820c6181..51c8fde81e2 100644 --- a/drivers/staging/winbond/phy_calibration.h +++ b/drivers/staging/winbond/phy_calibration.h | |||
@@ -101,7 +101,7 @@ | |||
101 | //#define MASK_IQCAL_IMAGE_Q 0x03FFE000 | 101 | //#define MASK_IQCAL_IMAGE_Q 0x03FFE000 |
102 | //#define SHIFT_IQCAL_IMAGE_Q(x) ((x)>>13) | 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 | #define phy_init_rf( _A ) //RFSynthesizer_initial( _A ) | 105 | #define phy_init_rf( _A ) //RFSynthesizer_initial( _A ) |
106 | 106 | ||
107 | #endif | 107 | #endif |
diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c index 75738c8a1d1..d915cbdd38e 100644 --- a/drivers/staging/winbond/reg.c +++ b/drivers/staging/winbond/reg.c | |||
@@ -915,7 +915,7 @@ u32 w89rf242_txvga_data[][5] = | |||
915 | // The address is stored in EthernetIDAddr. | 915 | // The address is stored in EthernetIDAddr. |
916 | //============================================================================================================= | 916 | //============================================================================================================= |
917 | void | 917 | void |
918 | Uxx_ReadEthernetAddress( phw_data_t pHwData ) | 918 | Uxx_ReadEthernetAddress( struct hw_data * pHwData ) |
919 | { | 919 | { |
920 | u32 ltmp; | 920 | u32 ltmp; |
921 | 921 | ||
@@ -964,7 +964,7 @@ void CardGetMulticastBit( u8 Address[ETH_ALEN], u8 *Byte, u8 *Value ) | |||
964 | *Value = (u8) ((u8)1 << (BitNumber % 8)); | 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 | u32 ltmp, loop; | 969 | u32 ltmp, loop; |
970 | 970 | ||
@@ -1008,7 +1008,7 @@ void Uxx_power_on_procedure( phw_data_t pHwData ) | |||
1008 | Wb35Reg_WriteSync( pHwData, 0x03f8, 0x7ff ); | 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 | u8 i; | 1013 | u8 i; |
1014 | 1014 | ||
@@ -1019,7 +1019,7 @@ void Set_ChanIndep_RfData_al7230_24( phw_data_t pHwData, u32 *pltmp ,char numbe | |||
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 | u8 i; | 1024 | u8 i; |
1025 | 1025 | ||
@@ -1035,7 +1035,7 @@ void Set_ChanIndep_RfData_al7230_50( phw_data_t pHwData, u32 *pltmp, char numbe | |||
1035 | // RFSynthesizer_initial -- | 1035 | // RFSynthesizer_initial -- |
1036 | //============================================================================================================= | 1036 | //============================================================================================================= |
1037 | void | 1037 | void |
1038 | RFSynthesizer_initial(phw_data_t pHwData) | 1038 | RFSynthesizer_initial(struct hw_data * pHwData) |
1039 | { | 1039 | { |
1040 | u32 altmp[32]; | 1040 | u32 altmp[32]; |
1041 | u32 * pltmp = altmp; | 1041 | u32 * pltmp = altmp; |
@@ -1413,7 +1413,7 @@ RFSynthesizer_initial(phw_data_t pHwData) | |||
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 | struct wb35_reg *reg = &pHwData->reg; | 1418 | struct wb35_reg *reg = &pHwData->reg; |
1419 | u32 pltmp[12]; | 1419 | u32 pltmp[12]; |
@@ -1455,7 +1455,7 @@ void BBProcessor_AL7230_2400( phw_data_t pHwData) | |||
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 | struct wb35_reg *reg = &pHwData->reg; | 1460 | struct wb35_reg *reg = &pHwData->reg; |
1461 | u32 pltmp[12]; | 1461 | u32 pltmp[12]; |
@@ -1509,7 +1509,7 @@ void BBProcessor_AL7230_5000( phw_data_t pHwData) | |||
1509 | // None. | 1509 | // None. |
1510 | //============================================================================================================= | 1510 | //============================================================================================================= |
1511 | void | 1511 | void |
1512 | BBProcessor_initial( phw_data_t pHwData ) | 1512 | BBProcessor_initial( struct hw_data * pHwData ) |
1513 | { | 1513 | { |
1514 | struct wb35_reg *reg = &pHwData->reg; | 1514 | struct wb35_reg *reg = &pHwData->reg; |
1515 | u32 i, pltmp[12]; | 1515 | u32 i, pltmp[12]; |
@@ -1823,12 +1823,12 @@ BBProcessor_initial( phw_data_t pHwData ) | |||
1823 | reg->SQ3_filter[i] = 0x2f; // half of Bit 0 ~ 6 | 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 | RFSynthesizer_SetPowerIndex( pHwData, 100 ); // 20060620.1 Modify | 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 | u8 index = 100; | 1833 | u8 index = 100; |
1834 | 1834 | ||
@@ -1838,7 +1838,7 @@ void set_tx_power_per_channel_al2230( phw_data_t pHwData, ChanInfo Channel ) | |||
1838 | RFSynthesizer_SetPowerIndex( pHwData, index ); | 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 | u8 i, index = 100; | 1843 | u8 i, index = 100; |
1844 | 1844 | ||
@@ -1868,7 +1868,7 @@ void set_tx_power_per_channel_al7230( phw_data_t pHwData, ChanInfo Channel) | |||
1868 | RFSynthesizer_SetPowerIndex( pHwData, index ); | 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 | u8 index = 100; | 1873 | u8 index = 100; |
1874 | 1874 | ||
@@ -1901,7 +1901,7 @@ void set_tx_power_per_channel_wb242( phw_data_t pHwData, ChanInfo Channel) | |||
1901 | // None. | 1901 | // None. |
1902 | //============================================================================================================= | 1902 | //============================================================================================================= |
1903 | void | 1903 | void |
1904 | RFSynthesizer_SwitchingChannel( phw_data_t pHwData, ChanInfo Channel ) | 1904 | RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ) |
1905 | { | 1905 | { |
1906 | struct wb35_reg *reg = &pHwData->reg; | 1906 | struct wb35_reg *reg = &pHwData->reg; |
1907 | u32 pltmp[16]; // The 16 is the maximum capability of hardware | 1907 | u32 pltmp[16]; // The 16 is the maximum capability of hardware |
@@ -2129,7 +2129,7 @@ RFSynthesizer_SwitchingChannel( phw_data_t pHwData, ChanInfo Channel ) | |||
2129 | } | 2129 | } |
2130 | 2130 | ||
2131 | //Set the tx power directly from DUT GUI, not from the EEPROM. Return the current setting | 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 | u32 Band = pHwData->band; | 2134 | u32 Band = pHwData->band; |
2135 | u8 index=0; | 2135 | u8 index=0; |
@@ -2187,7 +2187,7 @@ u8 RFSynthesizer_SetPowerIndex( phw_data_t pHwData, u8 PowerIndex ) | |||
2187 | } | 2187 | } |
2188 | 2188 | ||
2189 | //-- Sub function | 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 | u32 PowerData; | 2192 | u32 PowerData; |
2193 | if( index > 1 ) index = 1; | 2193 | if( index > 1 ) index = 1; |
@@ -2196,7 +2196,7 @@ u8 RFSynthesizer_SetMaxim2828_24Power( phw_data_t pHwData, u8 index ) | |||
2196 | return index; | 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 | u32 PowerData; | 2201 | u32 PowerData; |
2202 | if( index > 1 ) index = 1; | 2202 | if( index > 1 ) index = 1; |
@@ -2205,7 +2205,7 @@ u8 RFSynthesizer_SetMaxim2828_50Power( phw_data_t pHwData, u8 index ) | |||
2205 | return index; | 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 | u32 PowerData; | 2210 | u32 PowerData; |
2211 | if( index > 1 ) index = 1; | 2211 | if( index > 1 ) index = 1; |
@@ -2214,7 +2214,7 @@ u8 RFSynthesizer_SetMaxim2827_24Power( phw_data_t pHwData, u8 index ) | |||
2214 | return index; | 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 | u32 PowerData; | 2219 | u32 PowerData; |
2220 | if( index > 1 ) index = 1; | 2220 | if( index > 1 ) index = 1; |
@@ -2223,7 +2223,7 @@ u8 RFSynthesizer_SetMaxim2827_50Power( phw_data_t pHwData, u8 index ) | |||
2223 | return index; | 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 | u32 PowerData; | 2228 | u32 PowerData; |
2229 | if( index > 1 ) index = 1; | 2229 | if( index > 1 ) index = 1; |
@@ -2232,7 +2232,7 @@ u8 RFSynthesizer_SetMaxim2825Power( phw_data_t pHwData, u8 index ) | |||
2232 | return index; | 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 | u32 PowerData; | 2237 | u32 PowerData; |
2238 | u8 i,count; | 2238 | u8 i,count; |
@@ -2251,7 +2251,7 @@ u8 RFSynthesizer_SetAiroha2230Power( phw_data_t pHwData, u8 index ) | |||
2251 | return i; | 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 | u32 PowerData; | 2256 | u32 PowerData; |
2257 | u8 i,count; | 2257 | u8 i,count; |
@@ -2270,7 +2270,7 @@ u8 RFSynthesizer_SetAiroha7230Power( phw_data_t pHwData, u8 index ) | |||
2270 | return i; | 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 | u32 PowerData; | 2275 | u32 PowerData; |
2276 | u8 i,count; | 2276 | u8 i,count; |
@@ -2311,7 +2311,7 @@ u8 RFSynthesizer_SetWinbond242Power( phw_data_t pHwData, u8 index ) | |||
2311 | // Initial the hardware setting and module variable | 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 | struct wb35_reg *reg = &pHwData->reg; | 2316 | struct wb35_reg *reg = &pHwData->reg; |
2317 | 2317 | ||
@@ -2325,7 +2325,7 @@ void Dxx_initial( phw_data_t pHwData ) | |||
2325 | Wb35Reg_WriteSync( pHwData, 0x0400, reg->D00_DmaControl ); | 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 | struct wb35_reg *reg = &pHwData->reg; | 2330 | struct wb35_reg *reg = &pHwData->reg; |
2331 | u32 tmp; | 2331 | u32 tmp; |
@@ -2416,7 +2416,7 @@ void Mxx_initial( phw_data_t pHwData ) | |||
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 | // SW, PMU reset and turn off clock | 2421 | // SW, PMU reset and turn off clock |
2422 | Wb35Reg_WriteSync( pHwData, 0x03b0, 3 ); | 2422 | Wb35Reg_WriteSync( pHwData, 0x03b0, 3 ); |
@@ -2424,7 +2424,7 @@ void Uxx_power_off_procedure( phw_data_t pHwData ) | |||
2424 | } | 2424 | } |
2425 | 2425 | ||
2426 | //Decide the TxVga of every channel | 2426 | //Decide the TxVga of every channel |
2427 | void GetTxVgaFromEEPROM( phw_data_t pHwData ) | 2427 | void GetTxVgaFromEEPROM( struct hw_data * pHwData ) |
2428 | { | 2428 | { |
2429 | u32 i, j, ltmp; | 2429 | u32 i, j, ltmp; |
2430 | u16 Value[MAX_TXVGA_EEPROM]; | 2430 | u16 Value[MAX_TXVGA_EEPROM]; |
@@ -2478,7 +2478,7 @@ void GetTxVgaFromEEPROM( phw_data_t pHwData ) | |||
2478 | // or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect. | 2478 | // or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect. |
2479 | // TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35 | 2479 | // TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35 |
2480 | // This function will use default TxVgaSettingInEEPROM data to calculate new TxVga. | 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 | u8 * pTxVga = pHwData->TxVgaSettingInEEPROM; | 2483 | u8 * pTxVga = pHwData->TxVgaSettingInEEPROM; |
2484 | s16 i, stmp; | 2484 | s16 i, stmp; |
@@ -2618,7 +2618,7 @@ void EEPROMTxVgaAdjust( phw_data_t pHwData ) // 20060619.5 Add | |||
2618 | #endif | 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 | struct wb35_reg *reg = &pHwData->reg; | 2623 | struct wb35_reg *reg = &pHwData->reg; |
2624 | unsigned char Is11bRate; | 2624 | unsigned char Is11bRate; |
diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c index 59ae5ef35d0..f5608ad9ed0 100644 --- a/drivers/staging/winbond/wb35reg.c +++ b/drivers/staging/winbond/wb35reg.c | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/usb.h> | 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 | // true : read command process successfully | 8 | // true : read command process successfully |
9 | // false : register not support | 9 | // false : register not support |
@@ -13,7 +13,7 @@ extern void phy_calibration_winbond(hw_data_t *phw_data, u32 frequency); | |||
13 | // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4 | 13 | // Flag : AUTO_INCREMENT - RegisterNo will auto increment 4 |
14 | // NO_INCREMENT - Function will write data into the same register | 14 | // NO_INCREMENT - Function will write data into the same register |
15 | unsigned char | 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 | struct wb35_reg *reg = &pHwData->reg; | 18 | struct wb35_reg *reg = &pHwData->reg; |
19 | struct urb *urb = NULL; | 19 | struct urb *urb = NULL; |
@@ -73,7 +73,7 @@ Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 N | |||
73 | } | 73 | } |
74 | 74 | ||
75 | void | 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 | struct wb35_reg *reg = &pHwData->reg; | 78 | struct wb35_reg *reg = &pHwData->reg; |
79 | switch (RegisterNo) { | 79 | switch (RegisterNo) { |
@@ -118,7 +118,7 @@ Wb35Reg_Update(phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue) | |||
118 | // true : read command process successfully | 118 | // true : read command process successfully |
119 | // false : register not support | 119 | // false : register not support |
120 | unsigned char | 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 | struct wb35_reg *reg = &pHwData->reg; | 123 | struct wb35_reg *reg = &pHwData->reg; |
124 | int ret = -1; | 124 | int ret = -1; |
@@ -162,7 +162,7 @@ Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) | |||
162 | // true : read command process successfully | 162 | // true : read command process successfully |
163 | // false : register not support | 163 | // false : register not support |
164 | unsigned char | 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 | struct wb35_reg *reg = &pHwData->reg; | 167 | struct wb35_reg *reg = &pHwData->reg; |
168 | struct usb_ctrlrequest *dr; | 168 | struct usb_ctrlrequest *dr; |
@@ -222,7 +222,7 @@ Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ) | |||
222 | // true : read command process successfully | 222 | // true : read command process successfully |
223 | // false : register not support | 223 | // false : register not support |
224 | unsigned char | 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 | s8 *pValue, s8 Len) | 226 | s8 *pValue, s8 Len) |
227 | { | 227 | { |
228 | struct wb35_reg *reg = &pHwData->reg; | 228 | struct wb35_reg *reg = &pHwData->reg; |
@@ -281,7 +281,7 @@ Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 Register | |||
281 | // false : register not support | 281 | // false : register not support |
282 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. | 282 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. |
283 | unsigned char | 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 | struct wb35_reg *reg = &pHwData->reg; | 286 | struct wb35_reg *reg = &pHwData->reg; |
287 | u32 * pltmp = pRegisterValue; | 287 | u32 * pltmp = pRegisterValue; |
@@ -330,7 +330,7 @@ Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) | |||
330 | // false : register not support | 330 | // false : register not support |
331 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. | 331 | // pRegisterValue : It must be a resident buffer due to asynchronous read register. |
332 | unsigned char | 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 | struct wb35_reg *reg = &pHwData->reg; | 335 | struct wb35_reg *reg = &pHwData->reg; |
336 | struct usb_ctrlrequest * dr; | 336 | struct usb_ctrlrequest * dr; |
@@ -385,7 +385,7 @@ Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ) | |||
385 | 385 | ||
386 | 386 | ||
387 | void | 387 | void |
388 | Wb35Reg_EP0VM_start( phw_data_t pHwData ) | 388 | Wb35Reg_EP0VM_start( struct hw_data * pHwData ) |
389 | { | 389 | { |
390 | struct wb35_reg *reg = &pHwData->reg; | 390 | struct wb35_reg *reg = &pHwData->reg; |
391 | 391 | ||
@@ -397,7 +397,7 @@ Wb35Reg_EP0VM_start( phw_data_t pHwData ) | |||
397 | } | 397 | } |
398 | 398 | ||
399 | void | 399 | void |
400 | Wb35Reg_EP0VM(phw_data_t pHwData ) | 400 | Wb35Reg_EP0VM(struct hw_data * pHwData ) |
401 | { | 401 | { |
402 | struct wb35_reg *reg = &pHwData->reg; | 402 | struct wb35_reg *reg = &pHwData->reg; |
403 | struct urb *urb; | 403 | struct urb *urb; |
@@ -457,7 +457,7 @@ Wb35Reg_EP0VM(phw_data_t pHwData ) | |||
457 | void | 457 | void |
458 | Wb35Reg_EP0VM_complete(struct urb *urb) | 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 | struct wb35_reg *reg = &pHwData->reg; | 461 | struct wb35_reg *reg = &pHwData->reg; |
462 | struct wb35_reg_queue *reg_queue; | 462 | struct wb35_reg_queue *reg_queue; |
463 | 463 | ||
@@ -499,7 +499,7 @@ Wb35Reg_EP0VM_complete(struct urb *urb) | |||
499 | 499 | ||
500 | 500 | ||
501 | void | 501 | void |
502 | Wb35Reg_destroy(phw_data_t pHwData) | 502 | Wb35Reg_destroy(struct hw_data * pHwData) |
503 | { | 503 | { |
504 | struct wb35_reg *reg = &pHwData->reg; | 504 | struct wb35_reg *reg = &pHwData->reg; |
505 | struct urb *urb; | 505 | struct urb *urb; |
@@ -542,7 +542,7 @@ Wb35Reg_destroy(phw_data_t pHwData) | |||
542 | //==================================================================================== | 542 | //==================================================================================== |
543 | // The function can be run in passive-level only. | 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 | struct wb35_reg *reg=&pHwData->reg; | 547 | struct wb35_reg *reg=&pHwData->reg; |
548 | u32 ltmp; | 548 | u32 ltmp; |
@@ -722,7 +722,7 @@ u32 BitReverse( u32 dwData, u32 DataLength) | |||
722 | return dwData; | 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 | u32 BB3c, BB54; | 727 | u32 BB3c, BB54; |
728 | 728 | ||
diff --git a/drivers/staging/winbond/wb35reg_f.h b/drivers/staging/winbond/wb35reg_f.h index d97215a1eba..30f5b5ad63a 100644 --- a/drivers/staging/winbond/wb35reg_f.h +++ b/drivers/staging/winbond/wb35reg_f.h | |||
@@ -6,47 +6,47 @@ | |||
6 | //==================================== | 6 | //==================================== |
7 | // Interface function declare | 7 | // Interface function declare |
8 | //==================================== | 8 | //==================================== |
9 | unsigned char Wb35Reg_initial( phw_data_t pHwData ); | 9 | unsigned char Wb35Reg_initial( struct hw_data * pHwData ); |
10 | void Uxx_power_on_procedure( phw_data_t pHwData ); | 10 | void Uxx_power_on_procedure( struct hw_data * pHwData ); |
11 | void Uxx_power_off_procedure( phw_data_t pHwData ); | 11 | void Uxx_power_off_procedure( struct hw_data * pHwData ); |
12 | void Uxx_ReadEthernetAddress( phw_data_t pHwData ); | 12 | void Uxx_ReadEthernetAddress( struct hw_data * pHwData ); |
13 | void Dxx_initial( phw_data_t pHwData ); | 13 | void Dxx_initial( struct hw_data * pHwData ); |
14 | void Mxx_initial( phw_data_t pHwData ); | 14 | void Mxx_initial( struct hw_data * pHwData ); |
15 | void RFSynthesizer_initial( phw_data_t pHwData ); | 15 | void RFSynthesizer_initial( struct hw_data * pHwData ); |
16 | //void RFSynthesizer_SwitchingChannel( phw_data_t pHwData, s8 Channel ); | 16 | //void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, s8 Channel ); |
17 | void RFSynthesizer_SwitchingChannel( phw_data_t pHwData, ChanInfo Channel ); | 17 | void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ); |
18 | void BBProcessor_initial( phw_data_t pHwData ); | 18 | void BBProcessor_initial( struct hw_data * pHwData ); |
19 | void BBProcessor_RateChanging( phw_data_t pHwData, u8 rate ); // 20060613.1 | 19 | void BBProcessor_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060613.1 |
20 | //void RF_RateChanging( phw_data_t pHwData, u8 rate ); // 20060626.5.c Add | 20 | //void RF_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060626.5.c Add |
21 | u8 RFSynthesizer_SetPowerIndex( phw_data_t pHwData, u8 PowerIndex ); | 21 | u8 RFSynthesizer_SetPowerIndex( struct hw_data * pHwData, u8 PowerIndex ); |
22 | u8 RFSynthesizer_SetMaxim2828_24Power( phw_data_t, u8 index ); | 22 | u8 RFSynthesizer_SetMaxim2828_24Power( struct hw_data *, u8 index ); |
23 | u8 RFSynthesizer_SetMaxim2828_50Power( phw_data_t, u8 index ); | 23 | u8 RFSynthesizer_SetMaxim2828_50Power( struct hw_data *, u8 index ); |
24 | u8 RFSynthesizer_SetMaxim2827_24Power( phw_data_t, u8 index ); | 24 | u8 RFSynthesizer_SetMaxim2827_24Power( struct hw_data *, u8 index ); |
25 | u8 RFSynthesizer_SetMaxim2827_50Power( phw_data_t, u8 index ); | 25 | u8 RFSynthesizer_SetMaxim2827_50Power( struct hw_data *, u8 index ); |
26 | u8 RFSynthesizer_SetMaxim2825Power( phw_data_t, u8 index ); | 26 | u8 RFSynthesizer_SetMaxim2825Power( struct hw_data *, u8 index ); |
27 | u8 RFSynthesizer_SetAiroha2230Power( phw_data_t, u8 index ); | 27 | u8 RFSynthesizer_SetAiroha2230Power( struct hw_data *, u8 index ); |
28 | u8 RFSynthesizer_SetAiroha7230Power( phw_data_t, u8 index ); | 28 | u8 RFSynthesizer_SetAiroha7230Power( struct hw_data *, u8 index ); |
29 | u8 RFSynthesizer_SetWinbond242Power( phw_data_t, u8 index ); | 29 | u8 RFSynthesizer_SetWinbond242Power( struct hw_data *, u8 index ); |
30 | void GetTxVgaFromEEPROM( phw_data_t pHwData ); | 30 | void GetTxVgaFromEEPROM( struct hw_data * pHwData ); |
31 | void EEPROMTxVgaAdjust( phw_data_t pHwData ); // 20060619.5 Add | 31 | void EEPROMTxVgaAdjust( struct hw_data * pHwData ); // 20060619.5 Add |
32 | 32 | ||
33 | #define RFWriteControlData( _A, _V ) Wb35Reg_Write( _A, 0x0864, _V ) | 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 ); | 37 | unsigned char Wb35Reg_Read( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
38 | unsigned char Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue ); | 38 | unsigned char Wb35Reg_ReadSync( struct hw_data * pHwData, u16 RegisterNo, u32 * pRegisterValue ); |
39 | unsigned char Wb35Reg_Write( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 39 | unsigned char Wb35Reg_Write( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
40 | unsigned char Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 40 | unsigned char Wb35Reg_WriteSync( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
41 | unsigned char Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, | 41 | unsigned char Wb35Reg_WriteWithCallbackValue( struct hw_data * pHwData, |
42 | u16 RegisterNo, | 42 | u16 RegisterNo, |
43 | u32 RegisterValue, | 43 | u32 RegisterValue, |
44 | s8 *pValue, | 44 | s8 *pValue, |
45 | s8 Len); | 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 ); | 48 | void Wb35Reg_EP0VM( struct hw_data * pHwData ); |
49 | void Wb35Reg_EP0VM_start( phw_data_t pHwData ); | 49 | void Wb35Reg_EP0VM_start( struct hw_data * pHwData ); |
50 | void Wb35Reg_EP0VM_complete(struct urb *urb); | 50 | void Wb35Reg_EP0VM_complete(struct urb *urb); |
51 | 51 | ||
52 | u32 BitReverse( u32 dwData, u32 DataLength); | 52 | u32 BitReverse( u32 dwData, u32 DataLength); |
@@ -54,8 +54,8 @@ u32 BitReverse( u32 dwData, u32 DataLength); | |||
54 | void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); | 54 | void CardGetMulticastBit( u8 Address[MAC_ADDR_LENGTH], u8 *Byte, u8 *Value ); |
55 | u32 CardComputeCrc( u8 * Buffer, u32 Length ); | 55 | u32 CardComputeCrc( u8 * Buffer, u32 Length ); |
56 | 56 | ||
57 | void Wb35Reg_phy_calibration( phw_data_t pHwData ); | 57 | void Wb35Reg_phy_calibration( struct hw_data * pHwData ); |
58 | void Wb35Reg_Update( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue ); | 58 | void Wb35Reg_Update( struct hw_data * pHwData, u16 RegisterNo, u32 RegisterValue ); |
59 | unsigned char adjust_TXVGA_for_iq_mag( phw_data_t pHwData ); | 59 | unsigned char adjust_TXVGA_for_iq_mag( struct hw_data * pHwData ); |
60 | 60 | ||
61 | #endif | 61 | #endif |
diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c index bffebf926d3..3e8cf08b87e 100644 --- a/drivers/staging/winbond/wb35rx.c +++ b/drivers/staging/winbond/wb35rx.c | |||
@@ -82,7 +82,7 @@ static void Wb35Rx_adjust(PDESCRIPTOR pRxDes) | |||
82 | static u16 Wb35Rx_indicate(struct ieee80211_hw *hw) | 82 | static u16 Wb35Rx_indicate(struct ieee80211_hw *hw) |
83 | { | 83 | { |
84 | struct wbsoft_priv *priv = hw->priv; | 84 | struct wbsoft_priv *priv = hw->priv; |
85 | phw_data_t pHwData = &priv->sHwData; | 85 | struct hw_data * pHwData = &priv->sHwData; |
86 | DESCRIPTOR RxDes; | 86 | DESCRIPTOR RxDes; |
87 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 87 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
88 | u8 * pRxBufferAddress; | 88 | u8 * pRxBufferAddress; |
@@ -161,7 +161,7 @@ static void Wb35Rx_Complete(struct urb *urb) | |||
161 | { | 161 | { |
162 | struct ieee80211_hw *hw = urb->context; | 162 | struct ieee80211_hw *hw = urb->context; |
163 | struct wbsoft_priv *priv = hw->priv; | 163 | struct wbsoft_priv *priv = hw->priv; |
164 | phw_data_t pHwData = &priv->sHwData; | 164 | struct hw_data * pHwData = &priv->sHwData; |
165 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 165 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
166 | u8 * pRxBufferAddress; | 166 | u8 * pRxBufferAddress; |
167 | u32 SizeCheck; | 167 | u32 SizeCheck; |
@@ -238,7 +238,7 @@ error: | |||
238 | static void Wb35Rx(struct ieee80211_hw *hw) | 238 | static void Wb35Rx(struct ieee80211_hw *hw) |
239 | { | 239 | { |
240 | struct wbsoft_priv *priv = hw->priv; | 240 | struct wbsoft_priv *priv = hw->priv; |
241 | phw_data_t pHwData = &priv->sHwData; | 241 | struct hw_data * pHwData = &priv->sHwData; |
242 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 242 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
243 | u8 * pRxBufferAddress; | 243 | u8 * pRxBufferAddress; |
244 | struct urb *urb = pWb35Rx->RxUrb; | 244 | struct urb *urb = pWb35Rx->RxUrb; |
@@ -301,7 +301,7 @@ error: | |||
301 | void Wb35Rx_start(struct ieee80211_hw *hw) | 301 | void Wb35Rx_start(struct ieee80211_hw *hw) |
302 | { | 302 | { |
303 | struct wbsoft_priv *priv = hw->priv; | 303 | struct wbsoft_priv *priv = hw->priv; |
304 | phw_data_t pHwData = &priv->sHwData; | 304 | struct hw_data * pHwData = &priv->sHwData; |
305 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 305 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
306 | 306 | ||
307 | // Allow only one thread to run into the Wb35Rx() function | 307 | // Allow only one thread to run into the Wb35Rx() function |
@@ -313,7 +313,7 @@ void Wb35Rx_start(struct ieee80211_hw *hw) | |||
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 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 318 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
319 | u32 i; | 319 | u32 i; |
@@ -329,7 +329,7 @@ static void Wb35Rx_reset_descriptor( phw_data_t pHwData ) | |||
329 | pWb35Rx->RxOwner[i] = 1; | 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 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 334 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
335 | 335 | ||
@@ -340,7 +340,7 @@ unsigned char Wb35Rx_initial(phw_data_t pHwData) | |||
340 | return (!!pWb35Rx->RxUrb); | 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 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 345 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
346 | 346 | ||
@@ -354,7 +354,7 @@ void Wb35Rx_stop(phw_data_t pHwData) | |||
354 | } | 354 | } |
355 | 355 | ||
356 | // Needs process context | 356 | // Needs process context |
357 | void Wb35Rx_destroy(phw_data_t pHwData) | 357 | void Wb35Rx_destroy(struct hw_data * pHwData) |
358 | { | 358 | { |
359 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; | 359 | struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx; |
360 | 360 | ||
diff --git a/drivers/staging/winbond/wb35rx_f.h b/drivers/staging/winbond/wb35rx_f.h index d993041e0cd..98acce517d9 100644 --- a/drivers/staging/winbond/wb35rx_f.h +++ b/drivers/staging/winbond/wb35rx_f.h | |||
@@ -7,9 +7,9 @@ | |||
7 | //==================================== | 7 | //==================================== |
8 | // Interface function declare | 8 | // Interface function declare |
9 | //==================================== | 9 | //==================================== |
10 | unsigned char Wb35Rx_initial( phw_data_t pHwData ); | 10 | unsigned char Wb35Rx_initial( struct hw_data * pHwData ); |
11 | void Wb35Rx_destroy( phw_data_t pHwData ); | 11 | void Wb35Rx_destroy( struct hw_data * pHwData ); |
12 | void Wb35Rx_stop( phw_data_t pHwData ); | 12 | void Wb35Rx_stop( struct hw_data * pHwData ); |
13 | void Wb35Rx_start(struct ieee80211_hw *hw); | 13 | void Wb35Rx_start(struct ieee80211_hw *hw); |
14 | 14 | ||
15 | #endif | 15 | #endif |
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c index d35875f87e2..1e4169d9a11 100644 --- a/drivers/staging/winbond/wb35tx.c +++ b/drivers/staging/winbond/wb35tx.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include "sysdef.h" | 15 | #include "sysdef.h" |
16 | 16 | ||
17 | unsigned char | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 20 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
21 | 21 | ||
@@ -28,7 +28,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter); | |||
28 | static void Wb35Tx_complete(struct urb * pUrb) | 28 | static void Wb35Tx_complete(struct urb * pUrb) |
29 | { | 29 | { |
30 | struct wbsoft_priv *adapter = pUrb->context; | 30 | struct wbsoft_priv *adapter = pUrb->context; |
31 | phw_data_t pHwData = &adapter->sHwData; | 31 | struct hw_data * pHwData = &adapter->sHwData; |
32 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 32 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
33 | PMDS pMds = &adapter->Mds; | 33 | PMDS pMds = &adapter->Mds; |
34 | 34 | ||
@@ -64,7 +64,7 @@ error: | |||
64 | 64 | ||
65 | static void Wb35Tx(struct wbsoft_priv *adapter) | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 68 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
69 | u8 *pTxBufferAddress; | 69 | u8 *pTxBufferAddress; |
70 | PMDS pMds = &adapter->Mds; | 70 | PMDS pMds = &adapter->Mds; |
@@ -115,7 +115,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter) | |||
115 | 115 | ||
116 | void Wb35Tx_start(struct wbsoft_priv *adapter) | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 119 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
120 | 120 | ||
121 | // Allow only one thread to run into function | 121 | // Allow only one thread to run into function |
@@ -126,7 +126,7 @@ void Wb35Tx_start(struct wbsoft_priv *adapter) | |||
126 | atomic_dec(&pWb35Tx->TxFireCounter); | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 131 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
132 | 132 | ||
@@ -145,7 +145,7 @@ unsigned char Wb35Tx_initial(phw_data_t pHwData) | |||
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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 150 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
151 | 151 | ||
@@ -165,7 +165,7 @@ void Wb35Tx_stop(phw_data_t pHwData) | |||
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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 170 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
171 | 171 | ||
@@ -188,7 +188,7 @@ void Wb35Tx_destroy(phw_data_t pHwData) | |||
188 | 188 | ||
189 | void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount) | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 192 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
193 | unsigned char Trigger = false; | 193 | unsigned char Trigger = false; |
194 | 194 | ||
@@ -208,7 +208,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter); | |||
208 | static void Wb35Tx_EP2VM_complete(struct urb * pUrb) | 208 | static void Wb35Tx_EP2VM_complete(struct urb * pUrb) |
209 | { | 209 | { |
210 | struct wbsoft_priv *adapter = pUrb->context; | 210 | struct wbsoft_priv *adapter = pUrb->context; |
211 | phw_data_t pHwData = &adapter->sHwData; | 211 | struct hw_data * pHwData = &adapter->sHwData; |
212 | T02_DESCRIPTOR T02, TSTATUS; | 212 | T02_DESCRIPTOR T02, TSTATUS; |
213 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 213 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
214 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; | 214 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; |
@@ -256,7 +256,7 @@ error: | |||
256 | 256 | ||
257 | static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter) | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 260 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
261 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; | 261 | struct urb * pUrb = (struct urb *)pWb35Tx->Tx2Urb; |
262 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; | 262 | u32 * pltmp = (u32 *)pWb35Tx->EP2_buf; |
@@ -292,7 +292,7 @@ error: | |||
292 | 292 | ||
293 | void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter) | 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 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; | 296 | struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; |
297 | 297 | ||
298 | // Allow only one thread to run into function | 298 | // Allow only one thread to run into function |
diff --git a/drivers/staging/winbond/wb35tx_f.h b/drivers/staging/winbond/wb35tx_f.h index 4222fa80c7b..a7af9cbe202 100644 --- a/drivers/staging/winbond/wb35tx_f.h +++ b/drivers/staging/winbond/wb35tx_f.h | |||
@@ -7,14 +7,14 @@ | |||
7 | //==================================== | 7 | //==================================== |
8 | // Interface function declare | 8 | // Interface function declare |
9 | //==================================== | 9 | //==================================== |
10 | unsigned char Wb35Tx_initial( phw_data_t pHwData ); | 10 | unsigned char Wb35Tx_initial( struct hw_data * pHwData ); |
11 | void Wb35Tx_destroy( phw_data_t pHwData ); | 11 | void Wb35Tx_destroy( struct hw_data * pHwData ); |
12 | unsigned char Wb35Tx_get_tx_buffer( phw_data_t pHwData, u8 **pBuffer ); | 12 | unsigned char Wb35Tx_get_tx_buffer( struct hw_data * pHwData, u8 **pBuffer ); |
13 | 13 | ||
14 | void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter); | 14 | void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter); |
15 | 15 | ||
16 | void Wb35Tx_start(struct wbsoft_priv *adapter); | 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 | void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount); | 19 | void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount); |
20 | 20 | ||
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c index a1cd4114fe8..c985ad06523 100644 --- a/drivers/staging/winbond/wbhal.c +++ b/drivers/staging/winbond/wbhal.c | |||
@@ -2,7 +2,7 @@ | |||
2 | #include "wbhal_f.h" | 2 | #include "wbhal_f.h" |
3 | #include "wblinux_f.h" | 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 | u32 ltmp[2]; | 7 | u32 ltmp[2]; |
8 | 8 | ||
@@ -16,7 +16,7 @@ void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ) | |||
16 | Wb35Reg_BurstWrite( pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT ); | 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 | if( pHwData->SurpriseRemove ) return; | 21 | if( pHwData->SurpriseRemove ) return; |
22 | 22 | ||
@@ -26,7 +26,7 @@ void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ) | |||
26 | static void hal_led_control(unsigned long data) | 26 | static void hal_led_control(unsigned long data) |
27 | { | 27 | { |
28 | struct wbsoft_priv *adapter = (struct wbsoft_priv *) data; | 28 | struct wbsoft_priv *adapter = (struct wbsoft_priv *) data; |
29 | phw_data_t pHwData = &adapter->sHwData; | 29 | struct hw_data * pHwData = &adapter->sHwData; |
30 | struct wb35_reg *reg = &pHwData->reg; | 30 | struct wb35_reg *reg = &pHwData->reg; |
31 | u32 LEDSet = (pHwData->SoftwareSet & HAL_LED_SET_MASK) >> HAL_LED_SET_SHIFT; | 31 | u32 LEDSet = (pHwData->SoftwareSet & HAL_LED_SET_MASK) >> HAL_LED_SET_SHIFT; |
32 | u8 LEDgray[20] = { 0,3,4,6,8,10,11,12,13,14,15,14,13,12,11,10,8,6,4,2 }; | 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,7 +311,7 @@ static void hal_led_control(unsigned long data) | |||
311 | u8 hal_init_hardware(struct ieee80211_hw *hw) | 311 | u8 hal_init_hardware(struct ieee80211_hw *hw) |
312 | { | 312 | { |
313 | struct wbsoft_priv *priv = hw->priv; | 313 | struct wbsoft_priv *priv = hw->priv; |
314 | phw_data_t pHwData = &priv->sHwData; | 314 | struct hw_data * pHwData = &priv->sHwData; |
315 | u16 SoftwareSet; | 315 | u16 SoftwareSet; |
316 | 316 | ||
317 | // Initial the variable | 317 | // Initial the variable |
@@ -356,7 +356,7 @@ u8 hal_init_hardware(struct ieee80211_hw *hw) | |||
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 | switch( pHwData->InitialResource ) | 361 | switch( pHwData->InitialResource ) |
362 | { | 362 | { |
@@ -370,7 +370,7 @@ void hal_halt(phw_data_t pHwData, void *ppa_data) | |||
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 | u32 tmp; | 375 | u32 tmp; |
376 | 376 | ||
@@ -383,7 +383,7 @@ void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ) | |||
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 | struct wb35_reg *reg = &pHwData->reg; | 388 | struct wb35_reg *reg = &pHwData->reg; |
389 | 389 | ||
@@ -404,12 +404,12 @@ static void hal_set_current_channel_ex( phw_data_t pHwData, ChanInfo channel ) | |||
404 | (s8 *)&channel, sizeof(ChanInfo)); | 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 | hal_set_current_channel_ex( pHwData, channel ); | 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 | struct wb35_reg *reg = &pHwData->reg; | 414 | struct wb35_reg *reg = &pHwData->reg; |
415 | 415 | ||
@@ -424,7 +424,7 @@ void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ) | |||
424 | } | 424 | } |
425 | 425 | ||
426 | //for wep key error detection, we need to accept broadcast packets to be received temporary. | 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 | struct wb35_reg *reg = &pHwData->reg; | 429 | struct wb35_reg *reg = &pHwData->reg; |
430 | 430 | ||
@@ -438,7 +438,7 @@ void hal_set_accept_promiscuous( phw_data_t pHwData, u8 enable) | |||
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 | struct wb35_reg *reg = &pHwData->reg; | 443 | struct wb35_reg *reg = &pHwData->reg; |
444 | 444 | ||
@@ -449,7 +449,7 @@ void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ) | |||
449 | Wb35Reg_Write( pHwData, 0x0800, reg->M00_MacControl ); | 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 | struct wb35_reg *reg = &pHwData->reg; | 454 | struct wb35_reg *reg = &pHwData->reg; |
455 | 455 | ||
@@ -467,7 +467,7 @@ void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ) | |||
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 | struct wb35_reg *reg = &pHwData->reg; | 472 | struct wb35_reg *reg = &pHwData->reg; |
473 | 473 | ||
@@ -481,7 +481,7 @@ void hal_stop( phw_data_t pHwData ) | |||
481 | Wb35Reg_Write( pHwData, 0x0400, reg->D00_DmaControl ); | 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 | struct wb35_reg *reg = &pHwData->reg; | 486 | struct wb35_reg *reg = &pHwData->reg; |
487 | struct wb_usb *pWbUsb = &pHwData->WbUsb; | 487 | struct wb_usb *pWbUsb = &pHwData->WbUsb; |
@@ -492,12 +492,12 @@ unsigned char hal_idle(phw_data_t pHwData) | |||
492 | return true; | 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 | pHwData->phy_type = PhyType; | 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 | struct wb35_reg *reg = &pHwData->reg; | 502 | struct wb35_reg *reg = &pHwData->reg; |
503 | 503 | ||
@@ -516,7 +516,7 @@ void hal_set_radio_mode( phw_data_t pHwData, unsigned char radio_off) | |||
516 | Wb35Reg_Write( pHwData, 0x0824, reg->M24_MacControl ); | 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 | struct wb35_reg *reg = &pHwData->reg; | 521 | struct wb35_reg *reg = &pHwData->reg; |
522 | 522 | ||
@@ -528,7 +528,7 @@ u8 hal_get_antenna_number( phw_data_t pHwData ) | |||
528 | 528 | ||
529 | //---------------------------------------------------------------------------------------------------- | 529 | //---------------------------------------------------------------------------------------------------- |
530 | //0 : radio on; 1: radio off | 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 | struct wb35_reg *reg = &pHwData->reg; | 533 | struct wb35_reg *reg = &pHwData->reg; |
534 | 534 | ||
@@ -545,14 +545,14 @@ u8 hal_get_hw_radio_off( phw_data_t pHwData ) | |||
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 | if( number < 0x1000 ) | 550 | if( number < 0x1000 ) |
551 | number += 0x1000; | 551 | number += 0x1000; |
552 | return Wb35Reg_ReadSync( pHwData, number, pValue ); | 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 | unsigned char ret; | 557 | unsigned char ret; |
558 | 558 | ||
@@ -562,7 +562,7 @@ unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ) | |||
562 | return ret; | 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 | RFSynthesizer_SetPowerIndex( pHwData, PowerIndex ); | 567 | RFSynthesizer_SetPowerIndex( pHwData, PowerIndex ); |
568 | } | 568 | } |
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h index e805f40f635..efcaefb6aa5 100644 --- a/drivers/staging/winbond/wbhal_f.h +++ b/drivers/staging/winbond/wbhal_f.h | |||
@@ -10,56 +10,56 @@ | |||
10 | //==================================================================================== | 10 | //==================================================================================== |
11 | // Function declaration | 11 | // Function declaration |
12 | //==================================================================================== | 12 | //==================================================================================== |
13 | void hal_remove_mapping_key( phw_data_t pHwData, u8 *pmac_addr ); | 13 | void hal_remove_mapping_key( struct hw_data * pHwData, u8 *pmac_addr ); |
14 | void hal_remove_default_key( phw_data_t pHwData, u32 index ); | 14 | void hal_remove_default_key( struct hw_data * 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 ); | 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( 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 ); | 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( phw_data_t pHwData ); | 17 | void hal_clear_all_default_key( struct hw_data * pHwData ); |
18 | void hal_clear_all_group_key( phw_data_t pHwData ); | 18 | void hal_clear_all_group_key( struct hw_data * pHwData ); |
19 | void hal_clear_all_mapping_key( phw_data_t pHwData ); | 19 | void hal_clear_all_mapping_key( struct hw_data * pHwData ); |
20 | void hal_clear_all_key( phw_data_t pHwData ); | 20 | void hal_clear_all_key( struct hw_data * pHwData ); |
21 | void hal_get_ethernet_address( phw_data_t pHwData, u8 *current_address ); | 21 | void hal_get_ethernet_address( struct hw_data * pHwData, u8 *current_address ); |
22 | void hal_set_ethernet_address( phw_data_t pHwData, u8 *current_address ); | 22 | void hal_set_ethernet_address( struct hw_data * pHwData, u8 *current_address ); |
23 | void hal_get_permanent_address( phw_data_t pHwData, u8 *pethernet_address ); | 23 | void hal_get_permanent_address( struct hw_data * pHwData, u8 *pethernet_address ); |
24 | u8 hal_init_hardware(struct ieee80211_hw *hw); | 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 ); | 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( phw_data_t pHwData, u8 *pin_pwr_save ); | 26 | void hal_get_power_save_mode( struct hw_data * pHwData, u8 *pin_pwr_save ); |
27 | void hal_set_slot_time( phw_data_t pHwData, u8 type ); | 27 | void hal_set_slot_time( struct hw_data * pHwData, u8 type ); |
28 | #define hal_set_atim_window( _A, _ATM ) | 28 | #define hal_set_atim_window( _A, _ATM ) |
29 | void hal_start_bss( phw_data_t pHwData, u8 mac_op_mode ); | 29 | void hal_start_bss( struct hw_data * pHwData, u8 mac_op_mode ); |
30 | void hal_join_request( phw_data_t pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// | 30 | void hal_join_request( struct hw_data * pHwData, u8 bss_type ); // 0:BSS STA 1:IBSS STA// |
31 | void hal_stop_sync_bss( phw_data_t pHwData ); | 31 | void hal_stop_sync_bss( struct hw_data * pHwData ); |
32 | void hal_resume_sync_bss( phw_data_t pHwData); | 32 | void hal_resume_sync_bss( struct hw_data * pHwData); |
33 | void hal_set_aid( phw_data_t pHwData, u16 aid ); | 33 | void hal_set_aid( struct hw_data * pHwData, u16 aid ); |
34 | void hal_set_bssid( phw_data_t pHwData, u8 *pbssid ); | 34 | void hal_set_bssid( struct hw_data * pHwData, u8 *pbssid ); |
35 | void hal_get_bssid( phw_data_t pHwData, u8 *pbssid ); | 35 | void hal_get_bssid( struct hw_data * pHwData, u8 *pbssid ); |
36 | void hal_set_beacon_period( phw_data_t pHwData, u16 beacon_period ); | 36 | void hal_set_beacon_period( struct hw_data * pHwData, u16 beacon_period ); |
37 | void hal_set_listen_interval( phw_data_t pHwData, u16 listen_interval ); | 37 | void hal_set_listen_interval( struct hw_data * pHwData, u16 listen_interval ); |
38 | void hal_set_cap_info( phw_data_t pHwData, u16 capability_info ); | 38 | void hal_set_cap_info( struct hw_data * pHwData, u16 capability_info ); |
39 | void hal_set_ssid( phw_data_t pHwData, u8 *pssid, u8 ssid_len ); | 39 | void hal_set_ssid( struct hw_data * pHwData, u8 *pssid, u8 ssid_len ); |
40 | void hal_set_current_channel( phw_data_t pHwData, ChanInfo channel ); | 40 | void hal_set_current_channel( struct hw_data * pHwData, ChanInfo channel ); |
41 | void hal_set_accept_broadcast( phw_data_t pHwData, u8 enable ); | 41 | void hal_set_accept_broadcast( struct hw_data * pHwData, u8 enable ); |
42 | void hal_set_accept_multicast( phw_data_t pHwData, u8 enable ); | 42 | void hal_set_accept_multicast( struct hw_data * pHwData, u8 enable ); |
43 | void hal_set_accept_beacon( phw_data_t pHwData, u8 enable ); | 43 | void hal_set_accept_beacon( struct hw_data * pHwData, u8 enable ); |
44 | void hal_stop( phw_data_t pHwData ); | 44 | void hal_stop( struct hw_data * pHwData ); |
45 | void hal_halt( phw_data_t pHwData, void *ppa_data ); | 45 | void hal_halt( struct hw_data * pHwData, void *ppa_data ); |
46 | void hal_start_tx0( phw_data_t pHwData ); | 46 | void hal_start_tx0( struct hw_data * pHwData ); |
47 | void hal_set_phy_type( phw_data_t pHwData, u8 PhyType ); | 47 | void hal_set_phy_type( struct hw_data * pHwData, u8 PhyType ); |
48 | #define hal_get_cwmin( _A ) ( (_A)->cwmin ) | 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 | #define hal_get_cwmax( _A ) ( (_A)->cwmax ) | 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); | 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( phw_data_t pHwData, unsigned char boConnect ); | 52 | void hal_set_connect_info( struct hw_data * pHwData, unsigned char boConnect ); |
53 | u8 hal_get_est_sq3( phw_data_t pHwData, u8 Count ); | 53 | u8 hal_get_est_sq3( struct hw_data * pHwData, u8 Count ); |
54 | void hal_set_rf_power( phw_data_t pHwData, u8 PowerIndex ); // 20060621 Modify | 54 | void hal_set_rf_power( struct hw_data * pHwData, u8 PowerIndex ); // 20060621 Modify |
55 | void hal_set_radio_mode( phw_data_t pHwData, unsigned char boValue); | 55 | void hal_set_radio_mode( struct hw_data * pHwData, unsigned char boValue); |
56 | void hal_descriptor_indicate( phw_data_t pHwData, PDESCRIPTOR pDes ); | 56 | void hal_descriptor_indicate( struct hw_data * pHwData, PDESCRIPTOR pDes ); |
57 | u8 hal_get_antenna_number( phw_data_t pHwData ); | 57 | u8 hal_get_antenna_number( struct hw_data * pHwData ); |
58 | u32 hal_get_bss_pk_cnt( phw_data_t pHwData ); | 58 | u32 hal_get_bss_pk_cnt( struct hw_data * pHwData ); |
59 | #define hal_get_region_from_EEPROM( _A ) ( (_A)->reg.EEPROMRegion ) | 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 | #define hal_get_tx_buffer( _A, _B ) Wb35Tx_get_tx_buffer( _A, _B ) | 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 | #define hal_software_set( _A ) (_A->SoftwareSet) | 63 | #define hal_software_set( _A ) (_A->SoftwareSet) |
64 | #define hal_driver_init_OK( _A ) (_A->IsInitOK) | 64 | #define hal_driver_init_OK( _A ) (_A->IsInitOK) |
65 | #define hal_rssi_boundary_high( _A ) (_A->RSSI_high) | 65 | #define hal_rssi_boundary_high( _A ) (_A->RSSI_high) |
@@ -68,8 +68,8 @@ u8 hal_get_hw_radio_off ( phw_data_t pHwData ); | |||
68 | 68 | ||
69 | #define PHY_DEBUG( msg, args... ) | 69 | #define PHY_DEBUG( msg, args... ) |
70 | 70 | ||
71 | unsigned char hal_get_dxx_reg( phw_data_t pHwData, u16 number, u32 * pValue ); | 71 | unsigned char hal_get_dxx_reg( struct hw_data * pHwData, u16 number, u32 * pValue ); |
72 | unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); | 72 | unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 value ); |
73 | #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count | 73 | #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count |
74 | #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) | 74 | #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) |
75 | 75 | ||
@@ -82,7 +82,7 @@ unsigned char hal_set_dxx_reg( phw_data_t pHwData, u16 number, u32 value ); | |||
82 | #define hal_get_clear_interrupt(_A) | 82 | #define hal_get_clear_interrupt(_A) |
83 | #define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A) | 83 | #define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A) |
84 | #define hal_join_request_stop(_A) | 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 | #define hw_get_cxx_reg( _A, _B, _C ) | 86 | #define hw_get_cxx_reg( _A, _B, _C ) |
87 | #define hw_set_cxx_reg( _A, _B, _C ) | 87 | #define hw_set_cxx_reg( _A, _B, _C ) |
88 | #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) | 88 | #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) |
diff --git a/drivers/staging/winbond/wbhal_s.h b/drivers/staging/winbond/wbhal_s.h index 799f790bb4c..acfebf05d9d 100644 --- a/drivers/staging/winbond/wbhal_s.h +++ b/drivers/staging/winbond/wbhal_s.h | |||
@@ -392,8 +392,7 @@ typedef struct _TXVGA_FOR_50 { | |||
392 | #include "wb35rx_s.h" | 392 | #include "wb35rx_s.h" |
393 | 393 | ||
394 | // For Hal using ================================================================== | 394 | // For Hal using ================================================================== |
395 | typedef struct _HW_DATA_T | 395 | struct hw_data { |
396 | { | ||
397 | // For compatible with 33 | 396 | // For compatible with 33 |
398 | u32 revision; | 397 | u32 revision; |
399 | u32 BB3c_cal; // The value for Tx calibration comes from EEPROM | 398 | u32 BB3c_cal; // The value for Tx calibration comes from EEPROM |
@@ -541,6 +540,6 @@ typedef struct _HW_DATA_T | |||
541 | // 20060828.1 for avoid AP disconnect | 540 | // 20060828.1 for avoid AP disconnect |
542 | u32 NullPacketCount; | 541 | u32 NullPacketCount; |
543 | 542 | ||
544 | } hw_data_t, *phw_data_t; | 543 | }; |
545 | 544 | ||
546 | #endif | 545 | #endif |
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 75b4b04792d..9c3f9439f35 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c | |||
@@ -149,19 +149,19 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) | |||
149 | hal_set_current_channel(&priv->sHwData, ch); | 149 | hal_set_current_channel(&priv->sHwData, ch); |
150 | hal_set_beacon_period(&priv->sHwData, conf->beacon_int); | 150 | hal_set_beacon_period(&priv->sHwData, conf->beacon_int); |
151 | // hal_set_cap_info(&priv->sHwData, ?? ); | 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 | hal_set_accept_broadcast(&priv->sHwData, 1); | 153 | hal_set_accept_broadcast(&priv->sHwData, 1); |
154 | hal_set_accept_promiscuous(&priv->sHwData, 1); | 154 | hal_set_accept_promiscuous(&priv->sHwData, 1); |
155 | hal_set_accept_multicast(&priv->sHwData, 1); | 155 | hal_set_accept_multicast(&priv->sHwData, 1); |
156 | hal_set_accept_beacon(&priv->sHwData, 1); | 156 | hal_set_accept_beacon(&priv->sHwData, 1); |
157 | hal_set_radio_mode(&priv->sHwData, 0); | 157 | hal_set_radio_mode(&priv->sHwData, 0); |
158 | //hal_set_antenna_number( phw_data_t pHwData, u8 number ) | 158 | //hal_set_antenna_number( struct hw_data * pHwData, u8 number ) |
159 | //hal_set_rf_power(phw_data_t pHwData, u8 PowerIndex) | 159 | //hal_set_rf_power(struct hw_data * pHwData, u8 PowerIndex) |
160 | 160 | ||
161 | 161 | ||
162 | // hal_start_bss(&priv->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE); ?? | 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 | // u8 length, unsigned char basic_rate_set) | 165 | // u8 length, unsigned char basic_rate_set) |
166 | 166 | ||
167 | return 0; | 167 | return 0; |
@@ -199,7 +199,7 @@ static const struct ieee80211_ops wbsoft_ops = { | |||
199 | static unsigned char wb35_hw_init(struct ieee80211_hw *hw) | 199 | static unsigned char wb35_hw_init(struct ieee80211_hw *hw) |
200 | { | 200 | { |
201 | struct wbsoft_priv *priv = hw->priv; | 201 | struct wbsoft_priv *priv = hw->priv; |
202 | phw_data_t pHwData; | 202 | struct hw_data * pHwData; |
203 | u8 *pMacAddr; | 203 | u8 *pMacAddr; |
204 | u8 *pMacAddr2; | 204 | u8 *pMacAddr2; |
205 | u32 InitStep = 0; | 205 | u32 InitStep = 0; |
@@ -366,7 +366,7 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
366 | 366 | ||
367 | SET_IEEE80211_DEV(dev, &udev->dev); | 367 | SET_IEEE80211_DEV(dev, &udev->dev); |
368 | { | 368 | { |
369 | phw_data_t pHwData = &priv->sHwData; | 369 | struct hw_data * pHwData = &priv->sHwData; |
370 | unsigned char dev_addr[MAX_ADDR_LEN]; | 370 | unsigned char dev_addr[MAX_ADDR_LEN]; |
371 | hal_get_permanent_address(pHwData, dev_addr); | 371 | hal_get_permanent_address(pHwData, dev_addr); |
372 | SET_IEEE80211_PERM_ADDR(dev, dev_addr); | 372 | SET_IEEE80211_PERM_ADDR(dev, dev_addr); |