Commit ba50fbc0 authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Rework function PHY_SwChnl8188E()

Rename CamelCase variables and function name.
Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5f6a5cdb
...@@ -222,7 +222,7 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) ...@@ -222,7 +222,7 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->read_chip_version = &rtl8188e_read_chip_version; pHalFunc->read_chip_version = &rtl8188e_read_chip_version;
pHalFunc->set_bwmode_handler = &phy_set_bw_mode; pHalFunc->set_bwmode_handler = &phy_set_bw_mode;
pHalFunc->set_channel_handler = &PHY_SwChnl8188E; pHalFunc->set_channel_handler = &phy_sw_chnl;
pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog; pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog;
......
...@@ -355,30 +355,27 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel) ...@@ -355,30 +355,27 @@ static void phy_sw_chnl_callback(struct adapter *adapt, u8 channel)
} }
} }
void PHY_SwChnl8188E(struct adapter *Adapter, u8 channel) void phy_sw_chnl(struct adapter *adapt, u8 channel)
{ {
/* Call after initialization */ struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); u8 tmpchannel = hal_data->CurrentChannel;
u8 tmpchannel = pHalData->CurrentChannel; bool result = true;
bool bResult = true;
if (pHalData->rf_chip == RF_PSEUDO_11N) if (hal_data->rf_chip == RF_PSEUDO_11N)
return; /* return immediately if it is peudo-phy */ return;
if (channel == 0) if (channel == 0)
channel = 1; channel = 1;
pHalData->CurrentChannel = channel; hal_data->CurrentChannel = channel;
if ((!Adapter->bDriverStopped) && (!Adapter->bSurpriseRemoved)) { if ((!adapt->bDriverStopped) && (!adapt->bSurpriseRemoved)) {
phy_sw_chnl_callback(Adapter, channel); phy_sw_chnl_callback(adapt, channel);
if (bResult) if (!result)
; hal_data->CurrentChannel = tmpchannel;
else
pHalData->CurrentChannel = tmpchannel;
} else { } else {
pHalData->CurrentChannel = tmpchannel; hal_data->CurrentChannel = tmpchannel;
} }
} }
...@@ -207,8 +207,6 @@ void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel); ...@@ -207,8 +207,6 @@ void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation); void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
/* channel switch related funciton */
void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
/* Call after initialization */ /* Call after initialization */
void ChkFwCmdIoDone(struct adapter *adapter); void ChkFwCmdIoDone(struct adapter *adapter);
......
...@@ -13,3 +13,4 @@ void phy_set_tx_power_level(struct adapter *adapt, u8 channel); ...@@ -13,3 +13,4 @@ void phy_set_tx_power_level(struct adapter *adapt, u8 channel);
void phy_set_bw_mode(struct adapter *adapt, enum ht_channel_width bandwidth, void phy_set_bw_mode(struct adapter *adapt, enum ht_channel_width bandwidth,
unsigned char offset); unsigned char offset);
void phy_sw_chnl(struct adapter *adapt, u8 channel);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment