summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
diff options
context:
space:
mode:
authorJohn Whitmore <johnfwhitmore@gmail.com>2018-09-26 20:16:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 14:36:58 +0200
commit12f34f81ba513258067714a9161463ef3d3785e5 (patch)
treef9e8e28fc866df59b526fda76bb1f73fa712830f /drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
parent1eed1d928780cf74af70a3260181ea9f4fb468de (diff)
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>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 977a1e5c9b52..c73a8058cf87 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -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;
-}