Merge pull request #282 from kimocoder/v5.3.4

Merge changes
This commit is contained in:
Christian B 2019-02-15 19:09:44 -05:00 committed by GitHub
commit a1a2a832ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 73 additions and 39 deletions

View File

@ -40,7 +40,9 @@ CONFIG_RTL8814A = y
######################### Interface ###########################
CONFIG_USB_HCI = y
########################## Features ###########################
CONFIG_NET_NS = n
CONFIG_MP_INCLUDED = y
CONFIG_CONCURRENT_MODE = n
CONFIG_POWER_SAVING = n
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
@ -98,6 +100,7 @@ CONFIG_MP_VHT_HW_TX_MODE = n
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_OPENWRT_NEO2 = n
CONFIG_PLATFORM_JB_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n
@ -901,6 +904,15 @@ CROSS_COMPILE := mips-openwrt-linux-
KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9
endif
ifeq ($(CONFIG_PLATFORM_OPENWRT_NEO2), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm64
CROSS_COMPILE := aarch64-openwrt-linux-
#export PATH=$PATH:/home/greearb/git/openwrt-neo2-dev/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/bin/
#export STAGING_DIR=/home/greearb/git/openwrt-neo2-dev/staging_dir
KSRC := /home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78
endif
ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM
ARCH := mips

View File

@ -20,6 +20,18 @@
#error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n"
#endif
#if !((defined CONFIG_LITTLE_ENDIAN) || (defined CONFIG_BIG_ENDIAN))
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define CONFIG_LITTLE_ENDIAN
//#warning "Auto-detected little-endian system...hope it is correct!"
#else
#if __BYTE_ORDER == __BIG_ENDIAN
//#warning "Auto-detected big-endian system...hope it is correct!"
#define CONFIG_BIG_ENDIAN
#endif
#endif
#endif
#if defined(CONFIG_LITTLE_ENDIAN)
#ifndef CONFIG_PLATFORM_MSTAR389
#include <byteorder/little_endian.h>

View File

@ -765,7 +765,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
pbuf = rtw_zmalloc(buf_size);
if (pbuf == NULL) {
RTW_INFO("%s pbuf allocate failed !!\n", __FUNCTION__);
RTW_INFO("%s pbuf allocate failed !!\n", __func__);
return bss;
}
@ -773,7 +773,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
bssinf_len = pnetwork->network.IELength + sizeof(struct rtw_ieee80211_hdr_3addr);
if (bssinf_len > buf_size) {
RTW_INFO("%s IE Length too long > %zu byte\n", __FUNCTION__, buf_size);
RTW_INFO("%s IE Length too long > %zu byte\n", __func__, buf_size);
goto exit;
}
@ -783,7 +783,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
if (rtw_get_wapi_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &wapi_len) > 0) {
if (wapi_len > 0) {
RTW_INFO("%s, no support wapi!\n", __FUNCTION__);
RTW_INFO("%s, no support wapi!\n", __func__);
goto exit;
}
}
@ -1213,12 +1213,15 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
rtw_cfg80211_connect_result(pwdev, NULL, NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC);
} else {
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_disconnected\n", FUNC_ADPT_ARG(padapter));
rtw_cfg80211_disconnected(pwdev, reason, NULL, 0, locally_generated, GFP_ATOMIC);
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_disconnected\n", FUNC_ADPT_ARG(padapter));
rtw_cfg80211_disconnected(pwdev, reason, NULL, 0, locally_generated, GFP_ATOMIC);
cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC);
}
#endif
}
}
rtw_wdev_free_connect_req(pwdev_priv);
_exit_critical_bh(&pwdev_priv->connect_req_lock, &irqL);
@ -2290,6 +2293,11 @@ enum nl80211_iftype {
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
};
#endif
#ifdef CONFIG_CONCURRENT_MODE
extern int netdev_if2_open(struct net_device *pnetdev);
#endif
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
struct net_device *ndev,
enum nl80211_iftype type,
@ -4118,6 +4126,8 @@ void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint f
{
struct station_info sinfo;
u8 ie_offset;
_rtw_memset(&sinfo, 0, sizeof(struct station_info));
if (get_frame_sub_type(pmgmt_frame) == WIFI_ASSOCREQ)
ie_offset = _ASOCREQ_IE_OFFSET_;
else /* WIFI_REASSOCREQ */
@ -4657,7 +4667,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
/* struct sta_priv *pstapriv = &padapter->stapriv; */
RTW_INFO("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __FUNCTION__, head_len, tail_len);
RTW_INFO("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __func__, head_len, tail_len);
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
@ -5209,7 +5219,7 @@ release_plink_ctl:
if (psta == NULL) {
psta = rtw_alloc_stainfo(pstapriv, (u8 *)mac);
if (psta == NULL) {
RTW_INFO("[%s] Alloc station for "MAC_FMT" fail\n", __FUNCTION__, MAC_ARG(mac));
RTW_INFO("[%s] Alloc station for "MAC_FMT" fail\n", __func__, MAC_ARG(mac));
ret = -EOPNOTSUPP;
goto exit;
}
@ -6070,7 +6080,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr);
RTW_INFO("[%s] In\n", __FUNCTION__);
RTW_INFO("[%s] In\n", __func__);
/* prepare for building provision_request frame */
_rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, GetAddr1Ptr(buf), ETH_ALEN);
@ -7274,7 +7284,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
/* Debug purpose */
#if 1
RTW_INFO("%s %d\n", __FUNCTION__, __LINE__);
RTW_INFO("%s %d\n", __func__, __LINE__);
RTW_INFO("peer:"MAC_FMT", action code:%d, dialog:%d, status code:%d\n",
MAC_ARG(txmgmt.peer), txmgmt.action_code,
txmgmt.dialog_token, txmgmt.status_code);
@ -7365,7 +7375,7 @@ static int cfg80211_rtw_tdls_oper(struct wiphy *wiphy,
if (padapter->wdinfo.wfd_tdls_weaksec == _TRUE)
issue_tdls_setup_req(padapter, &txmgmt, _TRUE);
else
RTW_INFO("[%s] Current link is not AES, SKIP sending the tdls setup request!!\n", __FUNCTION__);
RTW_INFO("[%s] Current link is not AES, SKIP sending the tdls setup request!!\n", __func__);
} else
#endif /* CONFIG_WFD */
{
@ -8488,13 +8498,13 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
//rtw_sitesurvey_cmd(padapter, NULL);
rtw_sitesurvey_cmd(padapter, &parm);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {
if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE)
break;
rtw_msleep_os(1000);
}
_enter_critical_bh(&pmlmepriv->lock, &irqL);
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
@ -8502,7 +8512,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
}
RTW_DBG("<== %s\n",__func__);
return 0;
}
#endif /* CONFIG_PNO_SUPPORT */
@ -8538,7 +8548,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
pmlmepriv->wps_beacon_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_beacon_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8569,7 +8579,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
pmlmepriv->p2p_beacon_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_beacon_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8648,7 +8658,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->wps_probe_resp_ie = rtw_malloc(wps_ielen);
if (pmlmepriv->wps_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8696,7 +8706,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
/* Check P2P Capability ATTR */
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
u8 grp_cap = 0;
/* RTW_INFO( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ ); */
/* RTW_INFO( "[%s] Got P2P Capability Attr!!\n", __func__ ); */
cap_attr = le16_to_cpu(cap_attr);
grp_cap = (u8)((cap_attr >> 8) & 0xff);
@ -8717,7 +8727,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8733,7 +8743,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_go_probe_resp_ie = rtw_malloc(p2p_ielen);
if (pmlmepriv->p2p_go_probe_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
@ -8788,7 +8798,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->wps_assoc_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
_rtw_memcpy(pmlmepriv->wps_assoc_resp_ie, ie, ie_len);
@ -8807,7 +8817,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu
pmlmepriv->p2p_assoc_resp_ie = rtw_malloc(ie_len);
if (pmlmepriv->p2p_assoc_resp_ie == NULL) {
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __FUNCTION__, __LINE__);
RTW_INFO("%s()-%d: rtw_malloc() ERROR!\n", __func__, __LINE__);
return -EINVAL;
}
_rtw_memcpy(pmlmepriv->p2p_assoc_resp_ie, ie, ie_len);

View File

@ -17,7 +17,7 @@
#include <drv_types.h>
#include <hal_data.h>
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#if defined(PLATFORM_LINUX) && defined(PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
@ -81,15 +81,15 @@ MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
module_param(rtw_lps_level, int, 0644);
MODULE_PARM_DESC(rtw_lps_level, "The default LPS level");
/* LPS:
/* LPS:
* rtw_smart_ps = 0 => TX: pwr bit = 1, RX: PS_Poll
* rtw_smart_ps = 1 => TX: pwr bit = 0, RX: PS_Poll
* rtw_smart_ps = 2 => TX: pwr bit = 0, RX: NullData with pwr bit = 0
*/
int rtw_smart_ps = 2;
#ifdef CONFIG_WMMPS_STA
/* WMMPS:
#ifdef CONFIG_WMMPS_STA
/* WMMPS:
* rtw_smart_ps = 0 => Only for fw test
* rtw_smart_ps = 1 => Refer to Beacon's TIM Bitmap
* rtw_smart_ps = 2 => Don't refer to Beacon's TIM Bitmap

View File

@ -63,12 +63,12 @@ static void rtw_dev_shutdown(struct device *dev)
#ifdef CONFIG_WOWLAN
#ifdef CONFIG_GPIO_WAKEUP
/*default wake up pin change to BT*/
RTW_INFO("%s:default wake up pin change to BT\n", __FUNCTION__);
RTW_INFO("%s:default wake up pin change to BT\n", __func__);
rtw_hal_switch_gpio_wl_ctrl(adapter, WAKEUP_GPIO_IDX, _FALSE);
#endif /* CONFIG_GPIO_WAKEUP */
if (pwrctl->wowlan_mode == _TRUE)
RTW_PRINT("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __FUNCTION__);
RTW_PRINT("%s wowlan_mode ==_TRUE do not run rtw_hal_deinit()\n", __func__);
else
#endif
{
@ -824,7 +824,7 @@ static void process_spec_devid(const struct usb_device_id *pdid)
if ((pdid->idVendor == vid) && (pdid->idProduct == pid) && (flags & SPEC_DEV_ID_ASSIGN_IFNAME)) {
extern char *ifname;
strncpy(ifname, "wlan10", 6);
/* RTW_INFO("%s()-%d: ifname=%s, vid=%04X, pid=%04X\n", __FUNCTION__, __LINE__, ifname, vid, pid); */
/* RTW_INFO("%s()-%d: ifname=%s, vid=%04X, pid=%04X\n", __func__, __LINE__, ifname, vid, pid); */
}
#endif /* RTK_DMP_PLATFORM */
@ -899,7 +899,7 @@ int rtw_hw_suspend(_adapter *padapter)
return 0;
error_exit:
RTW_INFO("%s, failed\n", __FUNCTION__);
RTW_INFO("%s, failed\n", __func__);
return -1;
}
@ -934,7 +934,7 @@ int rtw_hw_resume(_adapter *padapter)
return 0;
error_exit:
RTW_INFO("%s, Open net dev failed\n", __FUNCTION__);
RTW_INFO("%s, Open net dev failed\n", __func__);
return -1;
}
#endif
@ -954,7 +954,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
padapter = dvobj_get_primary_adapter(dvobj);
if (pwrpriv->bInSuspend == _TRUE) {
RTW_INFO("%s bInSuspend = %d\n", __FUNCTION__, pwrpriv->bInSuspend);
RTW_INFO("%s bInSuspend = %d\n", __func__, pwrpriv->bInSuspend);
pdbgpriv->dbg_suspend_error_cnt++;
goto exit;
}
@ -990,7 +990,7 @@ int rtw_resume_process(_adapter *padapter)
if (pwrpriv->bInSuspend == _FALSE) {
pdbgpriv->dbg_resume_error_cnt++;
RTW_INFO("%s bInSuspend = %d\n", __FUNCTION__, pwrpriv->bInSuspend);
RTW_INFO("%s bInSuspend = %d\n", _func__, pwrpriv->bInSuspend);
return -1;
}
@ -1067,13 +1067,13 @@ static int rtw_resume(struct usb_interface *pusb_intf)
padapter = dvobj_get_primary_adapter(dvobj);
pmlmeext = &padapter->mlmeextpriv;
RTW_INFO("==> %s (%s:%d)\n", __FUNCTION__, current->comm, current->pid);
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
pdbgpriv->dbg_resume_cnt++;
#ifdef CONFIG_AUTOSUSPEND
if (pwrpriv->bInternalAutoSuspend)
ret = rtw_resume_process(padapter);
else
else
#endif
{
if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode) {
@ -1097,7 +1097,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
}
pmlmeext->last_scan_time = rtw_get_current_time();
RTW_INFO("<======== %s return %d\n", __FUNCTION__, ret);
RTW_INFO("<======== %s return %d\n", __func__, ret);
return ret;
}
@ -1327,9 +1327,9 @@ _adapter *rtw_usb_primary_adapter_init(struct dvobj_priv *dvobj,
/* usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf ); */ /* init pm_usage_cnt ,let it start from 1 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32))
RTW_INFO("%s...pm_usage_cnt(%d).....\n", __FUNCTION__, atomic_read(&(dvobj->pusbintf->pm_usage_cnt)));
RTW_INFO("%s...pm_usage_cnt(%d).....\n", __func__, atomic_read(&(dvobj->pusbintf->pm_usage_cnt)));
#else
RTW_INFO("%s...pm_usage_cnt(%d).....\n", __FUNCTION__, dvobj->pusbintf->pm_usage_cnt);
RTW_INFO("%s...pm_usage_cnt(%d).....\n", __func__, dvobj->pusbintf->pm_usage_cnt);
#endif
}
}
@ -1614,7 +1614,7 @@ static int __init rtw_drv_entry(void)
#endif /* BTCOEXVERSION */
if (ret != 0) {
RTW_INFO("%s: power on failed!!(%d)\n", __FUNCTION__, ret);
RTW_INFO("%s: power on failed!!(%d)\n", __func__, ret);
ret = -1;
goto exit;
}