mirror of
https://github.com/brektrou/rtl8821CU.git
synced 2026-03-22 07:28:26 +08:00
Bugfix: rtw_cfg80211_ch_switch_notify
https://github.com/Mange/rtl8192eu-linux-driver/pull/194/files
This commit is contained in:
@@ -424,7 +424,8 @@ bool rtw_cfg80211_allow_ch_switch_notify(_adapter *adapter)
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ht)
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
|
||||
u8 ht, bool started)
|
||||
{
|
||||
struct wiphy *wiphy = adapter_to_wiphy(adapter);
|
||||
u8 ret = _SUCCESS;
|
||||
@@ -432,13 +433,20 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
struct cfg80211_chan_def chdef = {};
|
||||
|
||||
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
|
||||
goto exit;
|
||||
|
||||
ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
|
||||
if (ret != _SUCCESS)
|
||||
goto exit;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
|
||||
if (started) {
|
||||
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
|
||||
goto exit;
|
||||
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
|
||||
|
||||
#else
|
||||
|
||||
@@ -409,7 +409,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ht);
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ht, bool started);
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||
|
||||
Reference in New Issue
Block a user