[PATCH 05/11] staging: rtl8723bs: Remove empty else-if conditional.
This else-if conditional block does nothing; remove it. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 5d44aee44eb1..6ae646ec3d06 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1751,9 +1751,6 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (band_type == BAND_ON_5G) channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, channel); - else if (band_type == BAND_ON_BOTH) { - /* BAND_ON_BOTH don't care temporarily */ - } if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 || idx_rate_sctn == -1 || idx_channel == -1) { -- 2.17.1
[PATCH 05/11] staging: rtl8723bs: Remove empty else-if conditional.
This else-if conditional block does nothing; remove it. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 5d44aee44eb1..6ae646ec3d06 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1751,9 +1751,6 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (band_type == BAND_ON_5G) channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, channel); - else if (band_type == BAND_ON_BOTH) { - /* BAND_ON_BOTH don't care temporarily */ - } if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 || idx_rate_sctn == -1 || idx_channel == -1) { -- 2.17.1
[PATCH 02/11] staging: rtl8723bs: Rename PHY_GetTxPowerLimit().
Rename camel-case 'PHY_GetTxPowerLimit()' to 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +++--- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c| 2 +- drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 5f727a7c16fd..4ab624f5ece0 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,9 +1612,9 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 PHY_GetTxPowerLimit(struct adapter *Adapter, u32 RegPwrTblSel, - enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, u8 DataRate, u8 Channel) +s8 phy_get_tx_pwr_lmt(struct adapter *Adapter, u32 RegPwrTblSel, + enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, + u8 RfPath, u8 DataRate, u8 Channel) { s16 band= -1; s16 regulation = -1; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c index 50428f688859..78a4828ecb65 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c @@ -688,7 +688,7 @@ u8 PHY_GetTxPowerIndex_8723B( txPower = (s8) PHY_GetTxPowerIndexBase(padapter, RFPath, Rate, BandWidth, Channel, ); powerDiffByRate = PHY_GetTxPowerByRate(padapter, BAND_ON_2_4G, ODM_RF_PATH_A, RF_1TX, Rate); - limit = PHY_GetTxPowerLimit( + limit = phy_get_tx_pwr_lmt( padapter, padapter->registrypriv.RegPwrTblSel, (u8)(!bIn24G), diff --git a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h index c5184315f82f..f841546584a7 100644 --- a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h +++ b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h @@ -177,7 +177,7 @@ u8 Channel, bool*bIn24G ); -s8 PHY_GetTxPowerLimit (struct adapter *adapter, u32 RegPwrTblSel, +s8 phy_get_tx_pwr_lmt (struct adapter *adapter, u32 RegPwrTblSel, enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, u8 RfPath, u8 DataRate, -- 2.17.1
[PATCH 02/11] staging: rtl8723bs: Rename PHY_GetTxPowerLimit().
Rename camel-case 'PHY_GetTxPowerLimit()' to 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +++--- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c| 2 +- drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 5f727a7c16fd..4ab624f5ece0 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,9 +1612,9 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 PHY_GetTxPowerLimit(struct adapter *Adapter, u32 RegPwrTblSel, - enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, u8 DataRate, u8 Channel) +s8 phy_get_tx_pwr_lmt(struct adapter *Adapter, u32 RegPwrTblSel, + enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, + u8 RfPath, u8 DataRate, u8 Channel) { s16 band= -1; s16 regulation = -1; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c index 50428f688859..78a4828ecb65 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c @@ -688,7 +688,7 @@ u8 PHY_GetTxPowerIndex_8723B( txPower = (s8) PHY_GetTxPowerIndexBase(padapter, RFPath, Rate, BandWidth, Channel, ); powerDiffByRate = PHY_GetTxPowerByRate(padapter, BAND_ON_2_4G, ODM_RF_PATH_A, RF_1TX, Rate); - limit = PHY_GetTxPowerLimit( + limit = phy_get_tx_pwr_lmt( padapter, padapter->registrypriv.RegPwrTblSel, (u8)(!bIn24G), diff --git a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h index c5184315f82f..f841546584a7 100644 --- a/drivers/staging/rtl8723bs/include/hal_com_phycfg.h +++ b/drivers/staging/rtl8723bs/include/hal_com_phycfg.h @@ -177,7 +177,7 @@ u8 Channel, bool*bIn24G ); -s8 PHY_GetTxPowerLimit (struct adapter *adapter, u32 RegPwrTblSel, +s8 phy_get_tx_pwr_lmt (struct adapter *adapter, u32 RegPwrTblSel, enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, u8 RfPath, u8 DataRate, -- 2.17.1
[PATCH 01/11] staging: rtl8723bs: Clean up whitespace in 'PHY_GetTxPowerLimit()'.
Wrap lines longer than 80 characters where possible, delete double newlines, and fix alignment per the kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 110 ++ 1 file changed, 59 insertions(+), 51 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 3922d0308a81..5f727a7c16fd 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,46 +1612,45 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 PHY_GetTxPowerLimit( - struct adapter *Adapter, - u32 RegPwrTblSel, - enum BAND_TYPE Band, - enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, - u8 DataRate, - u8 Channel -) +s8 PHY_GetTxPowerLimit(struct adapter *Adapter, u32 RegPwrTblSel, + enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, + u8 RfPath, u8 DataRate, u8 Channel) { - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - s16 band = -1, regulation = -1, bandwidth = -1, rateSection = -1, channel = -1; + s16 band= -1; + s16 regulation = -1; + s16 bandwidth = -1; + s16 rateSection = -1; + s16 channel = -1; s8 powerLimit = MAX_POWER_INDEX; + struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - if ((Adapter->registrypriv.RegEnableTxPowerLimit == 2 && pHalData->EEPROMRegulatory != 1) || - Adapter->registrypriv.RegEnableTxPowerLimit == 0) + if (((Adapter->registrypriv.RegEnableTxPowerLimit == 2) && +(pHalData->EEPROMRegulatory != 1)) || + (Adapter->registrypriv.RegEnableTxPowerLimit == 0)) return MAX_POWER_INDEX; switch (Adapter->registrypriv.RegPwrTblSel) { case 1: - regulation = TXPWR_LMT_ETSI; - break; + regulation = TXPWR_LMT_ETSI; + break; case 2: - regulation = TXPWR_LMT_MKK; - break; + regulation = TXPWR_LMT_MKK; + break; case 3: - regulation = TXPWR_LMT_FCC; - break; - + regulation = TXPWR_LMT_FCC; + break; case 4: - regulation = TXPWR_LMT_WW; - break; - + regulation = TXPWR_LMT_WW; + break; default: - regulation = (Band == BAND_ON_2_4G) ? pHalData->Regulation2_4G : pHalData->Regulation5G; - break; + regulation = (Band == BAND_ON_2_4G) ? + pHalData->Regulation2_4G : + pHalData->Regulation5G; + break; } - /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", Adapter->registrypriv.RegPwrTblSel, regulation); */ - + /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", */ + /* Adapter->registrypriv.RegPwrTblSel, regulation); */ if (Band == BAND_ON_2_4G) band = 0; @@ -1730,8 +1729,8 @@ s8 PHY_GetTxPowerLimit( break; } - if (Band == BAND_ON_5G && rateSection == 0) - DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate); + if (Band == BAND_ON_5G && rateSection == 0) +DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate); /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ @@ -1745,22 +1744,26 @@ s8 PHY_GetTxPowerLimit( /* workaround for wrong indxe combination to obtain tx power limit, */ /* HT on 80M will reference to HT on 40M */ - if ((rateSection == 2 || rateSection == 3) && Band == BAND_ON_5G && bandwidth == 2) { + if ((rateSection == 2 || rateSection == 3) && + Band == BAND_ON_5G && bandwidth == 2) { bandwidth = 1; } if (Band == BAND_ON_2_4G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, Channel); + channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, + Channel); else if (Band == BAND_ON_5G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, Channel); + channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, + Channel); else if (Band == BAND_ON_BOTH) { /* BAND_ON_BOTH don't care temporarily */
[PATCH 07/11] staging: rtl8723bs: Move bandwidth index lookup to new function.
Factoring out the conditional lookup of bandwidth index into the power limit table into it's own function simplifies the logic of 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 26 --- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 4b5219481b33..6d8a07ac7bb3 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,6 +1612,22 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } +static s16 get_bandwidth_idx(const enum CHANNEL_WIDTH bandwidth) +{ + switch (bandwidth) { + case CHANNEL_WIDTH_20: + return 0; + case CHANNEL_WIDTH_40: + return 1; + case CHANNEL_WIDTH_80: + return 2; + case CHANNEL_WIDTH_160: + return 3; + default: + return -1; + } +} + static s16 get_rate_sctn_idx(const u8 rate) { switch (rate) { @@ -1703,15 +1719,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (band_type == BAND_ON_5G) idx_band = 1; - if (bandwidth == CHANNEL_WIDTH_20) - idx_bandwidth = 0; - else if (bandwidth == CHANNEL_WIDTH_40) - idx_bandwidth = 1; - else if (bandwidth == CHANNEL_WIDTH_80) - idx_bandwidth = 2; - else if (bandwidth == CHANNEL_WIDTH_160) - idx_bandwidth = 3; - + idx_bandwidth = get_bandwidth_idx(bandwidth); idx_rate_sctn = get_rate_sctn_idx(data_rate); if (band_type == BAND_ON_5G && idx_rate_sctn == 0) -- 2.17.1
[PATCH 06/11] staging: rtl8723bs: Move rate section index lookup to new function.
The rate section lookup is a large switch statement in the middle of 'phy_get_tx_pwr_lmt()'; refactor this statement into it's own function for increased readability. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 109 -- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 6ae646ec3d06..4b5219481b33 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,6 +1612,52 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } +static s16 get_rate_sctn_idx(const u8 rate) +{ + switch (rate) { + case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: + return 0; + case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: + case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: + return 1; + case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: + case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: + return 2; + case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: + case MGN_MCS12: case MGN_MCS13: case MGN_MCS14: case MGN_MCS15: + return 3; + case MGN_MCS16: case MGN_MCS17: case MGN_MCS18: case MGN_MCS19: + case MGN_MCS20: case MGN_MCS21: case MGN_MCS22: case MGN_MCS23: + return 4; + case MGN_MCS24: case MGN_MCS25: case MGN_MCS26: case MGN_MCS27: + case MGN_MCS28: case MGN_MCS29: case MGN_MCS30: case MGN_MCS31: + return 5; + case MGN_VHT1SS_MCS0: case MGN_VHT1SS_MCS1: case MGN_VHT1SS_MCS2: + case MGN_VHT1SS_MCS3: case MGN_VHT1SS_MCS4: case MGN_VHT1SS_MCS5: + case MGN_VHT1SS_MCS6: case MGN_VHT1SS_MCS7: case MGN_VHT1SS_MCS8: + case MGN_VHT1SS_MCS9: + return 6; + case MGN_VHT2SS_MCS0: case MGN_VHT2SS_MCS1: case MGN_VHT2SS_MCS2: + case MGN_VHT2SS_MCS3: case MGN_VHT2SS_MCS4: case MGN_VHT2SS_MCS5: + case MGN_VHT2SS_MCS6: case MGN_VHT2SS_MCS7: case MGN_VHT2SS_MCS8: + case MGN_VHT2SS_MCS9: + return 7; + case MGN_VHT3SS_MCS0: case MGN_VHT3SS_MCS1: case MGN_VHT3SS_MCS2: + case MGN_VHT3SS_MCS3: case MGN_VHT3SS_MCS4: case MGN_VHT3SS_MCS5: + case MGN_VHT3SS_MCS6: case MGN_VHT3SS_MCS7: case MGN_VHT3SS_MCS8: + case MGN_VHT3SS_MCS9: + return 8; + case MGN_VHT4SS_MCS0: case MGN_VHT4SS_MCS1: case MGN_VHT4SS_MCS2: + case MGN_VHT4SS_MCS3: case MGN_VHT4SS_MCS4: case MGN_VHT4SS_MCS5: + case MGN_VHT4SS_MCS6: case MGN_VHT4SS_MCS7: case MGN_VHT4SS_MCS8: + case MGN_VHT4SS_MCS9: + return 9; + default: + DBG_871X("Wrong rate 0x%x\n", rate); + return -1; + } +} + s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, enum BAND_TYPE band_type, enum CHANNEL_WIDTH bandwidth, u8 rf_path, u8 data_rate, u8 channel) @@ -1666,68 +1712,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (bandwidth == CHANNEL_WIDTH_160) idx_bandwidth = 3; - switch (data_rate) { - case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: - idx_rate_sctn = 0; - break; - - case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: - case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: - idx_rate_sctn = 1; - break; - - case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: - case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: - idx_rate_sctn = 2; - break; - - case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: - case MGN_MCS12: case MGN_MCS13: case MGN_MCS14: case MGN_MCS15: - idx_rate_sctn = 3; - break; - - case MGN_MCS16: case MGN_MCS17: case MGN_MCS18: case MGN_MCS19: - case MGN_MCS20: case MGN_MCS21: case MGN_MCS22: case MGN_MCS23: - idx_rate_sctn = 4; - break; - - case MGN_MCS24: case MGN_MCS25: case MGN_MCS26: case MGN_MCS27: - case MGN_MCS28: case MGN_MCS29: case MGN_MCS30: case MGN_MCS31: - idx_rate_sctn = 5; - break; - - case MGN_VHT1SS_MCS0: case MGN_VHT1SS_MCS1: case MGN_VHT1SS_MCS2: - case MGN_VHT1SS_MCS3: case MGN_VHT1SS_MCS4: case MGN_VHT1SS_MCS5: - case MGN_VHT1SS_MCS6: case MGN_VHT1SS_MCS7: case MGN_VHT1SS_MCS8: - case MGN_VHT1SS_MCS9: - idx_rate_sctn = 6; - break; - - case MGN_VHT2SS_MCS0: case MGN_VHT2SS_MCS1: case MGN_VHT2SS_MCS2: - case MGN_VHT2SS_MCS3: case MGN_VHT2SS_MCS4: case MGN_VHT2SS_MCS5: - case MGN_VHT2SS_MCS6: case MGN_VHT2SS_MCS7: case MGN_VHT2SS_MCS8: -
[PATCH 01/11] staging: rtl8723bs: Clean up whitespace in 'PHY_GetTxPowerLimit()'.
Wrap lines longer than 80 characters where possible, delete double newlines, and fix alignment per the kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 110 ++ 1 file changed, 59 insertions(+), 51 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 3922d0308a81..5f727a7c16fd 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,46 +1612,45 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 PHY_GetTxPowerLimit( - struct adapter *Adapter, - u32 RegPwrTblSel, - enum BAND_TYPE Band, - enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, - u8 DataRate, - u8 Channel -) +s8 PHY_GetTxPowerLimit(struct adapter *Adapter, u32 RegPwrTblSel, + enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, + u8 RfPath, u8 DataRate, u8 Channel) { - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - s16 band = -1, regulation = -1, bandwidth = -1, rateSection = -1, channel = -1; + s16 band= -1; + s16 regulation = -1; + s16 bandwidth = -1; + s16 rateSection = -1; + s16 channel = -1; s8 powerLimit = MAX_POWER_INDEX; + struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - if ((Adapter->registrypriv.RegEnableTxPowerLimit == 2 && pHalData->EEPROMRegulatory != 1) || - Adapter->registrypriv.RegEnableTxPowerLimit == 0) + if (((Adapter->registrypriv.RegEnableTxPowerLimit == 2) && +(pHalData->EEPROMRegulatory != 1)) || + (Adapter->registrypriv.RegEnableTxPowerLimit == 0)) return MAX_POWER_INDEX; switch (Adapter->registrypriv.RegPwrTblSel) { case 1: - regulation = TXPWR_LMT_ETSI; - break; + regulation = TXPWR_LMT_ETSI; + break; case 2: - regulation = TXPWR_LMT_MKK; - break; + regulation = TXPWR_LMT_MKK; + break; case 3: - regulation = TXPWR_LMT_FCC; - break; - + regulation = TXPWR_LMT_FCC; + break; case 4: - regulation = TXPWR_LMT_WW; - break; - + regulation = TXPWR_LMT_WW; + break; default: - regulation = (Band == BAND_ON_2_4G) ? pHalData->Regulation2_4G : pHalData->Regulation5G; - break; + regulation = (Band == BAND_ON_2_4G) ? + pHalData->Regulation2_4G : + pHalData->Regulation5G; + break; } - /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", Adapter->registrypriv.RegPwrTblSel, regulation); */ - + /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", */ + /* Adapter->registrypriv.RegPwrTblSel, regulation); */ if (Band == BAND_ON_2_4G) band = 0; @@ -1730,8 +1729,8 @@ s8 PHY_GetTxPowerLimit( break; } - if (Band == BAND_ON_5G && rateSection == 0) - DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate); + if (Band == BAND_ON_5G && rateSection == 0) +DBG_871X("Wrong rate 0x%x: No CCK in 5G Band\n", DataRate); /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ @@ -1745,22 +1744,26 @@ s8 PHY_GetTxPowerLimit( /* workaround for wrong indxe combination to obtain tx power limit, */ /* HT on 80M will reference to HT on 40M */ - if ((rateSection == 2 || rateSection == 3) && Band == BAND_ON_5G && bandwidth == 2) { + if ((rateSection == 2 || rateSection == 3) && + Band == BAND_ON_5G && bandwidth == 2) { bandwidth = 1; } if (Band == BAND_ON_2_4G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, Channel); + channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, + Channel); else if (Band == BAND_ON_5G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, Channel); + channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, + Channel); else if (Band == BAND_ON_BOTH) { /* BAND_ON_BOTH don't care temporarily */
[PATCH 07/11] staging: rtl8723bs: Move bandwidth index lookup to new function.
Factoring out the conditional lookup of bandwidth index into the power limit table into it's own function simplifies the logic of 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 26 --- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 4b5219481b33..6d8a07ac7bb3 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,6 +1612,22 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } +static s16 get_bandwidth_idx(const enum CHANNEL_WIDTH bandwidth) +{ + switch (bandwidth) { + case CHANNEL_WIDTH_20: + return 0; + case CHANNEL_WIDTH_40: + return 1; + case CHANNEL_WIDTH_80: + return 2; + case CHANNEL_WIDTH_160: + return 3; + default: + return -1; + } +} + static s16 get_rate_sctn_idx(const u8 rate) { switch (rate) { @@ -1703,15 +1719,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (band_type == BAND_ON_5G) idx_band = 1; - if (bandwidth == CHANNEL_WIDTH_20) - idx_bandwidth = 0; - else if (bandwidth == CHANNEL_WIDTH_40) - idx_bandwidth = 1; - else if (bandwidth == CHANNEL_WIDTH_80) - idx_bandwidth = 2; - else if (bandwidth == CHANNEL_WIDTH_160) - idx_bandwidth = 3; - + idx_bandwidth = get_bandwidth_idx(bandwidth); idx_rate_sctn = get_rate_sctn_idx(data_rate); if (band_type == BAND_ON_5G && idx_rate_sctn == 0) -- 2.17.1
[PATCH 06/11] staging: rtl8723bs: Move rate section index lookup to new function.
The rate section lookup is a large switch statement in the middle of 'phy_get_tx_pwr_lmt()'; refactor this statement into it's own function for increased readability. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 109 -- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 6ae646ec3d06..4b5219481b33 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,6 +1612,52 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } +static s16 get_rate_sctn_idx(const u8 rate) +{ + switch (rate) { + case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: + return 0; + case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: + case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: + return 1; + case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: + case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: + return 2; + case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: + case MGN_MCS12: case MGN_MCS13: case MGN_MCS14: case MGN_MCS15: + return 3; + case MGN_MCS16: case MGN_MCS17: case MGN_MCS18: case MGN_MCS19: + case MGN_MCS20: case MGN_MCS21: case MGN_MCS22: case MGN_MCS23: + return 4; + case MGN_MCS24: case MGN_MCS25: case MGN_MCS26: case MGN_MCS27: + case MGN_MCS28: case MGN_MCS29: case MGN_MCS30: case MGN_MCS31: + return 5; + case MGN_VHT1SS_MCS0: case MGN_VHT1SS_MCS1: case MGN_VHT1SS_MCS2: + case MGN_VHT1SS_MCS3: case MGN_VHT1SS_MCS4: case MGN_VHT1SS_MCS5: + case MGN_VHT1SS_MCS6: case MGN_VHT1SS_MCS7: case MGN_VHT1SS_MCS8: + case MGN_VHT1SS_MCS9: + return 6; + case MGN_VHT2SS_MCS0: case MGN_VHT2SS_MCS1: case MGN_VHT2SS_MCS2: + case MGN_VHT2SS_MCS3: case MGN_VHT2SS_MCS4: case MGN_VHT2SS_MCS5: + case MGN_VHT2SS_MCS6: case MGN_VHT2SS_MCS7: case MGN_VHT2SS_MCS8: + case MGN_VHT2SS_MCS9: + return 7; + case MGN_VHT3SS_MCS0: case MGN_VHT3SS_MCS1: case MGN_VHT3SS_MCS2: + case MGN_VHT3SS_MCS3: case MGN_VHT3SS_MCS4: case MGN_VHT3SS_MCS5: + case MGN_VHT3SS_MCS6: case MGN_VHT3SS_MCS7: case MGN_VHT3SS_MCS8: + case MGN_VHT3SS_MCS9: + return 8; + case MGN_VHT4SS_MCS0: case MGN_VHT4SS_MCS1: case MGN_VHT4SS_MCS2: + case MGN_VHT4SS_MCS3: case MGN_VHT4SS_MCS4: case MGN_VHT4SS_MCS5: + case MGN_VHT4SS_MCS6: case MGN_VHT4SS_MCS7: case MGN_VHT4SS_MCS8: + case MGN_VHT4SS_MCS9: + return 9; + default: + DBG_871X("Wrong rate 0x%x\n", rate); + return -1; + } +} + s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, enum BAND_TYPE band_type, enum CHANNEL_WIDTH bandwidth, u8 rf_path, u8 data_rate, u8 channel) @@ -1666,68 +1712,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, else if (bandwidth == CHANNEL_WIDTH_160) idx_bandwidth = 3; - switch (data_rate) { - case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: - idx_rate_sctn = 0; - break; - - case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: - case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: - idx_rate_sctn = 1; - break; - - case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: - case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: - idx_rate_sctn = 2; - break; - - case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: - case MGN_MCS12: case MGN_MCS13: case MGN_MCS14: case MGN_MCS15: - idx_rate_sctn = 3; - break; - - case MGN_MCS16: case MGN_MCS17: case MGN_MCS18: case MGN_MCS19: - case MGN_MCS20: case MGN_MCS21: case MGN_MCS22: case MGN_MCS23: - idx_rate_sctn = 4; - break; - - case MGN_MCS24: case MGN_MCS25: case MGN_MCS26: case MGN_MCS27: - case MGN_MCS28: case MGN_MCS29: case MGN_MCS30: case MGN_MCS31: - idx_rate_sctn = 5; - break; - - case MGN_VHT1SS_MCS0: case MGN_VHT1SS_MCS1: case MGN_VHT1SS_MCS2: - case MGN_VHT1SS_MCS3: case MGN_VHT1SS_MCS4: case MGN_VHT1SS_MCS5: - case MGN_VHT1SS_MCS6: case MGN_VHT1SS_MCS7: case MGN_VHT1SS_MCS8: - case MGN_VHT1SS_MCS9: - idx_rate_sctn = 6; - break; - - case MGN_VHT2SS_MCS0: case MGN_VHT2SS_MCS1: case MGN_VHT2SS_MCS2: - case MGN_VHT2SS_MCS3: case MGN_VHT2SS_MCS4: case MGN_VHT2SS_MCS5: - case MGN_VHT2SS_MCS6: case MGN_VHT2SS_MCS7: case MGN_VHT2SS_MCS8: -
[PATCH 04/11] staging: rtl8723bs: Combine if statements with equivalent body.
Two if statements that carry out the same operation can be combined with a logical OR. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 7e27d7ff29fa..5d44aee44eb1 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1734,12 +1734,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ - if (idx_rate_sctn == 1) - idx_bandwidth = 0; - - /* workaround for wrong index combination to obtain tx power limit, */ /* CCK table will only be given in BW 20M */ - if (idx_rate_sctn == 0) + if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; /* workaround for wrong indxe combination to obtain tx power limit, */ -- 2.17.1
[PATCH 08/11] staging: rtl8723bs: Fix spelling mistake in comment.
Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 6d8a07ac7bb3..dd097df86fa3 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1731,7 +1731,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; - /* workaround for wrong indxe combination to obtain tx power limit, */ + /* workaround for wrong index combination to obtain tx power limit, */ /* HT on 80M will reference to HT on 40M */ if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && band_type == BAND_ON_5G && idx_bandwidth == 2) { -- 2.17.1
[PATCH 04/11] staging: rtl8723bs: Combine if statements with equivalent body.
Two if statements that carry out the same operation can be combined with a logical OR. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 7e27d7ff29fa..5d44aee44eb1 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1734,12 +1734,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ - if (idx_rate_sctn == 1) - idx_bandwidth = 0; - - /* workaround for wrong index combination to obtain tx power limit, */ /* CCK table will only be given in BW 20M */ - if (idx_rate_sctn == 0) + if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; /* workaround for wrong indxe combination to obtain tx power limit, */ -- 2.17.1
[PATCH 08/11] staging: rtl8723bs: Fix spelling mistake in comment.
Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 6d8a07ac7bb3..dd097df86fa3 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1731,7 +1731,7 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; - /* workaround for wrong indxe combination to obtain tx power limit, */ + /* workaround for wrong index combination to obtain tx power limit, */ /* HT on 80M will reference to HT on 40M */ if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && band_type == BAND_ON_5G && idx_bandwidth == 2) { -- 2.17.1
[PATCH 11/11] staging: rtl8723bs: Add missing curly braces on else statement.
Fix 'braces {} should be used on all arms of this statement' coding style problem in 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 0e49f0973c12..0d2c61b67d0e 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1780,8 +1780,9 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, [idx_rate_sctn] [idx_channel] [rf_path]; - } else + } else { DBG_871X("No power limit table of the specified band\n"); + } /* combine 5G VHT & HT rate */ /* 5G 20M and 40M HT and VHT can cross reference */ -- 2.17.1
[PATCH 03/11] staging: rtl8723bs: Fix camel-case names in phy_get_tx_pwr_lmt().
Change camel-case names to snake-case names; to avoid variable name conflicts, rename table index variables to idx_*. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 200 +- 1 file changed, 105 insertions(+), 95 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 4ab624f5ece0..7e27d7ff29fa 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,211 +1612,221 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 phy_get_tx_pwr_lmt(struct adapter *Adapter, u32 RegPwrTblSel, - enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, u8 DataRate, u8 Channel) +s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, + enum BAND_TYPE band_type, enum CHANNEL_WIDTH bandwidth, + u8 rf_path, u8 data_rate, u8 channel) { - s16 band= -1; - s16 regulation = -1; - s16 bandwidth = -1; - s16 rateSection = -1; - s16 channel = -1; - s8 powerLimit = MAX_POWER_INDEX; - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - - if (((Adapter->registrypriv.RegEnableTxPowerLimit == 2) && -(pHalData->EEPROMRegulatory != 1)) || - (Adapter->registrypriv.RegEnableTxPowerLimit == 0)) + s16 idx_band = -1; + s16 idx_regulation = -1; + s16 idx_bandwidth = -1; + s16 idx_rate_sctn = -1; + s16 idx_channel= -1; + s8 pwr_lmt = MAX_POWER_INDEX; + struct hal_com_data *hal_data = GET_HAL_DATA(adapter); + + if (((adapter->registrypriv.RegEnableTxPowerLimit == 2) && +(hal_data->EEPROMRegulatory != 1)) || + (adapter->registrypriv.RegEnableTxPowerLimit == 0)) return MAX_POWER_INDEX; - switch (Adapter->registrypriv.RegPwrTblSel) { + switch (adapter->registrypriv.RegPwrTblSel) { case 1: - regulation = TXPWR_LMT_ETSI; + idx_regulation = TXPWR_LMT_ETSI; break; case 2: - regulation = TXPWR_LMT_MKK; + idx_regulation = TXPWR_LMT_MKK; break; case 3: - regulation = TXPWR_LMT_FCC; + idx_regulation = TXPWR_LMT_FCC; break; case 4: - regulation = TXPWR_LMT_WW; + idx_regulation = TXPWR_LMT_WW; break; default: - regulation = (Band == BAND_ON_2_4G) ? - pHalData->Regulation2_4G : - pHalData->Regulation5G; + idx_regulation = (band_type == BAND_ON_2_4G) ? + hal_data->Regulation2_4G : + hal_data->Regulation5G; break; } /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", */ - /* Adapter->registrypriv.RegPwrTblSel, regulation); */ - - if (Band == BAND_ON_2_4G) - band = 0; - else if (Band == BAND_ON_5G) - band = 1; - - if (Bandwidth == CHANNEL_WIDTH_20) - bandwidth = 0; - else if (Bandwidth == CHANNEL_WIDTH_40) - bandwidth = 1; - else if (Bandwidth == CHANNEL_WIDTH_80) - bandwidth = 2; - else if (Bandwidth == CHANNEL_WIDTH_160) - bandwidth = 3; - - switch (DataRate) { + /* adapter->registrypriv.RegPwrTblSel, idx_regulation); */ + + if (band_type == BAND_ON_2_4G) + idx_band = 0; + else if (band_type == BAND_ON_5G) + idx_band = 1; + + if (bandwidth == CHANNEL_WIDTH_20) + idx_bandwidth = 0; + else if (bandwidth == CHANNEL_WIDTH_40) + idx_bandwidth = 1; + else if (bandwidth == CHANNEL_WIDTH_80) + idx_bandwidth = 2; + else if (bandwidth == CHANNEL_WIDTH_160) + idx_bandwidth = 3; + + switch (data_rate) { case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: - rateSection = 0; + idx_rate_sctn = 0; break; case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: - rateSection = 1; + idx_rate_sctn = 1; break; case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: - rateSection = 2; + idx_rate_sctn = 2; break; case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: case MGN_MCS12: case MGN
[PATCH 11/11] staging: rtl8723bs: Add missing curly braces on else statement.
Fix 'braces {} should be used on all arms of this statement' coding style problem in 'phy_get_tx_pwr_lmt()'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 0e49f0973c12..0d2c61b67d0e 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1780,8 +1780,9 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, [idx_rate_sctn] [idx_channel] [rf_path]; - } else + } else { DBG_871X("No power limit table of the specified band\n"); + } /* combine 5G VHT & HT rate */ /* 5G 20M and 40M HT and VHT can cross reference */ -- 2.17.1
[PATCH 03/11] staging: rtl8723bs: Fix camel-case names in phy_get_tx_pwr_lmt().
Change camel-case names to snake-case names; to avoid variable name conflicts, rename table index variables to idx_*. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/hal_com_phycfg.c| 200 +- 1 file changed, 105 insertions(+), 95 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 4ab624f5ece0..7e27d7ff29fa 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1612,211 +1612,221 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) return channelIndex; } -s8 phy_get_tx_pwr_lmt(struct adapter *Adapter, u32 RegPwrTblSel, - enum BAND_TYPE Band, enum CHANNEL_WIDTH Bandwidth, - u8 RfPath, u8 DataRate, u8 Channel) +s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, + enum BAND_TYPE band_type, enum CHANNEL_WIDTH bandwidth, + u8 rf_path, u8 data_rate, u8 channel) { - s16 band= -1; - s16 regulation = -1; - s16 bandwidth = -1; - s16 rateSection = -1; - s16 channel = -1; - s8 powerLimit = MAX_POWER_INDEX; - struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - - if (((Adapter->registrypriv.RegEnableTxPowerLimit == 2) && -(pHalData->EEPROMRegulatory != 1)) || - (Adapter->registrypriv.RegEnableTxPowerLimit == 0)) + s16 idx_band = -1; + s16 idx_regulation = -1; + s16 idx_bandwidth = -1; + s16 idx_rate_sctn = -1; + s16 idx_channel= -1; + s8 pwr_lmt = MAX_POWER_INDEX; + struct hal_com_data *hal_data = GET_HAL_DATA(adapter); + + if (((adapter->registrypriv.RegEnableTxPowerLimit == 2) && +(hal_data->EEPROMRegulatory != 1)) || + (adapter->registrypriv.RegEnableTxPowerLimit == 0)) return MAX_POWER_INDEX; - switch (Adapter->registrypriv.RegPwrTblSel) { + switch (adapter->registrypriv.RegPwrTblSel) { case 1: - regulation = TXPWR_LMT_ETSI; + idx_regulation = TXPWR_LMT_ETSI; break; case 2: - regulation = TXPWR_LMT_MKK; + idx_regulation = TXPWR_LMT_MKK; break; case 3: - regulation = TXPWR_LMT_FCC; + idx_regulation = TXPWR_LMT_FCC; break; case 4: - regulation = TXPWR_LMT_WW; + idx_regulation = TXPWR_LMT_WW; break; default: - regulation = (Band == BAND_ON_2_4G) ? - pHalData->Regulation2_4G : - pHalData->Regulation5G; + idx_regulation = (band_type == BAND_ON_2_4G) ? + hal_data->Regulation2_4G : + hal_data->Regulation5G; break; } /* DBG_871X("pMgntInfo->RegPwrTblSel %d, final regulation %d\n", */ - /* Adapter->registrypriv.RegPwrTblSel, regulation); */ - - if (Band == BAND_ON_2_4G) - band = 0; - else if (Band == BAND_ON_5G) - band = 1; - - if (Bandwidth == CHANNEL_WIDTH_20) - bandwidth = 0; - else if (Bandwidth == CHANNEL_WIDTH_40) - bandwidth = 1; - else if (Bandwidth == CHANNEL_WIDTH_80) - bandwidth = 2; - else if (Bandwidth == CHANNEL_WIDTH_160) - bandwidth = 3; - - switch (DataRate) { + /* adapter->registrypriv.RegPwrTblSel, idx_regulation); */ + + if (band_type == BAND_ON_2_4G) + idx_band = 0; + else if (band_type == BAND_ON_5G) + idx_band = 1; + + if (bandwidth == CHANNEL_WIDTH_20) + idx_bandwidth = 0; + else if (bandwidth == CHANNEL_WIDTH_40) + idx_bandwidth = 1; + else if (bandwidth == CHANNEL_WIDTH_80) + idx_bandwidth = 2; + else if (bandwidth == CHANNEL_WIDTH_160) + idx_bandwidth = 3; + + switch (data_rate) { case MGN_1M: case MGN_2M: case MGN_5_5M: case MGN_11M: - rateSection = 0; + idx_rate_sctn = 0; break; case MGN_6M: case MGN_9M: case MGN_12M: case MGN_18M: case MGN_24M: case MGN_36M: case MGN_48M: case MGN_54M: - rateSection = 1; + idx_rate_sctn = 1; break; case MGN_MCS0: case MGN_MCS1: case MGN_MCS2: case MGN_MCS3: case MGN_MCS4: case MGN_MCS5: case MGN_MCS6: case MGN_MCS7: - rateSection = 2; + idx_rate_sctn = 2; break; case MGN_MCS8: case MGN_MCS9: case MGN_MCS10: case MGN_MCS11: case MGN_MCS12: case MGN
[PATCH 09/11] staging: rtl8723bs: Merge conditionals with similar bodies.
Two conditionals that set 'channel' based on 'band_type' in 'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index dd097df86fa3..9e6dc238c028 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1738,12 +1738,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, idx_bandwidth = 1; } - if (band_type == BAND_ON_2_4G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, - channel); - else if (band_type == BAND_ON_5G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, - channel); + if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G) + channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel); if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 || idx_rate_sctn == -1 || idx_channel == -1) { -- 2.17.1
[PATCH 09/11] staging: rtl8723bs: Merge conditionals with similar bodies.
Two conditionals that set 'channel' based on 'band_type' in 'phy_get_tx_pwr_lmt()' can be simplified into one single-line conditional. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index dd097df86fa3..9e6dc238c028 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1738,12 +1738,8 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, idx_bandwidth = 1; } - if (band_type == BAND_ON_2_4G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_2_4G, - channel); - else if (band_type == BAND_ON_5G) - channel = phy_GetChannelIndexOfTxPowerLimit(BAND_ON_5G, - channel); + if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G) + channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel); if (idx_band == -1 || idx_regulation == -1 || idx_bandwidth == -1 || idx_rate_sctn == -1 || idx_channel == -1) { -- 2.17.1
[PATCH 10/11] staging: rtl8723bs: Merge workaround conditionals into single else-if.
The if conditionals used to work around wrong TX power limit indices can be condensed into a single if/else-if statement for more concise expression. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 9e6dc238c028..0e49f0973c12 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1728,15 +1728,12 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ /* CCK table will only be given in BW 20M */ + /* HT on 80M will reference to HT on 40M */ if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; - - /* workaround for wrong index combination to obtain tx power limit, */ - /* HT on 80M will reference to HT on 40M */ - if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && - band_type == BAND_ON_5G && idx_bandwidth == 2) { + else if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && +(band_type == BAND_ON_5G) && (idx_bandwidth == 2)) idx_bandwidth = 1; - } if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G) channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel); -- 2.17.1
[PATCH 10/11] staging: rtl8723bs: Merge workaround conditionals into single else-if.
The if conditionals used to work around wrong TX power limit indices can be condensed into a single if/else-if statement for more concise expression. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 9e6dc238c028..0e49f0973c12 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -1728,15 +1728,12 @@ s8 phy_get_tx_pwr_lmt(struct adapter *adapter, u32 reg_pwr_tbl_sel, /* workaround for wrong index combination to obtain tx power limit, */ /* OFDM only exists in BW 20M */ /* CCK table will only be given in BW 20M */ + /* HT on 80M will reference to HT on 40M */ if (idx_rate_sctn == 0 || idx_rate_sctn == 1) idx_bandwidth = 0; - - /* workaround for wrong index combination to obtain tx power limit, */ - /* HT on 80M will reference to HT on 40M */ - if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && - band_type == BAND_ON_5G && idx_bandwidth == 2) { + else if ((idx_rate_sctn == 2 || idx_rate_sctn == 3) && +(band_type == BAND_ON_5G) && (idx_bandwidth == 2)) idx_bandwidth = 1; - } if (band_type == BAND_ON_2_4G || band_type == BAND_ON_5G) channel = phy_GetChannelIndexOfTxPowerLimit(band_type, channel); -- 2.17.1
[PATCH 4/9] staging: rtl8723bs: Clean up whitespace in 'rtl8723_hal.h'.
Make alignment and whitespace more consistent within the file 'rtl8723_hal.h' and with the kernel coding style guidelines. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- .../staging/rtl8723bs/include/rtl8723b_hal.h | 261 ++ 1 file changed, 144 insertions(+), 117 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index eedc765b6a6e..8ce4f7a9edc3 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -21,29 +21,30 @@ #include "hal_phy_cfg.h" /* */ -/* RTL8723B From file */ +/* RTL8723B From file */ /* */ - #define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" - #define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" - #define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" - #define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" - #define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" - #define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" - #define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" - #define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" - #define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" - #define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" - #define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" +#define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" +#define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" +#define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" +#define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" +#define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" +#define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" +#define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" +#define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" +#define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" +#define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" +#define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" /* */ -/* RTL8723B From header */ +/* RTL8723B From header */ /* */ -#define FW_8723B_SIZE 0x8000 -#define FW_8723B_START_ADDRESS 0x1000 -#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ +#define FW_8723B_SIZE 0x8000 +#define FW_8723B_START_ADDRESS 0x1000 +#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) ((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ + ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; @@ -55,126 +56,139 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category;/* AP/NIC and USB/PCI */ - u8 Function;/* Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + * 88C1: MP A-cut; 92C1: MP A-cut */ + u8 Category; /* AP/NIC and USB/PCI */ + u8 Function; /* Reserved for different FW function indcation, for + * further use when driver needs to download + * different FW in different conditions. */ + __le16 Version;/* FW Version */ + __le16 Subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date;/* Release time Date field */ - u8 Hour;/* Release time Hour field */ - u8 Minute; /* Release time Minute field */ - __le16 RamCodeSize;/* The size of RAM code */ - __le16 Rsvd2; + u8 Month; /* Release time Month field */ + u8 Date; /* Release time Date field */ + u8 Hour; /* Release time Hour field */ + u8 Minute; /* Release time Minute field */ + + __le16 RamCodeSize; /* The size of RAM code */ + __le16 Rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ -
[PATCH 4/9] staging: rtl8723bs: Clean up whitespace in 'rtl8723_hal.h'.
Make alignment and whitespace more consistent within the file 'rtl8723_hal.h' and with the kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/include/rtl8723b_hal.h | 261 ++ 1 file changed, 144 insertions(+), 117 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index eedc765b6a6e..8ce4f7a9edc3 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -21,29 +21,30 @@ #include "hal_phy_cfg.h" /* */ -/* RTL8723B From file */ +/* RTL8723B From file */ /* */ - #define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" - #define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" - #define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" - #define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" - #define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" - #define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" - #define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" - #define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" - #define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" - #define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" - #define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" +#define RTL8723B_FW_IMG "rtl8723b/FW_NIC.bin" +#define RTL8723B_FW_WW_IMG "rtl8723b/FW_WoWLAN.bin" +#define RTL8723B_PHY_REG "rtl8723b/PHY_REG.txt" +#define RTL8723B_PHY_RADIO_A "rtl8723b/RadioA.txt" +#define RTL8723B_PHY_RADIO_B "rtl8723b/RadioB.txt" +#define RTL8723B_TXPWR_TRACK "rtl8723b/TxPowerTrack.txt" +#define RTL8723B_AGC_TAB "rtl8723b/AGC_TAB.txt" +#define RTL8723B_PHY_MACREG "rtl8723b/MAC_REG.txt" +#define RTL8723B_PHY_REG_PG "rtl8723b/PHY_REG_PG.txt" +#define RTL8723B_PHY_REG_MP "rtl8723b/PHY_REG_MP.txt" +#define RTL8723B_TXPWR_LMT "rtl8723b/TXPWR_LMT.txt" /* */ -/* RTL8723B From header */ +/* RTL8723B From header */ /* */ -#define FW_8723B_SIZE 0x8000 -#define FW_8723B_START_ADDRESS 0x1000 -#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ +#define FW_8723B_SIZE 0x8000 +#define FW_8723B_START_ADDRESS 0x1000 +#define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) ((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ + ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; @@ -55,126 +56,139 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category;/* AP/NIC and USB/PCI */ - u8 Function;/* Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + * 88C1: MP A-cut; 92C1: MP A-cut */ + u8 Category; /* AP/NIC and USB/PCI */ + u8 Function; /* Reserved for different FW function indcation, for + * further use when driver needs to download + * different FW in different conditions. */ + __le16 Version;/* FW Version */ + __le16 Subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date;/* Release time Date field */ - u8 Hour;/* Release time Hour field */ - u8 Minute; /* Release time Minute field */ - __le16 RamCodeSize;/* The size of RAM code */ - __le16 Rsvd2; + u8 Month; /* Release time Month field */ + u8 Date; /* Release time Date field */ + u8 Hour; /* Release time Hour field */ + u8 Minute; /* Release time Minute field */ + + __le16 RamCodeSize; /* The size of RAM code */ + __le16 Rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ - __le32 Rsvd3; + __
[PATCH 2/9] staging: rtl8723bs: Rename 'Hal8723bPhyReg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header using snake case instead. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- .../rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h b/drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h rename to drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 46ac61b058c8..c2b71b4e4982 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -17,7 +17,7 @@ #include "rtl8723b_cmd.h" #include "rtw_mp.h" #include "hal_pwr_seq.h" -#include "Hal8723BPhyReg.h" +#include "hal_phy_reg_8723b.h" #include "Hal8723BPhyCfg.h" /* */ -- 2.17.0
[PATCH 2/9] staging: rtl8723bs: Rename 'Hal8723bPhyReg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header using snake case instead. Signed-off-by: Quytelda Kahja --- .../rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyReg.h => hal_phy_reg_8723b.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h b/drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyReg.h rename to drivers/staging/rtl8723bs/include/hal_phy_reg_8723b.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 46ac61b058c8..c2b71b4e4982 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -17,7 +17,7 @@ #include "rtl8723b_cmd.h" #include "rtw_mp.h" #include "hal_pwr_seq.h" -#include "Hal8723BPhyReg.h" +#include "hal_phy_reg_8723b.h" #include "Hal8723BPhyCfg.h" /* */ -- 2.17.0
[PATCH 3/9] staging: rtl8723bs: Rename 'Hal8723BPhyCfg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header file using snake case instead. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- .../rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h rename to drivers/staging/rtl8723bs/include/hal_phy_cfg.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index c2b71b4e4982..eedc765b6a6e 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -18,7 +18,7 @@ #include "rtw_mp.h" #include "hal_pwr_seq.h" #include "hal_phy_reg_8723b.h" -#include "Hal8723BPhyCfg.h" +#include "hal_phy_cfg.h" /* */ /* RTL8723B From file */ -- 2.17.0
[PATCH 3/9] staging: rtl8723bs: Rename 'Hal8723BPhyCfg.h' using snake case.
Camel-case is discouraged in the linux kernel coding style. Rename this header file using snake case instead. Signed-off-by: Quytelda Kahja --- .../rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/staging/rtl8723bs/include/{Hal8723BPhyCfg.h => hal_phy_cfg.h} (100%) diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h rename to drivers/staging/rtl8723bs/include/hal_phy_cfg.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index c2b71b4e4982..eedc765b6a6e 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -18,7 +18,7 @@ #include "rtw_mp.h" #include "hal_pwr_seq.h" #include "hal_phy_reg_8723b.h" -#include "Hal8723BPhyCfg.h" +#include "hal_phy_cfg.h" /* */ /* RTL8723B From file */ -- 2.17.0
[PATCH 7/9] staging: rtl8723bs: Fix spelling/grammar errors in comment.
Fix the spelling/grammar errors in the comment block describing the 'Function' member of 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 42f467abc6b5..8897deb963c7 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -59,8 +59,8 @@ struct rt_firmware_hdr { __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indcation, for - * further use when driver needs to download + u8 Function; /* Reserved for different FW function indications, + * for further use when driver needs to download * different FW in different conditions. */ __le16 Version;/* FW Version */ __le16 Subversion; /* FW Subversion, default 0x00 */ -- 2.17.0
[PATCH 8/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware_hdr'.
Replace camel-case member names with snake-case names per the linux kernel coding style guidelines. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 14 .../staging/rtl8723bs/include/rtl8723b_hal.h | 32 +-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 984c8b181fd4..592917fc00aa 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -445,9 +445,9 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; - pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->Version); - pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->Subversion); - pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->Signature); + pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->version); + pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->subversion); + pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->signature); DBG_871X( "%s: fw_ver =%x fw_subver =%04x sig = 0x%x, Month =%02x, Date =%02x, Hour =%02x, Minute =%02x\n", @@ -455,10 +455,10 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) pHalData->FirmwareVersion, pHalData->FirmwareSubVersion, pHalData->FirmwareSignature, - pFwHdr->Month, - pFwHdr->Date, - pFwHdr->Hour, - pFwHdr->Minute + pFwHdr->month, + pFwHdr->date, + pFwHdr->hour, + pFwHdr->minute ); if (IS_FW_HEADER_EXIST_8723B(pFwHdr)) { diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8897deb963c7..946236f704fe 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -44,7 +44,7 @@ #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ - ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) + ((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 fw_length; @@ -56,31 +56,31 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + __le16 signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indications, + u8 category; /* AP/NIC and USB/PCI */ + u8 function; /* Reserved for different FW function indications, * for further use when driver needs to download * different FW in different conditions. */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 version;/* FW Version */ + __le16 subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date; /* Release time Date field */ - u8 Hour; /* Release time Hour field */ - u8 Minute; /* Release time Minute field */ + u8 month; /* Release time Month field */ + u8 date; /* Release time Date field */ + u8 hour; /* Release time Hour field */ + u8 minute; /* Release time Minute field */ - __le16 RamCodeSize; /* The size of RAM code */ - __le16 Rsvd2; + __le16 ram_code_size; /* The size of RAM code */ + __le16 rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ - __le32 Rsvd3; + __le32 svn_idx; /* The SVN entry index */ + __le32 rsvd3; /* LONG WORD 3 */ - __le32 Rsvd4; - __le32 Rsvd5; + __le32 rsvd4; + __le32 rsvd5; }; #define DRIVER_EARLY_INT_TIME_8723B 0x05 -- 2.17.0
[PATCH 7/9] staging: rtl8723bs: Fix spelling/grammar errors in comment.
Fix the spelling/grammar errors in the comment block describing the 'Function' member of 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 42f467abc6b5..8897deb963c7 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -59,8 +59,8 @@ struct rt_firmware_hdr { __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indcation, for - * further use when driver needs to download + u8 Function; /* Reserved for different FW function indications, + * for further use when driver needs to download * different FW in different conditions. */ __le16 Version;/* FW Version */ __le16 Subversion; /* FW Subversion, default 0x00 */ -- 2.17.0
[PATCH 8/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware_hdr'.
Replace camel-case member names with snake-case names per the linux kernel coding style guidelines. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 14 .../staging/rtl8723bs/include/rtl8723b_hal.h | 32 +-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 984c8b181fd4..592917fc00aa 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -445,9 +445,9 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; - pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->Version); - pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->Subversion); - pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->Signature); + pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->version); + pHalData->FirmwareSubVersion = le16_to_cpu(pFwHdr->subversion); + pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->signature); DBG_871X( "%s: fw_ver =%x fw_subver =%04x sig = 0x%x, Month =%02x, Date =%02x, Hour =%02x, Minute =%02x\n", @@ -455,10 +455,10 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) pHalData->FirmwareVersion, pHalData->FirmwareSubVersion, pHalData->FirmwareSignature, - pFwHdr->Month, - pFwHdr->Date, - pFwHdr->Hour, - pFwHdr->Minute + pFwHdr->month, + pFwHdr->date, + pFwHdr->hour, + pFwHdr->minute ); if (IS_FW_HEADER_EXIST_8723B(pFwHdr)) { diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8897deb963c7..946236f704fe 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -44,7 +44,7 @@ #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ #define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ - ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) + ((le16_to_cpu(fw_hdr->signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 fw_length; @@ -56,31 +56,31 @@ struct rt_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 */ - __le16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; + __le16 signature; /* 92C0: test chip; 92C, 88C0: test chip; * 88C1: MP A-cut; 92C1: MP A-cut */ - u8 Category; /* AP/NIC and USB/PCI */ - u8 Function; /* Reserved for different FW function indications, + u8 category; /* AP/NIC and USB/PCI */ + u8 function; /* Reserved for different FW function indications, * for further use when driver needs to download * different FW in different conditions. */ - __le16 Version;/* FW Version */ - __le16 Subversion; /* FW Subversion, default 0x00 */ + __le16 version;/* FW Version */ + __le16 subversion; /* FW Subversion, default 0x00 */ /* LONG WORD 1 */ - u8 Month; /* Release time Month field */ - u8 Date; /* Release time Date field */ - u8 Hour; /* Release time Hour field */ - u8 Minute; /* Release time Minute field */ + u8 month; /* Release time Month field */ + u8 date; /* Release time Date field */ + u8 hour; /* Release time Hour field */ + u8 minute; /* Release time Minute field */ - __le16 RamCodeSize; /* The size of RAM code */ - __le16 Rsvd2; + __le16 ram_code_size; /* The size of RAM code */ + __le16 rsvd2; /* LONG WORD 2 */ - __le32 SvnIdx; /* The SVN entry index */ - __le32 Rsvd3; + __le32 svn_idx; /* The SVN entry index */ + __le32 rsvd3; /* LONG WORD 3 */ - __le32 Rsvd4; - __le32 Rsvd5; + __le32 rsvd4; + __le32 rsvd5; }; #define DRIVER_EARLY_INT_TIME_8723B 0x05 -- 2.17.0
[PATCH 6/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware'.
Change the members of 'struct rt_firmware' to be snake case instead of camel-case, per the kernel coding style guide. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c| 16 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index c877408cde50..984c8b181fd4 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -425,22 +425,22 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) goto exit; } - pFirmware->szFwBuffer = kmemdup(fw->data, fw->size, GFP_KERNEL); - if (!pFirmware->szFwBuffer) { + pFirmware->fw_buffer_sz = kmemdup(fw->data, fw->size, GFP_KERNEL); + if (!pFirmware->fw_buffer_sz) { rtStatus = _FAIL; goto exit; } - pFirmware->ulFwLength = fw->size; + pFirmware->fw_length = fw->size; release_firmware(fw); - if (pFirmware->ulFwLength > FW_8723B_SIZE) { + if (pFirmware->fw_length > FW_8723B_SIZE) { rtStatus = _FAIL; - DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->ulFwLength, FW_8723B_SIZE); + DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->fw_length, FW_8723B_SIZE); goto release_fw1; } - pFirmwareBuf = pFirmware->szFwBuffer; - FirmwareLen = pFirmware->ulFwLength; + pFirmwareBuf = pFirmware->fw_buffer_sz; + FirmwareLen = pFirmware->fw_length; /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; @@ -510,7 +510,7 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) ); exit: - kfree(pFirmware->szFwBuffer); + kfree(pFirmware->fw_buffer_sz); kfree(pFirmware); release_fw1: kfree(pBTFirmware); diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index b4b54e3e6a43..42f467abc6b5 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -47,8 +47,8 @@ ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { - u32 ulFwLength; - u8 *szFwBuffer; + u32 fw_length; + u8 *fw_buffer_sz; }; /* This structure must be cared byte-ordering */ -- 2.17.0
[PATCH 5/9] staging: rtl8723bs: Fix camel-case in IS_FW_HEADER_EXIST_8723B().
Change the parameter of the macro to the snake case 'fw_hdr' instead of '_pFwHdr'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8ce4f7a9edc3..b4b54e3e6a43 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -43,8 +43,8 @@ #define FW_8723B_START_ADDRESS 0x1000 #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ - ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ + ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; -- 2.17.0
[PATCH 5/9] staging: rtl8723bs: Fix camel-case in IS_FW_HEADER_EXIST_8723B().
Change the parameter of the macro to the snake case 'fw_hdr' instead of '_pFwHdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 8ce4f7a9edc3..b4b54e3e6a43 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -43,8 +43,8 @@ #define FW_8723B_START_ADDRESS 0x1000 #define FW_8723B_END_ADDRESS 0x1FFF /* 0x5FFF */ -#define IS_FW_HEADER_EXIST_8723B(_pFwHdr) \ - ((le16_to_cpu(_pFwHdr->Signature) & 0xFFF0) == 0x5300) +#define IS_FW_HEADER_EXIST_8723B(fw_hdr) \ + ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { u32 ulFwLength; -- 2.17.0
[PATCH 6/9] staging: rtl8723bs: Fix camel-case in 'struct rt_firmware'.
Change the members of 'struct rt_firmware' to be snake case instead of camel-case, per the kernel coding style guide. Signed-off-by: Quytelda Kahja --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c| 16 drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index c877408cde50..984c8b181fd4 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -425,22 +425,22 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) goto exit; } - pFirmware->szFwBuffer = kmemdup(fw->data, fw->size, GFP_KERNEL); - if (!pFirmware->szFwBuffer) { + pFirmware->fw_buffer_sz = kmemdup(fw->data, fw->size, GFP_KERNEL); + if (!pFirmware->fw_buffer_sz) { rtStatus = _FAIL; goto exit; } - pFirmware->ulFwLength = fw->size; + pFirmware->fw_length = fw->size; release_firmware(fw); - if (pFirmware->ulFwLength > FW_8723B_SIZE) { + if (pFirmware->fw_length > FW_8723B_SIZE) { rtStatus = _FAIL; - DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->ulFwLength, FW_8723B_SIZE); + DBG_871X_LEVEL(_drv_emerg_, "Firmware size:%u exceed %u\n", pFirmware->fw_length, FW_8723B_SIZE); goto release_fw1; } - pFirmwareBuf = pFirmware->szFwBuffer; - FirmwareLen = pFirmware->ulFwLength; + pFirmwareBuf = pFirmware->fw_buffer_sz; + FirmwareLen = pFirmware->fw_length; /* To Check Fw header. Added by tynli. 2009.12.04. */ pFwHdr = (struct rt_firmware_hdr *)pFirmwareBuf; @@ -510,7 +510,7 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw) ); exit: - kfree(pFirmware->szFwBuffer); + kfree(pFirmware->fw_buffer_sz); kfree(pFirmware); release_fw1: kfree(pBTFirmware); diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index b4b54e3e6a43..42f467abc6b5 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -47,8 +47,8 @@ ((le16_to_cpu(fw_hdr->Signature) & 0xFFF0) == 0x5300) struct rt_firmware { - u32 ulFwLength; - u8 *szFwBuffer; + u32 fw_length; + u8 *fw_buffer_sz; }; /* This structure must be cared byte-ordering */ -- 2.17.0
[PATCH 9/9] staging: rtl8723bs: Fix grammar error in comment.
Fix a grammatical error in the comment describing 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 946236f704fe..8f00ced1c697 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -51,7 +51,7 @@ struct rt_firmware { u8 *fw_buffer_sz; }; -/* This structure must be cared byte-ordering */ +/* This structure must be carefully byte-ordered. */ struct rt_firmware_hdr { /* 8-byte alinment required */ -- 2.17.0
[PATCH 9/9] staging: rtl8723bs: Fix grammar error in comment.
Fix a grammatical error in the comment describing 'struct rt_firmware_hdr'. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 946236f704fe..8f00ced1c697 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -51,7 +51,7 @@ struct rt_firmware { u8 *fw_buffer_sz; }; -/* This structure must be cared byte-ordering */ +/* This structure must be carefully byte-ordered. */ struct rt_firmware_hdr { /* 8-byte alinment required */ -- 2.17.0
[PATCH 1/9] staging: rtl8723bs: Rename 'Hal8723BPwrSeq.{c,h}' to 'hal_pwr_seq.*'.
Camel-case naming is discouraged int the linux kernel coding style. Rename these files using snake case, and update the makefile to use the new names. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/rtl8723bs/Makefile | 2 +- .../staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} | 2 +- .../rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename drivers/staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} (99%) rename drivers/staging/rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} (100%) diff --git a/drivers/staging/rtl8723bs/Makefile b/drivers/staging/rtl8723bs/Makefile index f236acfd3afa..a12cf8dd8ed9 100644 --- a/drivers/staging/rtl8723bs/Makefile +++ b/drivers/staging/rtl8723bs/Makefile @@ -23,7 +23,7 @@ r8723bs-y = \ hal/hal_com_phycfg.o \ hal/hal_btcoex.o \ hal/hal_sdio.o \ - hal/Hal8723BPwrSeq.o \ + hal/hal_pwr_seq.o \ hal/HalPhyRf.o \ hal/HalPwrSeqCmd.o \ hal/odm.o \ diff --git a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c similarity index 99% rename from drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c rename to drivers/staging/rtl8723bs/hal/hal_pwr_seq.c index 57f7f09b3ab9..589e7aae7bbd 100644 --- a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c +++ b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c @@ -17,7 +17,7 @@ Major Change History: */ -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" /* drivers should parse below arrays and do the corresponding actions */ /* 3 Power on Array */ diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h b/drivers/staging/rtl8723bs/include/hal_pwr_seq.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h rename to drivers/staging/rtl8723bs/include/hal_pwr_seq.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 98408e8e33f2..46ac61b058c8 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -16,7 +16,7 @@ #include "rtl8723b_xmit.h" #include "rtl8723b_cmd.h" #include "rtw_mp.h" -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" #include "Hal8723BPhyReg.h" #include "Hal8723BPhyCfg.h" -- 2.17.0
[PATCH 1/9] staging: rtl8723bs: Rename 'Hal8723BPwrSeq.{c,h}' to 'hal_pwr_seq.*'.
Camel-case naming is discouraged int the linux kernel coding style. Rename these files using snake case, and update the makefile to use the new names. Signed-off-by: Quytelda Kahja --- drivers/staging/rtl8723bs/Makefile | 2 +- .../staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} | 2 +- .../rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} | 0 drivers/staging/rtl8723bs/include/rtl8723b_hal.h| 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename drivers/staging/rtl8723bs/hal/{Hal8723BPwrSeq.c => hal_pwr_seq.c} (99%) rename drivers/staging/rtl8723bs/include/{Hal8723BPwrSeq.h => hal_pwr_seq.h} (100%) diff --git a/drivers/staging/rtl8723bs/Makefile b/drivers/staging/rtl8723bs/Makefile index f236acfd3afa..a12cf8dd8ed9 100644 --- a/drivers/staging/rtl8723bs/Makefile +++ b/drivers/staging/rtl8723bs/Makefile @@ -23,7 +23,7 @@ r8723bs-y = \ hal/hal_com_phycfg.o \ hal/hal_btcoex.o \ hal/hal_sdio.o \ - hal/Hal8723BPwrSeq.o \ + hal/hal_pwr_seq.o \ hal/HalPhyRf.o \ hal/HalPwrSeqCmd.o \ hal/odm.o \ diff --git a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c similarity index 99% rename from drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c rename to drivers/staging/rtl8723bs/hal/hal_pwr_seq.c index 57f7f09b3ab9..589e7aae7bbd 100644 --- a/drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.c +++ b/drivers/staging/rtl8723bs/hal/hal_pwr_seq.c @@ -17,7 +17,7 @@ Major Change History: */ -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" /* drivers should parse below arrays and do the corresponding actions */ /* 3 Power on Array */ diff --git a/drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h b/drivers/staging/rtl8723bs/include/hal_pwr_seq.h similarity index 100% rename from drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h rename to drivers/staging/rtl8723bs/include/hal_pwr_seq.h diff --git a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h index 98408e8e33f2..46ac61b058c8 100644 --- a/drivers/staging/rtl8723bs/include/rtl8723b_hal.h +++ b/drivers/staging/rtl8723bs/include/rtl8723b_hal.h @@ -16,7 +16,7 @@ #include "rtl8723b_xmit.h" #include "rtl8723b_cmd.h" #include "rtw_mp.h" -#include "Hal8723BPwrSeq.h" +#include "hal_pwr_seq.h" #include "Hal8723BPhyReg.h" #include "Hal8723BPhyCfg.h" -- 2.17.0
[PATCH v2 06/75] staging: ks7010: Remove unused 'struct hostif_data_indication_t'.
'struct hostif_data_indication_t' is not used in this driver. Remove 'struct hostif_data_indication_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 036758687b7f..54084af8dcea 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -76,16 +76,9 @@ struct hostif_data_request { u8 data[0]; } __packed; -struct hostif_data_indication_t { - struct hostif_hdr header; - __le16 auth_type; -/* #define TYPE_DATA 0x */ #define TYPE_PMK1 0x0001 #define TYPE_GMK1 0x0002 #define TYPE_GMK2 0x0003 - __le16 reserved; - u8 data[0]; -} __packed; #define CHANNEL_LIST_MAX_SIZE 14 struct channel_list_t { -- 2.16.3
[PATCH v2 05/75] staging: ks7010: Remove trailing _t from 'struct hostif_data_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_data_request_t' with 'struct hostif_data_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b8a9d242e95b..9e69009e2911 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1060,7 +1060,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) unsigned char *buffer = NULL; unsigned int length = 0; - struct hostif_data_request_t *pp; + struct hostif_data_request *pp; unsigned char *p; int result = 0; unsigned short eth_proto; diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 2f918b11b337..036758687b7f 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -67,7 +67,7 @@ struct hostif_hdr { __le16 event; } __packed; -struct hostif_data_request_t { +struct hostif_data_request { struct hostif_hdr header; __le16 auth_type; #define TYPE_DATA 0x -- 2.16.3
[PATCH v2 06/75] staging: ks7010: Remove unused 'struct hostif_data_indication_t'.
'struct hostif_data_indication_t' is not used in this driver. Remove 'struct hostif_data_indication_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 036758687b7f..54084af8dcea 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -76,16 +76,9 @@ struct hostif_data_request { u8 data[0]; } __packed; -struct hostif_data_indication_t { - struct hostif_hdr header; - __le16 auth_type; -/* #define TYPE_DATA 0x */ #define TYPE_PMK1 0x0001 #define TYPE_GMK1 0x0002 #define TYPE_GMK2 0x0003 - __le16 reserved; - u8 data[0]; -} __packed; #define CHANNEL_LIST_MAX_SIZE 14 struct channel_list_t { -- 2.16.3
[PATCH v2 05/75] staging: ks7010: Remove trailing _t from 'struct hostif_data_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_data_request_t' with 'struct hostif_data_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b8a9d242e95b..9e69009e2911 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1060,7 +1060,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) unsigned char *buffer = NULL; unsigned int length = 0; - struct hostif_data_request_t *pp; + struct hostif_data_request *pp; unsigned char *p; int result = 0; unsigned short eth_proto; diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 2f918b11b337..036758687b7f 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -67,7 +67,7 @@ struct hostif_hdr { __le16 event; } __packed; -struct hostif_data_request_t { +struct hostif_data_request { struct hostif_hdr header; __le16 auth_type; #define TYPE_DATA 0x -- 2.16.3
[PATCH v2 02/75] staging: ks7010: Remove trailing _t from 'struct wpa_suite_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wpa_suite_t' with 'struct wpa_suite'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 676961cf4103..af1a5c123789 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1660,7 +1660,7 @@ void hostif_sme_set_wep(struct ks_wlan_private *priv, int type) } } -struct wpa_suite_t { +struct wpa_suite { __le16 size; unsigned char suite[4][CIPHER_ID_LEN]; } __packed; @@ -1673,7 +1673,7 @@ struct rsn_mode_t { static void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type) { - struct wpa_suite_t wpa_suite; + struct wpa_suite wpa_suite; struct rsn_mode_t rsn_mode; __le32 val; -- 2.16.3
[PATCH v2 02/75] staging: ks7010: Remove trailing _t from 'struct wpa_suite_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wpa_suite_t' with 'struct wpa_suite'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 676961cf4103..af1a5c123789 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1660,7 +1660,7 @@ void hostif_sme_set_wep(struct ks_wlan_private *priv, int type) } } -struct wpa_suite_t { +struct wpa_suite { __le16 size; unsigned char suite[4][CIPHER_ID_LEN]; } __packed; @@ -1673,7 +1673,7 @@ struct rsn_mode_t { static void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type) { - struct wpa_suite_t wpa_suite; + struct wpa_suite wpa_suite; struct rsn_mode_t rsn_mode; __le32 val; -- 2.16.3
[PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.
This macro, provided in 'linux/kernel.h', will calculate the size more succinctly than a division operation. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_wlan_net.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 9078e13b0d4a..533feef604a9 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -2702,10 +2702,9 @@ static const iw_handler ks_wlan_private_handler[] = { }; static const struct iw_handler_def ks_wlan_handler_def = { - .num_standard = sizeof(ks_wlan_handler) / sizeof(iw_handler), - .num_private = sizeof(ks_wlan_private_handler) / sizeof(iw_handler), - .num_private_args = - sizeof(ks_wlan_private_args) / sizeof(struct iw_priv_args), + .num_standard = ARRAY_SIZE(ks_wlan_handler), + .num_private = ARRAY_SIZE(ks_wlan_private_handler), + .num_private_args = ARRAY_SIZE(ks_wlan_private_args), .standard = (iw_handler *)ks_wlan_handler, .private = (iw_handler *)ks_wlan_private_handler, .private_args = (struct iw_priv_args *)ks_wlan_private_args, -- 2.16.3
[PATCH v2 03/75] staging: ks7010: Remove trailing _t from 'struct rsn_mode_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rsn_mode_t' with 'struct rsn_mode'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index af1a5c123789..8c269624401b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1665,7 +1665,7 @@ struct wpa_suite { unsigned char suite[4][CIPHER_ID_LEN]; } __packed; -struct rsn_mode_t { +struct rsn_mode { __le32 rsn_mode; __le16 rsn_capability; } __packed; @@ -1674,7 +1674,7 @@ static void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type) { struct wpa_suite wpa_suite; - struct rsn_mode_t rsn_mode; + struct rsn_mode rsn_mode; __le32 val; memset(_suite, 0, sizeof(wpa_suite)); -- 2.16.3
[PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.
This macro, provided in 'linux/kernel.h', will calculate the size more succinctly than a division operation. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_wlan_net.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 9078e13b0d4a..533feef604a9 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -2702,10 +2702,9 @@ static const iw_handler ks_wlan_private_handler[] = { }; static const struct iw_handler_def ks_wlan_handler_def = { - .num_standard = sizeof(ks_wlan_handler) / sizeof(iw_handler), - .num_private = sizeof(ks_wlan_private_handler) / sizeof(iw_handler), - .num_private_args = - sizeof(ks_wlan_private_args) / sizeof(struct iw_priv_args), + .num_standard = ARRAY_SIZE(ks_wlan_handler), + .num_private = ARRAY_SIZE(ks_wlan_private_handler), + .num_private_args = ARRAY_SIZE(ks_wlan_private_args), .standard = (iw_handler *)ks_wlan_handler, .private = (iw_handler *)ks_wlan_private_handler, .private_args = (struct iw_priv_args *)ks_wlan_private_args, -- 2.16.3
[PATCH v2 03/75] staging: ks7010: Remove trailing _t from 'struct rsn_mode_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rsn_mode_t' with 'struct rsn_mode'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index af1a5c123789..8c269624401b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1665,7 +1665,7 @@ struct wpa_suite { unsigned char suite[4][CIPHER_ID_LEN]; } __packed; -struct rsn_mode_t { +struct rsn_mode { __le32 rsn_mode; __le16 rsn_capability; } __packed; @@ -1674,7 +1674,7 @@ static void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type) { struct wpa_suite wpa_suite; - struct rsn_mode_t rsn_mode; + struct rsn_mode rsn_mode; __le32 val; memset(_suite, 0, sizeof(wpa_suite)); -- 2.16.3
[PATCH v2 09/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_value_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_value_t' with 'struct hostif_mib_value'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 0c2771861096..aedc832bc04c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -140,7 +140,7 @@ struct hostif_mib_get_request { __le32 mib_attribute; } __packed; -struct hostif_mib_value_t { +struct hostif_mib_value { __le16 size; __le16 type; #define MIB_VALUE_TYPE_NULL 0 @@ -159,13 +159,13 @@ struct hostif_mib_get_confirm_t { #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 __le32 mib_attribute; - struct hostif_mib_value_t mib_value; + struct hostif_mib_value mib_value; } __packed; struct hostif_mib_set_request_t { struct hostif_hdr header; __le32 mib_attribute; - struct hostif_mib_value_t mib_value; + struct hostif_mib_value mib_value; } __packed; struct hostif_mib_set_confirm_t { -- 2.16.3
[PATCH v2 09/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_value_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_value_t' with 'struct hostif_mib_value'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 0c2771861096..aedc832bc04c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -140,7 +140,7 @@ struct hostif_mib_get_request { __le32 mib_attribute; } __packed; -struct hostif_mib_value_t { +struct hostif_mib_value { __le16 size; __le16 type; #define MIB_VALUE_TYPE_NULL 0 @@ -159,13 +159,13 @@ struct hostif_mib_get_confirm_t { #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 __le32 mib_attribute; - struct hostif_mib_value_t mib_value; + struct hostif_mib_value mib_value; } __packed; struct hostif_mib_set_request_t { struct hostif_hdr header; __le32 mib_attribute; - struct hostif_mib_value_t mib_value; + struct hostif_mib_value mib_value; } __packed; struct hostif_mib_set_confirm_t { -- 2.16.3
[PATCH v2 04/75] staging: ks7010: Remove trailing _t from 'struct pmk_cache_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct pmk_cache_t' with 'struct pmk_cache'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 8c269624401b..b8a9d242e95b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -2123,7 +2123,7 @@ void hostif_sme_set_key(struct ks_wlan_private *priv, int type) static void hostif_sme_set_pmksa(struct ks_wlan_private *priv) { - struct pmk_cache_t { + struct pmk_cache { __le16 size; struct { u8 bssid[ETH_ALEN]; -- 2.16.3
[PATCH v2 08/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_get_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_get_request_t' with 'struct hostif_mib_get_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 9e69009e2911..cc1e5f441cf0 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1240,7 +1240,7 @@ static void hostif_mib_get_request(struct ks_wlan_private *priv, unsigned long mib_attribute) { - struct hostif_mib_get_request_t *pp; + struct hostif_mib_get_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_MIB_GET_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 8017a85f95ad..0c2771861096 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -135,7 +135,7 @@ struct channel_list { #define LOCAL_GAIN0xF10D0100 /* Carrer sense threshold for demo ato show */ #define LOCAL_EEPROM_SUM 0xF10E0100 /* EEPROM checksum information */ -struct hostif_mib_get_request_t { +struct hostif_mib_get_request { struct hostif_hdr header; __le32 mib_attribute; } __packed; -- 2.16.3
[PATCH v2 10/75] staging: ks7010: Remove unused 'struct hostif_mib_get_confirm_t'.
'struct hostif_mib_get_confirm_t' is not used in this driver. Remove 'struct hostif_mib_get_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index aedc832bc04c..e6d6c51ccc43 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -151,16 +151,10 @@ struct hostif_mib_value { u8 body[0]; } __packed; -struct hostif_mib_get_confirm_t { - struct hostif_hdr header; - __le32 mib_status; #define MIB_SUCCESS0 #define MIB_INVALID1 #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 - __le32 mib_attribute; - struct hostif_mib_value mib_value; -} __packed; struct hostif_mib_set_request_t { struct hostif_hdr header; -- 2.16.3
[PATCH v2 10/75] staging: ks7010: Remove unused 'struct hostif_mib_get_confirm_t'.
'struct hostif_mib_get_confirm_t' is not used in this driver. Remove 'struct hostif_mib_get_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index aedc832bc04c..e6d6c51ccc43 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -151,16 +151,10 @@ struct hostif_mib_value { u8 body[0]; } __packed; -struct hostif_mib_get_confirm_t { - struct hostif_hdr header; - __le32 mib_status; #define MIB_SUCCESS0 #define MIB_INVALID1 #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 - __le32 mib_attribute; - struct hostif_mib_value mib_value; -} __packed; struct hostif_mib_set_request_t { struct hostif_hdr header; -- 2.16.3
[PATCH v2 04/75] staging: ks7010: Remove trailing _t from 'struct pmk_cache_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct pmk_cache_t' with 'struct pmk_cache'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 8c269624401b..b8a9d242e95b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -2123,7 +2123,7 @@ void hostif_sme_set_key(struct ks_wlan_private *priv, int type) static void hostif_sme_set_pmksa(struct ks_wlan_private *priv) { - struct pmk_cache_t { + struct pmk_cache { __le16 size; struct { u8 bssid[ETH_ALEN]; -- 2.16.3
[PATCH v2 08/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_get_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_get_request_t' with 'struct hostif_mib_get_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 9e69009e2911..cc1e5f441cf0 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1240,7 +1240,7 @@ static void hostif_mib_get_request(struct ks_wlan_private *priv, unsigned long mib_attribute) { - struct hostif_mib_get_request_t *pp; + struct hostif_mib_get_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_MIB_GET_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 8017a85f95ad..0c2771861096 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -135,7 +135,7 @@ struct channel_list { #define LOCAL_GAIN0xF10D0100 /* Carrer sense threshold for demo ato show */ #define LOCAL_EEPROM_SUM 0xF10E0100 /* EEPROM checksum information */ -struct hostif_mib_get_request_t { +struct hostif_mib_get_request { struct hostif_hdr header; __le32 mib_attribute; } __packed; -- 2.16.3
[PATCH v2 11/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_set_request_t' with 'struct hostif_mib_set_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index cc1e5f441cf0..6295e01d91da 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1258,7 +1258,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv, unsigned long mib_attribute, unsigned short size, unsigned short type, void *vp) { - struct hostif_mib_set_request_t *pp; + struct hostif_mib_set_request *pp; if (priv->dev_state < DEVICE_STATE_BOOT) return; diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index e6d6c51ccc43..157f1c2394c3 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -156,7 +156,7 @@ struct hostif_mib_value { #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 -struct hostif_mib_set_request_t { +struct hostif_mib_set_request { struct hostif_hdr header; __le32 mib_attribute; struct hostif_mib_value mib_value; -- 2.16.3
[PATCH v2 07/75] staging: ks7010: Remove trailing _t from 'struct channel_list_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct channel_list_t' with 'struct channel_list'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 54084af8dcea..8017a85f95ad 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -81,7 +81,7 @@ struct hostif_data_request { #define TYPE_GMK2 0x0003 #define CHANNEL_LIST_MAX_SIZE 14 -struct channel_list_t { +struct channel_list { u8 size; u8 body[CHANNEL_LIST_MAX_SIZE]; u8 pad; @@ -378,7 +378,7 @@ struct hostif_infrastructure_set_request_t { struct ssid_t ssid; __le16 beacon_lost_count; __le16 auth_type; - struct channel_list_t channel_list; + struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -413,7 +413,7 @@ struct hostif_adhoc_set2_request_t { struct hostif_request_t request; __le16 reserved; struct ssid_t ssid; - struct channel_list_t channel_list; + struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -461,7 +461,7 @@ struct hostif_bss_scan_request_t { u8 pad[3]; __le32 ch_time_min; __le32 ch_time_max; - struct channel_list_t channel_list; + struct channel_list channel_list; struct ssid_t ssid; } __packed; -- 2.16.3
[PATCH v2 11/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_mib_set_request_t' with 'struct hostif_mib_set_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index cc1e5f441cf0..6295e01d91da 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1258,7 +1258,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv, unsigned long mib_attribute, unsigned short size, unsigned short type, void *vp) { - struct hostif_mib_set_request_t *pp; + struct hostif_mib_set_request *pp; if (priv->dev_state < DEVICE_STATE_BOOT) return; diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index e6d6c51ccc43..157f1c2394c3 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -156,7 +156,7 @@ struct hostif_mib_value { #define MIB_READ_ONLY 2 #define MIB_WRITE_ONLY 3 -struct hostif_mib_set_request_t { +struct hostif_mib_set_request { struct hostif_hdr header; __le32 mib_attribute; struct hostif_mib_value mib_value; -- 2.16.3
[PATCH v2 07/75] staging: ks7010: Remove trailing _t from 'struct channel_list_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct channel_list_t' with 'struct channel_list'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 54084af8dcea..8017a85f95ad 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -81,7 +81,7 @@ struct hostif_data_request { #define TYPE_GMK2 0x0003 #define CHANNEL_LIST_MAX_SIZE 14 -struct channel_list_t { +struct channel_list { u8 size; u8 body[CHANNEL_LIST_MAX_SIZE]; u8 pad; @@ -378,7 +378,7 @@ struct hostif_infrastructure_set_request_t { struct ssid_t ssid; __le16 beacon_lost_count; __le16 auth_type; - struct channel_list_t channel_list; + struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -413,7 +413,7 @@ struct hostif_adhoc_set2_request_t { struct hostif_request_t request; __le16 reserved; struct ssid_t ssid; - struct channel_list_t channel_list; + struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -461,7 +461,7 @@ struct hostif_bss_scan_request_t { u8 pad[3]; __le32 ch_time_min; __le32 ch_time_max; - struct channel_list_t channel_list; + struct channel_list channel_list; struct ssid_t ssid; } __packed; -- 2.16.3
[PATCH v2 14/75] staging: ks7010: Remove unused 'struct hostif_power_mgmt_confirm_t'.
'struct hostif_power_mgmt_confirm_t' is not used in this driver. Remove 'struct hostif_power_mgmt_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 10842d668afa..245d954e3be2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -187,11 +187,6 @@ enum power_mgmt_mode_type { /* #define RESULT_ALREADY_RUNNING3 */ #defineRESULT_ALREADY_RUNNING7 -struct hostif_power_mgmt_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - struct hostif_start_request_t { struct hostif_hdr header; __le16 mode; -- 2.16.3
[PATCH v2 14/75] staging: ks7010: Remove unused 'struct hostif_power_mgmt_confirm_t'.
'struct hostif_power_mgmt_confirm_t' is not used in this driver. Remove 'struct hostif_power_mgmt_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 10842d668afa..245d954e3be2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -187,11 +187,6 @@ enum power_mgmt_mode_type { /* #define RESULT_ALREADY_RUNNING3 */ #defineRESULT_ALREADY_RUNNING7 -struct hostif_power_mgmt_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - struct hostif_start_request_t { struct hostif_hdr header; __le16 mode; -- 2.16.3
[PATCH v2 16/75] staging: ks7010: Remove unused 'struct hostif_start_confirm_t'.
'struct hostif_start_confirm_t' is not used in this driver. Remove 'struct hostif_start_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index ef1e77b40e4e..af656a839a0a 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -196,11 +196,6 @@ struct hostif_start_request { #define MODE_ADHOC 3 } __packed; -struct hostif_start_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - struct ssid_t { u8 size; u8 body[IEEE80211_MAX_SSID_LEN]; -- 2.16.3
[PATCH v2 15/75] staging: ks7010: Remove trailing _t from 'struct hostif_start_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_start_request_t' with 'struct hostif_start_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 848307241195..9bfef9c9f64b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1280,7 +1280,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv, static void hostif_start_request(struct ks_wlan_private *priv, unsigned char mode) { - struct hostif_start_request_t *pp; + struct hostif_start_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_START_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 245d954e3be2..ef1e77b40e4e 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -187,7 +187,7 @@ enum power_mgmt_mode_type { /* #define RESULT_ALREADY_RUNNING3 */ #defineRESULT_ALREADY_RUNNING7 -struct hostif_start_request_t { +struct hostif_start_request { struct hostif_hdr header; __le16 mode; #define MODE_PSEUDO_ADHOC 0 -- 2.16.3
[PATCH v2 16/75] staging: ks7010: Remove unused 'struct hostif_start_confirm_t'.
'struct hostif_start_confirm_t' is not used in this driver. Remove 'struct hostif_start_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index ef1e77b40e4e..af656a839a0a 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -196,11 +196,6 @@ struct hostif_start_request { #define MODE_ADHOC 3 } __packed; -struct hostif_start_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - struct ssid_t { u8 size; u8 body[IEEE80211_MAX_SSID_LEN]; -- 2.16.3
[PATCH v2 15/75] staging: ks7010: Remove trailing _t from 'struct hostif_start_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_start_request_t' with 'struct hostif_start_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 848307241195..9bfef9c9f64b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1280,7 +1280,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv, static void hostif_start_request(struct ks_wlan_private *priv, unsigned char mode) { - struct hostif_start_request_t *pp; + struct hostif_start_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_START_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 245d954e3be2..ef1e77b40e4e 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -187,7 +187,7 @@ enum power_mgmt_mode_type { /* #define RESULT_ALREADY_RUNNING3 */ #defineRESULT_ALREADY_RUNNING7 -struct hostif_start_request_t { +struct hostif_start_request { struct hostif_hdr header; __le16 mode; #define MODE_PSEUDO_ADHOC 0 -- 2.16.3
[PATCH v2 12/75] staging: ks7010: Remove unused 'struct hostif_mib_set_confirm_t'.
'struct hostif_mib_set_confirm_t' is not used in this driver. Remove 'struct hostif_mib_set_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 157f1c2394c3..5ae6f78eebd6 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -162,12 +162,6 @@ struct hostif_mib_set_request { struct hostif_mib_value mib_value; } __packed; -struct hostif_mib_set_confirm_t { - struct hostif_hdr header; - __le32 mib_status; - __le32 mib_attribute; -} __packed; - struct hostif_power_mgmt_request_t { struct hostif_hdr header; __le32 mode; -- 2.16.3
[PATCH v2 12/75] staging: ks7010: Remove unused 'struct hostif_mib_set_confirm_t'.
'struct hostif_mib_set_confirm_t' is not used in this driver. Remove 'struct hostif_mib_set_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 157f1c2394c3..5ae6f78eebd6 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -162,12 +162,6 @@ struct hostif_mib_set_request { struct hostif_mib_value mib_value; } __packed; -struct hostif_mib_set_confirm_t { - struct hostif_hdr header; - __le32 mib_status; - __le32 mib_attribute; -} __packed; - struct hostif_power_mgmt_request_t { struct hostif_hdr header; __le32 mode; -- 2.16.3
[PATCH v2 18/75] staging: ks7010: Remove trailing _t from 'struct rate_set8_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rate_set8_t' with 'struct rate_set8'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 5a46a804..6ce5d32718b8 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -203,7 +203,7 @@ struct ssid { } __packed; #define RATE_SET_MAX_SIZE 16 -struct rate_set8_t { +struct rate_set8 { u8 size; u8 body[8]; u8 rate_pad; @@ -270,14 +270,14 @@ struct link_ap_info_t { u8 pad0;/* +09 */ __le16 beacon_period; /* +10 */ __le16 capability; /* +12 */ - struct rate_set8_t rate_set;/* +14 */ + struct rate_set8 rate_set; /* +14 */ struct fh_parms_t fh_parameter; /* +24 */ struct ds_parms_t ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ - struct rate_set8_t ext_rate_set;/* +40 */ + struct rate_set8 ext_rate_set; /* +40 */ u8 DTIM_period; /* +50 */ u8 rsn_mode;/* +51 */ #define RSN_MODE_NONE 0 -- 2.16.3
[PATCH v2 13/75] staging: ks7010: Remove trailing _t from 'struct hostif_power_mgmt_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_power_mgmt_request_t' with 'struct hostif_power_mgmt_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 6295e01d91da..848307241195 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1464,7 +1464,7 @@ void hostif_power_mgmt_request(struct ks_wlan_private *priv, unsigned long mode, unsigned long wake_up, unsigned long receive_dtims) { - struct hostif_power_mgmt_request_t *pp; + struct hostif_power_mgmt_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_POWER_MGMT_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 5ae6f78eebd6..10842d668afa 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -162,7 +162,7 @@ struct hostif_mib_set_request { struct hostif_mib_value mib_value; } __packed; -struct hostif_power_mgmt_request_t { +struct hostif_power_mgmt_request { struct hostif_hdr header; __le32 mode; #define POWER_ACTIVE 1 -- 2.16.3
[PATCH v2 18/75] staging: ks7010: Remove trailing _t from 'struct rate_set8_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rate_set8_t' with 'struct rate_set8'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 5a46a804..6ce5d32718b8 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -203,7 +203,7 @@ struct ssid { } __packed; #define RATE_SET_MAX_SIZE 16 -struct rate_set8_t { +struct rate_set8 { u8 size; u8 body[8]; u8 rate_pad; @@ -270,14 +270,14 @@ struct link_ap_info_t { u8 pad0;/* +09 */ __le16 beacon_period; /* +10 */ __le16 capability; /* +12 */ - struct rate_set8_t rate_set;/* +14 */ + struct rate_set8 rate_set; /* +14 */ struct fh_parms_t fh_parameter; /* +24 */ struct ds_parms_t ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ - struct rate_set8_t ext_rate_set;/* +40 */ + struct rate_set8 ext_rate_set; /* +40 */ u8 DTIM_period; /* +50 */ u8 rsn_mode;/* +51 */ #define RSN_MODE_NONE 0 -- 2.16.3
[PATCH v2 13/75] staging: ks7010: Remove trailing _t from 'struct hostif_power_mgmt_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_power_mgmt_request_t' with 'struct hostif_power_mgmt_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 6295e01d91da..848307241195 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1464,7 +1464,7 @@ void hostif_power_mgmt_request(struct ks_wlan_private *priv, unsigned long mode, unsigned long wake_up, unsigned long receive_dtims) { - struct hostif_power_mgmt_request_t *pp; + struct hostif_power_mgmt_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_POWER_MGMT_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 5ae6f78eebd6..10842d668afa 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -162,7 +162,7 @@ struct hostif_mib_set_request { struct hostif_mib_value mib_value; } __packed; -struct hostif_power_mgmt_request_t { +struct hostif_power_mgmt_request { struct hostif_hdr header; __le32 mode; #define POWER_ACTIVE 1 -- 2.16.3
[PATCH v2 19/75] staging: ks7010: Remove trailing _t from 'struct fh_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct fh_parms_t' with 'struct fh_parms'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 6ce5d32718b8..384292588afe 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -209,7 +209,7 @@ struct rate_set8 { u8 rate_pad; } __packed; -struct fh_parms_t { +struct fh_parms { __le16 dwell_time; u8 hop_set; u8 hop_pattern; @@ -271,7 +271,7 @@ struct link_ap_info_t { __le16 beacon_period; /* +10 */ __le16 capability; /* +12 */ struct rate_set8 rate_set; /* +14 */ - struct fh_parms_t fh_parameter; /* +24 */ + struct fh_parms fh_parameter; /* +24 */ struct ds_parms_t ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ -- 2.16.3
[PATCH v2 22/75] staging: ks7010: Remove trailing _t from 'struct ibss_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ibss_parms_t' with 'struct ibss_parms'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 2dcd6253b17a..a3c686c1289c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -227,7 +227,7 @@ struct cf_parms { __le16 dur_remaining; } __packed; -struct ibss_parms_t { +struct ibss_parms { __le16 atim_window; } __packed; @@ -274,7 +274,7 @@ struct link_ap_info_t { struct fh_parms fh_parameter; /* +24 */ struct ds_parms ds_parameter; /* +29 */ struct cf_parms cf_parameter; /* +30 */ - struct ibss_parms_t ibss_parameter; /* +36 */ + struct ibss_parms ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ struct rate_set8 ext_rate_set; /* +40 */ -- 2.16.3
[PATCH v2 17/75] staging: ks7010: Remove trailing _t from 'struct ssid_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ssid_t' with 'struct ssid'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index af656a839a0a..5a46a804 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -196,7 +196,7 @@ struct hostif_start_request { #define MODE_ADHOC 3 } __packed; -struct ssid_t { +struct ssid { u8 size; u8 body[IEEE80211_MAX_SSID_LEN]; u8 ssid_pad; @@ -353,7 +353,7 @@ struct hostif_ps_adhoc_set_confirm_t { struct hostif_infrastructure_set_request_t { struct hostif_hdr header; struct hostif_request_t request; - struct ssid_t ssid; + struct ssid ssid; __le16 beacon_lost_count; __le16 auth_type; struct channel_list channel_list; @@ -375,7 +375,7 @@ struct hostif_infrastructure_set_confirm_t { struct hostif_adhoc_set_request_t { struct hostif_hdr header; struct hostif_request_t request; - struct ssid_t ssid; + struct ssid ssid; __le16 channel; } __packed; @@ -390,7 +390,7 @@ struct hostif_adhoc_set2_request_t { struct hostif_hdr header; struct hostif_request_t request; __le16 reserved; - struct ssid_t ssid; + struct ssid ssid; struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -440,7 +440,7 @@ struct hostif_bss_scan_request_t { __le32 ch_time_min; __le32 ch_time_max; struct channel_list channel_list; - struct ssid_t ssid; + struct ssid ssid; } __packed; struct hostif_bss_scan_confirm_t { -- 2.16.3
[PATCH v2 19/75] staging: ks7010: Remove trailing _t from 'struct fh_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct fh_parms_t' with 'struct fh_parms'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 6ce5d32718b8..384292588afe 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -209,7 +209,7 @@ struct rate_set8 { u8 rate_pad; } __packed; -struct fh_parms_t { +struct fh_parms { __le16 dwell_time; u8 hop_set; u8 hop_pattern; @@ -271,7 +271,7 @@ struct link_ap_info_t { __le16 beacon_period; /* +10 */ __le16 capability; /* +12 */ struct rate_set8 rate_set; /* +14 */ - struct fh_parms_t fh_parameter; /* +24 */ + struct fh_parms fh_parameter; /* +24 */ struct ds_parms_t ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ -- 2.16.3
[PATCH v2 22/75] staging: ks7010: Remove trailing _t from 'struct ibss_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ibss_parms_t' with 'struct ibss_parms'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 2dcd6253b17a..a3c686c1289c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -227,7 +227,7 @@ struct cf_parms { __le16 dur_remaining; } __packed; -struct ibss_parms_t { +struct ibss_parms { __le16 atim_window; } __packed; @@ -274,7 +274,7 @@ struct link_ap_info_t { struct fh_parms fh_parameter; /* +24 */ struct ds_parms ds_parameter; /* +29 */ struct cf_parms cf_parameter; /* +30 */ - struct ibss_parms_t ibss_parameter; /* +36 */ + struct ibss_parms ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ struct rate_set8 ext_rate_set; /* +40 */ -- 2.16.3
[PATCH v2 17/75] staging: ks7010: Remove trailing _t from 'struct ssid_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ssid_t' with 'struct ssid'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index af656a839a0a..5a46a804 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -196,7 +196,7 @@ struct hostif_start_request { #define MODE_ADHOC 3 } __packed; -struct ssid_t { +struct ssid { u8 size; u8 body[IEEE80211_MAX_SSID_LEN]; u8 ssid_pad; @@ -353,7 +353,7 @@ struct hostif_ps_adhoc_set_confirm_t { struct hostif_infrastructure_set_request_t { struct hostif_hdr header; struct hostif_request_t request; - struct ssid_t ssid; + struct ssid ssid; __le16 beacon_lost_count; __le16 auth_type; struct channel_list channel_list; @@ -375,7 +375,7 @@ struct hostif_infrastructure_set_confirm_t { struct hostif_adhoc_set_request_t { struct hostif_hdr header; struct hostif_request_t request; - struct ssid_t ssid; + struct ssid ssid; __le16 channel; } __packed; @@ -390,7 +390,7 @@ struct hostif_adhoc_set2_request_t { struct hostif_hdr header; struct hostif_request_t request; __le16 reserved; - struct ssid_t ssid; + struct ssid ssid; struct channel_list channel_list; u8 bssid[ETH_ALEN]; } __packed; @@ -440,7 +440,7 @@ struct hostif_bss_scan_request_t { __le32 ch_time_min; __le32 ch_time_max; struct channel_list channel_list; - struct ssid_t ssid; + struct ssid ssid; } __packed; struct hostif_bss_scan_confirm_t { -- 2.16.3
[PATCH v2 23/75] staging: ks7010: Remove unused 'struct rsn_t'.
'struct rsn_t' is not used in this driver. Remove 'struct rsn_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index a3c686c1289c..091bc82a99c4 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -231,11 +231,7 @@ struct ibss_parms { __le16 atim_window; } __packed; -struct rsn_t { - u8 size; #define RSN_BODY_SIZE 64 - u8 body[RSN_BODY_SIZE]; -} __packed; struct erp_params_t { u8 erp_info; -- 2.16.3
[PATCH v2 24/75] staging: ks7010: Remove trailing _t from 'struct erp_params_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct erp_params_t' with 'struct erp_params'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 091bc82a99c4..4dd11307e4c5 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -233,7 +233,7 @@ struct ibss_parms { #define RSN_BODY_SIZE 64 -struct erp_params_t { +struct erp_params { u8 erp_info; } __packed; @@ -271,7 +271,7 @@ struct link_ap_info_t { struct ds_parms ds_parameter; /* +29 */ struct cf_parms cf_parameter; /* +30 */ struct ibss_parms ibss_parameter; /* +36 */ - struct erp_params_t erp_parameter; /* +38 */ + struct erp_params erp_parameter;/* +38 */ u8 pad1;/* +39 */ struct rate_set8 ext_rate_set; /* +40 */ u8 DTIM_period; /* +50 */ -- 2.16.3
[PATCH v2 25/75] staging: ks7010: Remove trailing _t from 'struct rate_set16_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rate_set16_t' with 'struct rate_set16'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 4dd11307e4c5..87d018f83fa2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -237,7 +237,7 @@ struct erp_params { u8 erp_info; } __packed; -struct rate_set16_t { +struct rate_set16 { u8 size; u8 body[16]; u8 rate_pad; @@ -315,7 +315,7 @@ struct hostif_request_t { __le16 cts_mode; __le16 scan_type; __le16 capability; - struct rate_set16_t rate_set; + struct rate_set16 rate_set; } __packed; /** -- 2.16.3
[PATCH v2 23/75] staging: ks7010: Remove unused 'struct rsn_t'.
'struct rsn_t' is not used in this driver. Remove 'struct rsn_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index a3c686c1289c..091bc82a99c4 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -231,11 +231,7 @@ struct ibss_parms { __le16 atim_window; } __packed; -struct rsn_t { - u8 size; #define RSN_BODY_SIZE 64 - u8 body[RSN_BODY_SIZE]; -} __packed; struct erp_params_t { u8 erp_info; -- 2.16.3
[PATCH v2 24/75] staging: ks7010: Remove trailing _t from 'struct erp_params_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct erp_params_t' with 'struct erp_params'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 091bc82a99c4..4dd11307e4c5 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -233,7 +233,7 @@ struct ibss_parms { #define RSN_BODY_SIZE 64 -struct erp_params_t { +struct erp_params { u8 erp_info; } __packed; @@ -271,7 +271,7 @@ struct link_ap_info_t { struct ds_parms ds_parameter; /* +29 */ struct cf_parms cf_parameter; /* +30 */ struct ibss_parms ibss_parameter; /* +36 */ - struct erp_params_t erp_parameter; /* +38 */ + struct erp_params erp_parameter;/* +38 */ u8 pad1;/* +39 */ struct rate_set8 ext_rate_set; /* +40 */ u8 DTIM_period; /* +50 */ -- 2.16.3
[PATCH v2 25/75] staging: ks7010: Remove trailing _t from 'struct rate_set16_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rate_set16_t' with 'struct rate_set16'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 4dd11307e4c5..87d018f83fa2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -237,7 +237,7 @@ struct erp_params { u8 erp_info; } __packed; -struct rate_set16_t { +struct rate_set16 { u8 size; u8 body[16]; u8 rate_pad; @@ -315,7 +315,7 @@ struct hostif_request_t { __le16 cts_mode; __le16 scan_type; __le16 capability; - struct rate_set16_t rate_set; + struct rate_set16 rate_set; } __packed; /** -- 2.16.3
[PATCH v2 30/75] staging: ks7010: Remove unused 'struct hostif_stop_confirm_t'.
'struct hostif_stop_confirm_t' is not used in this driver. Remove 'struct hostif_stop_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index f3c453be9701..52febac0cc60 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -292,11 +292,6 @@ struct hostif_stop_request { struct hostif_hdr header; } __packed; -struct hostif_stop_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - #define D_11B_ONLY_MODE0 #define D_11G_ONLY_MODE1 #define D_11BG_COMPATIBLE_MODE 2 -- 2.16.3
[PATCH v2 21/75] staging: ks7010: Remove trailing _t from 'struct cf_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct cf_parms_t' with 'struct cf_parms'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index c48730b7527c..2dcd6253b17a 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -220,7 +220,7 @@ struct ds_parms { u8 channel; } __packed; -struct cf_parms_t { +struct cf_parms { u8 count; u8 period; __le16 max_duration; @@ -273,7 +273,7 @@ struct link_ap_info_t { struct rate_set8 rate_set; /* +14 */ struct fh_parms fh_parameter; /* +24 */ struct ds_parms ds_parameter; /* +29 */ - struct cf_parms_t cf_parameter; /* +30 */ + struct cf_parms cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ -- 2.16.3
[PATCH v2 20/75] staging: ks7010: Remove trailing _t from 'struct ds_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ds_parms_t' with 'struct ds_parms'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 384292588afe..c48730b7527c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -216,7 +216,7 @@ struct fh_parms { u8 hop_index; } __packed; -struct ds_parms_t { +struct ds_parms { u8 channel; } __packed; @@ -272,7 +272,7 @@ struct link_ap_info_t { __le16 capability; /* +12 */ struct rate_set8 rate_set; /* +14 */ struct fh_parms fh_parameter; /* +24 */ - struct ds_parms_t ds_parameter; /* +29 */ + struct ds_parms ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ -- 2.16.3
[PATCH v2 30/75] staging: ks7010: Remove unused 'struct hostif_stop_confirm_t'.
'struct hostif_stop_confirm_t' is not used in this driver. Remove 'struct hostif_stop_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index f3c453be9701..52febac0cc60 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -292,11 +292,6 @@ struct hostif_stop_request { struct hostif_hdr header; } __packed; -struct hostif_stop_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - #define D_11B_ONLY_MODE0 #define D_11G_ONLY_MODE1 #define D_11BG_COMPATIBLE_MODE 2 -- 2.16.3
[PATCH v2 21/75] staging: ks7010: Remove trailing _t from 'struct cf_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct cf_parms_t' with 'struct cf_parms'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index c48730b7527c..2dcd6253b17a 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -220,7 +220,7 @@ struct ds_parms { u8 channel; } __packed; -struct cf_parms_t { +struct cf_parms { u8 count; u8 period; __le16 max_duration; @@ -273,7 +273,7 @@ struct link_ap_info_t { struct rate_set8 rate_set; /* +14 */ struct fh_parms fh_parameter; /* +24 */ struct ds_parms ds_parameter; /* +29 */ - struct cf_parms_t cf_parameter; /* +30 */ + struct cf_parms cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ u8 pad1;/* +39 */ -- 2.16.3
[PATCH v2 20/75] staging: ks7010: Remove trailing _t from 'struct ds_parms_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct ds_parms_t' with 'struct ds_parms'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 384292588afe..c48730b7527c 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -216,7 +216,7 @@ struct fh_parms { u8 hop_index; } __packed; -struct ds_parms_t { +struct ds_parms { u8 channel; } __packed; @@ -272,7 +272,7 @@ struct link_ap_info_t { __le16 capability; /* +12 */ struct rate_set8 rate_set; /* +14 */ struct fh_parms fh_parameter; /* +24 */ - struct ds_parms_t ds_parameter; /* +29 */ + struct ds_parms ds_parameter; /* +29 */ struct cf_parms_t cf_parameter; /* +30 */ struct ibss_parms_t ibss_parameter; /* +36 */ struct erp_params_t erp_parameter; /* +38 */ -- 2.16.3
[PATCH v2 31/75] staging: ks7010: Remove trailing _t from 'struct hostif_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_request_t' with 'struct hostif_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 5c78f94e6f72..9798e2427f36 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1313,7 +1313,7 @@ static __le16 ks_wlan_cap(struct ks_wlan_private *priv) return cpu_to_le16((uint16_t)capability); } -static void init_request(struct ks_wlan_private *priv, struct hostif_request_t *req) +static void init_request(struct ks_wlan_private *priv, struct hostif_request *req) { req->phy_type = cpu_to_le16((uint16_t)(priv->reg.phy_type)); req->cts_mode = cpu_to_le16((uint16_t)(priv->reg.cts_mode)); diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 52febac0cc60..443a528fef1e 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -300,7 +300,7 @@ struct hostif_stop_request { #define CTS_MODE_FALSE 0 #define CTS_MODE_TRUE 1 -struct hostif_request_t { +struct hostif_request { __le16 phy_type; __le16 cts_mode; __le16 scan_type; @@ -317,7 +317,7 @@ struct hostif_request_t { */ struct hostif_ps_adhoc_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; __le16 channel; } __packed; @@ -338,7 +338,7 @@ struct hostif_ps_adhoc_set_confirm_t { */ struct hostif_infrastructure_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; struct ssid ssid; __le16 beacon_lost_count; __le16 auth_type; @@ -360,7 +360,7 @@ struct hostif_infrastructure_set_confirm_t { */ struct hostif_adhoc_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; struct ssid ssid; __le16 channel; } __packed; @@ -374,7 +374,7 @@ struct hostif_adhoc_set_request_t { */ struct hostif_adhoc_set2_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; __le16 reserved; struct ssid ssid; struct channel_list channel_list; -- 2.16.3
[PATCH v2 31/75] staging: ks7010: Remove trailing _t from 'struct hostif_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_request_t' with 'struct hostif_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 5c78f94e6f72..9798e2427f36 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1313,7 +1313,7 @@ static __le16 ks_wlan_cap(struct ks_wlan_private *priv) return cpu_to_le16((uint16_t)capability); } -static void init_request(struct ks_wlan_private *priv, struct hostif_request_t *req) +static void init_request(struct ks_wlan_private *priv, struct hostif_request *req) { req->phy_type = cpu_to_le16((uint16_t)(priv->reg.phy_type)); req->cts_mode = cpu_to_le16((uint16_t)(priv->reg.cts_mode)); diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 52febac0cc60..443a528fef1e 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -300,7 +300,7 @@ struct hostif_stop_request { #define CTS_MODE_FALSE 0 #define CTS_MODE_TRUE 1 -struct hostif_request_t { +struct hostif_request { __le16 phy_type; __le16 cts_mode; __le16 scan_type; @@ -317,7 +317,7 @@ struct hostif_request_t { */ struct hostif_ps_adhoc_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; __le16 channel; } __packed; @@ -338,7 +338,7 @@ struct hostif_ps_adhoc_set_confirm_t { */ struct hostif_infrastructure_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; struct ssid ssid; __le16 beacon_lost_count; __le16 auth_type; @@ -360,7 +360,7 @@ struct hostif_infrastructure_set_confirm_t { */ struct hostif_adhoc_set_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; struct ssid ssid; __le16 channel; } __packed; @@ -374,7 +374,7 @@ struct hostif_adhoc_set_request_t { */ struct hostif_adhoc_set2_request_t { struct hostif_hdr header; - struct hostif_request_t request; + struct hostif_request request; __le16 reserved; struct ssid ssid; struct channel_list channel_list; -- 2.16.3
[PATCH v2 28/75] staging: ks7010: Remove unused 'struct hostif_connect_indication_t'.
'struct hostif_connect_indication_t' is not used in this driver. Remove 'struct hostif_connect_indication_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index f64eb2e1e947..bb58733521c7 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -285,13 +285,8 @@ struct link_ap_info { } __packed rsn; } __packed; -struct hostif_connect_indication_t { - struct hostif_hdr header; - __le16 connect_code; #define RESULT_CONNECT0 #define RESULT_DISCONNECT 1 - struct link_ap_info link_ap_info; -} __packed; struct hostif_stop_request_t { struct hostif_hdr header; -- 2.16.3
[PATCH v2 28/75] staging: ks7010: Remove unused 'struct hostif_connect_indication_t'.
'struct hostif_connect_indication_t' is not used in this driver. Remove 'struct hostif_connect_indication_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index f64eb2e1e947..bb58733521c7 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -285,13 +285,8 @@ struct link_ap_info { } __packed rsn; } __packed; -struct hostif_connect_indication_t { - struct hostif_hdr header; - __le16 connect_code; #define RESULT_CONNECT0 #define RESULT_DISCONNECT 1 - struct link_ap_info link_ap_info; -} __packed; struct hostif_stop_request_t { struct hostif_hdr header; -- 2.16.3
[PATCH v2 33/75] staging: ks7010: Remove unused 'struct hostif_ps_adhoc_set_confirm_t'.
'struct hostif_ps_adhoc_set_confirm_t' is not used in this driver. Remove 'struct hostif_ps_adhoc_set_confirm_t'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 3faa28c77446..baa612236eb2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -321,11 +321,6 @@ struct hostif_ps_adhoc_set_request { __le16 channel; } __packed; -struct hostif_ps_adhoc_set_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - #define AUTH_TYPE_OPEN_SYSTEM 0 #define AUTH_TYPE_SHARED_KEY 1 -- 2.16.3
[PATCH v2 32/75] staging: ks7010: Remove trailing _t from 'struct hostif_ps_adhoc_set_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_ps_adhoc_set_request_t' with 'struct hostif_ps_adhoc_set_request'. Signed-off-by: Quytelda Kahja <quyte...@tamalin.org> --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 9798e2427f36..8be5d64f291b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1327,7 +1327,7 @@ static void init_request(struct ks_wlan_private *priv, struct hostif_request *re static void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv) { - struct hostif_ps_adhoc_set_request_t *pp; + struct hostif_ps_adhoc_set_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_PS_ADH_SET_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 443a528fef1e..3faa28c77446 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -309,13 +309,13 @@ struct hostif_request { } __packed; /** - * struct hostif_ps_adhoc_set_request_t - pseudo adhoc mode + * struct hostif_ps_adhoc_set_request - pseudo adhoc mode * @capability: bit5 : preamble * bit6 : pbcc - Not supported always 0 * bit10 : ShortSlotTime * bit13 : DSSS-OFDM - Not supported always 0 */ -struct hostif_ps_adhoc_set_request_t { +struct hostif_ps_adhoc_set_request { struct hostif_hdr header; struct hostif_request request; __le16 channel; -- 2.16.3
[PATCH v2 33/75] staging: ks7010: Remove unused 'struct hostif_ps_adhoc_set_confirm_t'.
'struct hostif_ps_adhoc_set_confirm_t' is not used in this driver. Remove 'struct hostif_ps_adhoc_set_confirm_t'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 3faa28c77446..baa612236eb2 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -321,11 +321,6 @@ struct hostif_ps_adhoc_set_request { __le16 channel; } __packed; -struct hostif_ps_adhoc_set_confirm_t { - struct hostif_hdr header; - __le16 result_code; -} __packed; - #define AUTH_TYPE_OPEN_SYSTEM 0 #define AUTH_TYPE_SHARED_KEY 1 -- 2.16.3
[PATCH v2 32/75] staging: ks7010: Remove trailing _t from 'struct hostif_ps_adhoc_set_request_t'.
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostif_ps_adhoc_set_request_t' with 'struct hostif_ps_adhoc_set_request'. Signed-off-by: Quytelda Kahja --- drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/ks_hostif.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 9798e2427f36..8be5d64f291b 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1327,7 +1327,7 @@ static void init_request(struct ks_wlan_private *priv, struct hostif_request *re static void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv) { - struct hostif_ps_adhoc_set_request_t *pp; + struct hostif_ps_adhoc_set_request *pp; pp = hostif_generic_request(sizeof(*pp), HIF_PS_ADH_SET_REQ); if (!pp) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 443a528fef1e..3faa28c77446 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -309,13 +309,13 @@ struct hostif_request { } __packed; /** - * struct hostif_ps_adhoc_set_request_t - pseudo adhoc mode + * struct hostif_ps_adhoc_set_request - pseudo adhoc mode * @capability: bit5 : preamble * bit6 : pbcc - Not supported always 0 * bit10 : ShortSlotTime * bit13 : DSSS-OFDM - Not supported always 0 */ -struct hostif_ps_adhoc_set_request_t { +struct hostif_ps_adhoc_set_request { struct hostif_hdr header; struct hostif_request request; __le16 channel; -- 2.16.3