mirror of
https://github.com/torvalds/linux.git
synced 2026-10-12 13:27:02 +02:00
staging: rtl8723bs: remove unnesessary function parameter
The function rtw_ieee80211_channel_to_frequency() in ioctl_cfg80211.c is always called with band = NL80211_BAND_2GHZ. Remove the unnecessary band parameter from the function and adjust its code and calls. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20250630083049.103734-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
49f9718b1d
commit
1267d12f5e
|
|
@ -192,14 +192,14 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int rtw_ieee80211_channel_to_frequency(int chan, int band)
|
||||
static int rtw_ieee80211_channel_to_frequency(int chan)
|
||||
{
|
||||
if (band == NL80211_BAND_2GHZ) {
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
return 2407 + chan * 5;
|
||||
}
|
||||
/* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
|
||||
if (chan < 14)
|
||||
return 2407 + chan * 5;
|
||||
|
||||
return 0; /* not supported */
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
|
|||
/* spin_unlock_bh(&pwdev_priv->scan_req_lock); */
|
||||
|
||||
channel = pnetwork->network.configuration.ds_config;
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ int rtw_cfg80211_check_bss(struct adapter *padapter)
|
|||
if (!(pnetwork) || !(padapter->rtw_wdev))
|
||||
return false;
|
||||
|
||||
freq = rtw_ieee80211_channel_to_frequency(pnetwork->configuration.ds_config, NL80211_BAND_2GHZ);
|
||||
freq = rtw_ieee80211_channel_to_frequency(pnetwork->configuration.ds_config);
|
||||
|
||||
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
|
||||
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
|
||||
|
|
@ -440,7 +440,7 @@ void rtw_cfg80211_indicate_connect(struct adapter *padapter)
|
|||
u16 channel = cur_network->network.configuration.ds_config;
|
||||
struct cfg80211_roam_info roam_info = {};
|
||||
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
|
|
@ -1976,7 +1976,7 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd
|
|||
if (!channel)
|
||||
return -ENODATA;
|
||||
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel);
|
||||
|
||||
chan = ieee80211_get_channel(adapter->rtw_wdev->wiphy, freq);
|
||||
|
||||
|
|
@ -2456,7 +2456,7 @@ void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len,
|
|||
|
||||
rtw_action_frame_parse(frame, frame_len, &category, &action);
|
||||
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
freq = rtw_ieee80211_channel_to_frequency(channel);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user