New upstream version 5.3.9~git20210504.6146193
This commit is contained in:
1 parent
322a5f0ea6
commit
e01e3993b3
13 files changed
+13771
-115
No files matched your search
@@ -27,7 +27,7 @@
|
||||
#define DBG_RTW_CFG80211_MESH_CONF 0
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) || defined(RHEL79))
|
||||
#define STATION_INFO_INACTIVE_TIME BIT(NL80211_STA_INFO_INACTIVE_TIME)
|
||||
#define STATION_INFO_LLID BIT(NL80211_STA_INFO_LLID)
|
||||
#define STATION_INFO_PLID BIT(NL80211_STA_INFO_PLID)
|
||||
@@ -289,7 +289,7 @@ static const char *nl80211_chan_width_str(enum nl80211_chan_width cwidth)
|
||||
return "80+80";
|
||||
case NL80211_CHAN_WIDTH_160:
|
||||
return "160";
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) || defined(RHEL79))
|
||||
case NL80211_CHAN_WIDTH_5:
|
||||
return "5";
|
||||
case NL80211_CHAN_WIDTH_10:
|
||||
@@ -390,7 +390,7 @@ static void rtw_get_chbw_from_cfg80211_chan_def(struct cfg80211_chan_def *chdef,
|
||||
*ch = chan->hw_value;
|
||||
break;
|
||||
case NL80211_CHAN_WIDTH_80P80:
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) || defined(RHEL79))
|
||||
case NL80211_CHAN_WIDTH_5:
|
||||
case NL80211_CHAN_WIDTH_10:
|
||||
#endif
|
||||
@@ -944,7 +944,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||
struct wireless_dev *pwdev = padapter->rtw_wdev;
|
||||
struct cfg80211_bss *bss = NULL;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || defined(RHEL79))
|
||||
struct wiphy *wiphy = pwdev->wiphy;
|
||||
int freq = 2412;
|
||||
struct ieee80211_channel *notify_channel;
|
||||
@@ -1002,7 +1002,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
||||
RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
|
||||
}
|
||||
/* notify cfg80211 that device joined an IBSS */
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || defined(RHEL79))
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
|
||||
#else
|
||||
@@ -1090,7 +1090,7 @@ check_bss:
|
||||
struct ieee80211_channel *notify_channel;
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL79))
|
||||
struct cfg80211_roam_info roam_info;
|
||||
#endif
|
||||
|
||||
@@ -1098,7 +1098,7 @@ check_bss:
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL79))
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
|
||||
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
|
||||
@@ -1126,7 +1126,7 @@ check_bss:
|
||||
rtw_ft_set_status(padapter, RTW_FT_ASSOCIATED_STA);
|
||||
#endif
|
||||
} else {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#if !defined(RHEL79) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE))
|
||||
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
||||
#endif
|
||||
|
||||
@@ -1137,7 +1137,7 @@ check_bss:
|
||||
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
|
||||
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
|
||||
, WLAN_STATUS_SUCCESS, GFP_ATOMIC);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#if defined(RHEL79) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE))
|
||||
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
|
||||
#endif
|
||||
}
|
||||
@@ -1193,7 +1193,7 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
|
||||
_enter_critical_bh(&pwdev_priv->connect_req_lock, &irqL);
|
||||
|
||||
if (padapter->ndev_unregistering || !rtw_wdev_not_indic_disco(pwdev_priv)) {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#if (!defined(RHEL79) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)))
|
||||
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
||||
|
||||
if (pwdev->sme_state == CFG80211_SME_CONNECTING) {
|
||||
@@ -2448,7 +2448,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
|
||||
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
|
||||
_irqL irqL;
|
||||
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE || defined(RHEL79))
|
||||
struct cfg80211_scan_info info;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
@@ -2465,7 +2465,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
|
||||
if (pwdev_priv->scan_request->wiphy != pwdev_priv->rtw_wdev->wiphy)
|
||||
RTW_INFO("error wiphy compare\n");
|
||||
else
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE || defined(RHEL79))
|
||||
cfg80211_scan_done(pwdev_priv->scan_request, &info);
|
||||
#else
|
||||
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
|
||||
@@ -3055,7 +3055,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||
|
||||
check_need_indicate_scan_done:
|
||||
if (_TRUE == need_indicate_scan_done) {
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE || defined(RHEL79))
|
||||
struct cfg80211_scan_info info;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
@@ -3063,7 +3063,7 @@ check_need_indicate_scan_done:
|
||||
#endif
|
||||
|
||||
_rtw_cfg80211_surveydone_event_callback(padapter, request);
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
|
||||
#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE || defined(RHEL79))
|
||||
cfg80211_scan_done(request, &info);
|
||||
#else
|
||||
cfg80211_scan_done(request, 0);
|
||||
@@ -4460,6 +4460,12 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name,
|
||||
goto out;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
mon_ndev->mtu = WLAN_DATA_MAXLEN;
|
||||
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
#endif
|
||||
|
||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||
@@ -7088,34 +7094,24 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
struct mgmt_frame_regs *upd)
|
||||
#else
|
||||
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||
struct wireless_dev *wdev,
|
||||
#else
|
||||
struct net_device *ndev,
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
struct mgmt_frame_regs *upd)
|
||||
#else
|
||||
u16 frame_type, bool reg)
|
||||
#endif
|
||||
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
u32 rtw_mask = BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||
struct net_device *ndev = wdev_to_ndev(wdev);
|
||||
#endif
|
||||
|
||||
/* hardcoded always true, to make it pass compilation */
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
bool reg = true;
|
||||
#endif
|
||||
|
||||
_adapter *adapter;
|
||||
|
||||
struct rtw_wdev_priv *pwdev_priv;
|
||||
|
||||
if (ndev == NULL)
|
||||
@@ -7125,40 +7121,10 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
pwdev_priv = adapter_wdev_data(adapter);
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
||||
RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
|
||||
frame_type, reg);
|
||||
#else
|
||||
RTW_INFO(FUNC_ADPT_FMT " old_regs:%x new_regs:%x\n",
|
||||
FUNC_ADPT_ARG(adapter), pwdev_priv->mgmt_mask, upd->interface_stypes);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Wait QC Verify */
|
||||
return;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
switch (upd->interface_stypes) {
|
||||
#else
|
||||
switch (frame_type) {
|
||||
#endif
|
||||
|
||||
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
|
||||
break;
|
||||
case IEEE80211_STYPE_ACTION: /* 0x00D0 */
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION, reg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if ((upd->interface_stypes & rtw_mask) == (pwdev_priv->mgmt_mask & rtw_mask))
|
||||
return;
|
||||
|
||||
pwdev_priv->mgmt_mask = upd->interface_stypes;
|
||||
#endif
|
||||
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
@@ -9146,7 +9112,8 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0) && \
|
||||
LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||
LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) && \
|
||||
!defined(RHEL79))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
||||
@@ -9157,7 +9124,7 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) && !defined(RHEL79))
|
||||
wiphy->wowlan = wowlan_stub;
|
||||
#else
|
||||
wiphy->wowlan = &wowlan_stub;
|
||||
@@ -9464,7 +9431,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
.mgmt_tx = cfg80211_rtw_mgmt_tx,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
|
||||
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
|
||||
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
||||
#else
|
||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||
#endif
|
||||
@@ -9801,3 +9768,5 @@ void rtw_cfg80211_dev_res_unregister(struct dvobj_priv *dvobj)
|
||||
rtw_wiphy_unregister(dvobj_to_wiphy(dvobj));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
@@ -362,7 +362,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
|
||||
|
||||
#define rtw_cfg80211_connect_result(wdev, bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp) cfg80211_connect_result(wdev_to_ndev(wdev), bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp)
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) && !defined(RHEL79))
|
||||
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, gfp)
|
||||
#else
|
||||
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, locally_generated, gfp)
|
||||
@@ -384,7 +384,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ht);
|
||||
#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) && !defined(RHEL79) )
|
||||
#define NL80211_BAND_2GHZ IEEE80211_BAND_2GHZ
|
||||
#define NL80211_BAND_5GHZ IEEE80211_BAND_5GHZ
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||
|
||||
@@ -1513,6 +1513,12 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
|
||||
if (!pnetdev)
|
||||
return NULL;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
pnetdev->mtu = WLAN_DATA_MAXLEN;
|
||||
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
#endif
|
||||
|
||||
padapter = rtw_netdev_priv(pnetdev);
|
||||
padapter->pnetdev = pnetdev;
|
||||
|
||||
|
||||
@@ -354,7 +354,11 @@ static int napi_recv(_adapter *padapter, int budget)
|
||||
|
||||
#ifdef CONFIG_RTW_GRO
|
||||
if (pregistrypriv->en_gro) {
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
||||
if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
|
||||
#else
|
||||
if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_MERGED_FREE)
|
||||
#endif
|
||||
rx_ok = _TRUE;
|
||||
goto next;
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ void rtw_regd_apply_flags(struct wiphy *wiphy)
|
||||
&& rtw_odm_dfs_domain_unknown(padapter)
|
||||
#endif
|
||||
) {
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(RHEL79))
|
||||
ch->flags = (IEEE80211_CHAN_NO_IBSS | IEEE80211_CHAN_PASSIVE_SCAN);
|
||||
#else
|
||||
ch->flags = IEEE80211_CHAN_NO_IR;
|
||||
@@ -309,7 +309,7 @@ void rtw_regd_apply_flags(struct wiphy *wiphy)
|
||||
#endif
|
||||
) {
|
||||
ch->flags |= IEEE80211_CHAN_RADAR;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(RHEL79))
|
||||
ch->flags |= (IEEE80211_CHAN_NO_IBSS | IEEE80211_CHAN_PASSIVE_SCAN);
|
||||
#else
|
||||
ch->flags |= IEEE80211_CHAN_NO_IR;
|
||||
@@ -374,7 +374,7 @@ static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg, struct wiphy *wiphy
|
||||
wiphy->reg_notifier = rtw_reg_notifier;
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) && !defined(RHEL79))
|
||||
wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
|
||||
wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY;
|
||||
wiphy->flags &= ~WIPHY_FLAG_DISABLE_BEACON_HINTS;
|
||||
|
||||
Reference in new issue
Block a user