staging:rtl8192u: Move HTSetConnectBwModeCallback() - Style
The function HTSetConnectBwModeCallback() is only used in the file in which it is defined, so has been changed to being of type 'static'. Additionally the function is defined after it is used so a prototype was included in the file. This prototype, in the middle of the file has been removed and the function implementation moved so that it is defined before it is used in the file. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1eed1d9287
commit
12f34f81ba
|
@ -2379,7 +2379,6 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee,
|
|||
extern u8 MCS_FILTER_ALL[];
|
||||
extern u16 MCS_DATA_RATE[2][2][77];
|
||||
u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame);
|
||||
//extern void HTSetConnectBwModeCallback(unsigned long data);
|
||||
void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
|
||||
bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee);
|
||||
u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate);
|
||||
|
|
|
@ -1011,7 +1011,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
|
|||
pHTInfo->CurrentOpMode = pPeerHTInfo->OptMode;
|
||||
}
|
||||
|
||||
void HTSetConnectBwModeCallback(struct ieee80211_device *ieee);
|
||||
/*
|
||||
*function: initialize HT info(struct PRT_HIGH_THROUGHPUT)
|
||||
* input: struct ieee80211_device* ieee
|
||||
|
@ -1228,6 +1227,29 @@ u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)
|
||||
{
|
||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||
|
||||
IEEE80211_DEBUG(IEEE80211_DL_HT, "======>%s()\n", __func__);
|
||||
|
||||
if (pHTInfo->bCurBW40MHz) {
|
||||
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel + 2);
|
||||
else if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_LOWER)
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel - 2);
|
||||
else
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, pHTInfo->CurSTAExtChnlOffset);
|
||||
} else {
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
|
||||
}
|
||||
|
||||
pHTInfo->bSwBwInProgress = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function set bandwidth mode in protocol layer.
|
||||
*/
|
||||
|
@ -1278,26 +1300,3 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, enum ht_channel_width Ban
|
|||
|
||||
// spin_unlock_irqrestore(&(ieee->bw_spinlock), flags);
|
||||
}
|
||||
|
||||
void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)
|
||||
{
|
||||
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
|
||||
|
||||
IEEE80211_DEBUG(IEEE80211_DL_HT, "======>%s()\n", __func__);
|
||||
|
||||
if (pHTInfo->bCurBW40MHz) {
|
||||
if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_UPPER)
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel + 2);
|
||||
else if (pHTInfo->CurSTAExtChnlOffset == HT_EXTCHNL_OFFSET_LOWER)
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel - 2);
|
||||
else
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20_40, pHTInfo->CurSTAExtChnlOffset);
|
||||
} else {
|
||||
ieee->set_chan(ieee->dev, ieee->current_network.channel);
|
||||
ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
|
||||
}
|
||||
|
||||
pHTInfo->bSwBwInProgress = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue