mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-24 14:34:58 +00:00
Merge pull request #194 from 5kft/fix-startup-traps
rtl8192eu: Fix driver startup traps in rtw_cfg80211_ch_switch_notify
This commit is contained in:
commit
6d2705d802
@ -1784,7 +1784,7 @@ chbw_decision:
|
|||||||
, pdvobj->padapters[i]->mlmeextpriv.cur_channel
|
, pdvobj->padapters[i]->mlmeextpriv.cur_channel
|
||||||
, pdvobj->padapters[i]->mlmeextpriv.cur_bwmode
|
, pdvobj->padapters[i]->mlmeextpriv.cur_bwmode
|
||||||
, pdvobj->padapters[i]->mlmeextpriv.cur_ch_offset
|
, pdvobj->padapters[i]->mlmeextpriv.cur_ch_offset
|
||||||
, ht_option);
|
, ht_option, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* defined(CONFIG_IOCTL_CFG80211) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)) */
|
#endif /* defined(CONFIG_IOCTL_CFG80211) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)) */
|
||||||
|
@ -16096,7 +16096,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res)
|
|||||||
|
|
||||||
rtw_cfg80211_ch_switch_notify(iface
|
rtw_cfg80211_ch_switch_notify(iface
|
||||||
, mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset
|
, mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset
|
||||||
, ht_option);
|
, ht_option, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -16314,7 +16314,7 @@ exit:
|
|||||||
the bss freq is updated by channel switch event.
|
the bss freq is updated by channel switch event.
|
||||||
*/
|
*/
|
||||||
rtw_cfg80211_ch_switch_notify(adapter,
|
rtw_cfg80211_ch_switch_notify(adapter,
|
||||||
cur_ch, cur_bw, cur_ch_offset, ht_option);
|
cur_ch, cur_bw, cur_ch_offset, ht_option, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -424,21 +424,29 @@ bool rtw_cfg80211_allow_ch_switch_notify(_adapter *adapter)
|
|||||||
return 1;
|
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);
|
struct wiphy *wiphy = adapter_to_wiphy(adapter);
|
||||||
u8 ret = _SUCCESS;
|
u8 ret = _SUCCESS;
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||||
struct cfg80211_chan_def chdef;
|
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);
|
ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
|
||||||
if (ret != _SUCCESS)
|
if (ret != _SUCCESS)
|
||||||
goto exit;
|
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);
|
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -407,7 +407,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
|
#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
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||||
|
Loading…
Reference in New Issue
Block a user