mirror of
https://github.com/drygdryg/rtl8188eus.git
synced 2025-04-29 02:37:16 +09:00
Added kernel v5.2 support
This commit is contained in:
commit
898696bd98
@ -63,6 +63,9 @@ unmanaged-devices=mac:A7:A7:A7:A7:A7
|
|||||||
|
|
||||||
* Check code with checkpatch.pl (found in "tools")
|
* Check code with checkpatch.pl (found in "tools")
|
||||||
|
|
||||||
|
* There is a bug in monitor mode related to Network-Manager.
|
||||||
|
This needs priority because it causes interferrence.
|
||||||
|
|
||||||
* Add more VID/PIDS for all 3 chipsets supported.
|
* Add more VID/PIDS for all 3 chipsets supported.
|
||||||
* Remove unused functions
|
* Remove unused functions
|
||||||
<br>
|
<br>
|
||||||
|
@ -775,6 +775,10 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||||||
pstapriv->sta_aid[psta->cmn.aid - 1] = NULL;
|
pstapriv->sta_aid[psta->cmn.aid - 1] = NULL;
|
||||||
psta->cmn.aid = 0;
|
psta->cmn.aid = 0;
|
||||||
}
|
}
|
||||||
|
if (psta->aid > 31) {
|
||||||
|
pr_err("***** psta->aid (%d) out of bounds\n", psta->aid);
|
||||||
|
return _FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_NATIVEAP_MLME */
|
#endif /* CONFIG_NATIVEAP_MLME */
|
||||||
|
@ -4137,6 +4137,7 @@ void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint f
|
|||||||
#if defined(RTW_USE_CFG80211_STA_EVENT) || defined(COMPAT_KERNEL_RELEASE)
|
#if defined(RTW_USE_CFG80211_STA_EVENT) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
{
|
{
|
||||||
struct station_info sinfo;
|
struct station_info sinfo;
|
||||||
|
_rtw_memset(&sinfo, 0, sizeof(struct station_info));
|
||||||
u8 ie_offset;
|
u8 ie_offset;
|
||||||
if (get_frame_sub_type(pmgmt_frame) == WIFI_ASSOCREQ)
|
if (get_frame_sub_type(pmgmt_frame) == WIFI_ASSOCREQ)
|
||||||
ie_offset = _ASOCREQ_IE_OFFSET_;
|
ie_offset = _ASOCREQ_IE_OFFSET_;
|
||||||
@ -4426,7 +4427,11 @@ static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct net_device **ndev)
|
static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name,
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
|
unsigned char name_assign_type,
|
||||||
|
#endif
|
||||||
|
struct net_device **ndev)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct net_device *mon_ndev = NULL;
|
struct net_device *mon_ndev = NULL;
|
||||||
@ -4457,6 +4462,9 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|||||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
|
mon_ndev->name_assign_type = name_assign_type;
|
||||||
|
#endif
|
||||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(4, 11, 8))
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(4, 11, 8))
|
||||||
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||||
#else
|
#else
|
||||||
@ -4546,7 +4554,11 @@ static int
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case NL80211_IFTYPE_MONITOR:
|
case NL80211_IFTYPE_MONITOR:
|
||||||
padapter = wiphy_to_adapter(wiphy); /* TODO: get ap iface ? */
|
padapter = wiphy_to_adapter(wiphy); /* TODO: get ap iface ? */
|
||||||
ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name, &ndev);
|
ret = rtw_cfg80211_add_monitor_if(padapter, (char *)name,
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
|
name_assign_type,
|
||||||
|
#endif
|
||||||
|
&ndev);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
wdev = ndev->ieee80211_ptr;
|
wdev = ndev->ieee80211_ptr;
|
||||||
break;
|
break;
|
||||||
@ -8826,7 +8838,13 @@ static void rtw_cfg80211_init_ht_capab(_adapter *padapter
|
|||||||
|
|
||||||
ht_cap->ht_supported = _TRUE;
|
ht_cap->ht_supported = _TRUE;
|
||||||
|
|
||||||
ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
/* According to the comment in rtw_ap.c:
|
||||||
|
* "Note: currently we switch to the MIXED op mode if HT non-greenfield
|
||||||
|
* station is associated. Probably it's a theoretical case, since
|
||||||
|
* it looks like all known HT STAs support greenfield."
|
||||||
|
* Therefore Greenfield is added to ht_cap
|
||||||
|
*/
|
||||||
|
ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_GRN_FLD |
|
||||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 |
|
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 |
|
||||||
IEEE80211_HT_CAP_DSSSCCK40 | IEEE80211_HT_CAP_MAX_AMSDU;
|
IEEE80211_HT_CAP_DSSSCCK40 | IEEE80211_HT_CAP_MAX_AMSDU;
|
||||||
rtw_cfg80211_init_ht_capab_ex(padapter, ht_cap, band, rf_type);
|
rtw_cfg80211_init_ht_capab_ex(padapter, ht_cap, band, rf_type);
|
||||||
|
@ -1676,6 +1676,10 @@ void rtw_os_ndev_unregister(_adapter *adapter)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) {
|
if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) {
|
||||||
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
|
struct wireless_dev *wdev = padapter->rtw_wdev;
|
||||||
|
wdev->current_bss = NULL;
|
||||||
|
#endif
|
||||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||||
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
|
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
|
||||||
|
|
||||||
@ -3553,10 +3557,11 @@ static int netdev_close(struct net_device *pnetdev)
|
|||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
#ifdef CONFIG_IOCTL_CFG80211
|
#ifdef CONFIG_IOCTL_CFG80211
|
||||||
|
wdev->iftype = NL80211_IFTYPE_STATION;
|
||||||
rtw_scan_abort(padapter);
|
rtw_scan_abort(padapter);
|
||||||
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
|
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
|
||||||
adapter_wdev_data(padapter)->bandroid_scan = _FALSE;
|
adapter_wdev_data(padapter)->bandroid_scan = _FALSE;
|
||||||
//padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; /* set this at the end */
|
padapter->rtw_wdev->iftype = NL80211_IFTYPE_STATION; /* set this at the end */
|
||||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||||
|
|
||||||
#ifdef CONFIG_WAPI_SUPPORT
|
#ifdef CONFIG_WAPI_SUPPORT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user