staging: r8188eu: convert type of pBandWidth in odm_dm_struct
authorMichael Straube <straube.linux@gmail.com>
Sun, 20 Feb 2022 10:02:11 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Feb 2022 17:11:03 +0000 (18:11 +0100)
The variable pBandWidth in odm_dm_struct stores constants from enum
ht_channel_width. Change the type of pBandWidth from u8 pointer to
enum ht_channel_width pointer to get rid of a type cast in function
Update_ODM_ComInfo_88E().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/include/odm.h

index 082104c9b2e8c64c9012039dc34ccda1dc6a37bc..df0b412c52eb304f5a04892a279389b9a8bde3e4 100644 (file)
@@ -40,7 +40,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
 
        dm_odm->pWirelessMode = &pmlmeext->cur_wireless_mode;
        dm_odm->pSecChOffset = &hal_data->nCur40MhzPrimeSC;
-       dm_odm->pBandWidth = (u8 *)&hal_data->CurrentChannelBW;
+       dm_odm->pBandWidth = &hal_data->CurrentChannelBW;
        dm_odm->pChannel = &hal_data->CurrentChannel;
        dm_odm->pbScanInProcess = &pmlmepriv->bScanInProcess;
        dm_odm->pbPowerSaving = &pwrctrlpriv->bpower_saving;
index 1150c7d25ef5d2b4009f90a559731c13a58da892..7d923403288c5facbc1a66693b9e7ed357add9c6 100644 (file)
@@ -322,7 +322,7 @@ struct odm_dm_struct {
        /*  Secondary channel offset don't_care/below/above = 0/1/2 */
        u8      *pSecChOffset;
        /*  BW info 20M/40M/80M = 0/1/2 */
-       u8      *pBandWidth;
+       enum ht_channel_width *pBandWidth;
        /*  Central channel location Ch1/Ch2/.... */
        u8      *pChannel;      /* central channel number */