Merge pull request #52 from evilphish/v5.1.5

* Added support for network namespaces
* More adapters supported
* Removed deadline Intel WIDI code
* Added RPI support (Makefile)
* Makefile Optimization
* Enabled more debug
* Enabled 80211w support (Security)
This commit is contained in:
Christian B 2017-11-18 13:17:26 +01:00 committed by GitHub
commit 866b187311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 139 additions and 489 deletions

View File

@ -4,3 +4,8 @@ config RTL8812AU
---help---
Help message of RTL8812AU
config RTL8814AU
tristate "Realtek 8814A USB WiFi"
depends on USB
---help---
Help message of RTL8814AU

View File

@ -14,9 +14,13 @@ EXTRA_CFLAGS += -Wno-unused-parameter
EXTRA_CFLAGS += -Wno-unused-function
EXTRA_CFLAGS += -Wno-unused
EXTRA_CFLAGS += -Wno-date-time
EXTRA_CFLAGS += -Wno-misleading-indentation
EXTRA_CFLAGS += -Wno-uninitialized
EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
#EXTRA_CFLAGS += -Wno-misleading-indentation
#EXTRA_CFLAGS += -Wno-uninitialized
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
ifeq ($(GCC_VER_49),1)
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif
EXTRA_CFLAGS += -I$(src)/include
EXTRA_CFLAGS += -I$(src)/hal/phydm
@ -44,13 +48,13 @@ CONFIG_PCI_HCI = n
CONFIG_SDIO_HCI = n
CONFIG_GSPI_HCI = n
########################## Features ###########################
CONFIG_NET_NS = y
CONFIG_MP_INCLUDED = y
CONFIG_POWER_SAVING = n
CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n
CONFIG_WIFI_TEST = n
CONFIG_BT_COEXIST = n
CONFIG_INTEL_WIDI = n
CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = y
CONFIG_EXT_CLK = n
@ -61,7 +65,7 @@ CONFIG_CALIBRATE_TX_POWER_TO_MAX = y
CONFIG_RTW_ADAPTIVITY_EN = disable
CONFIG_RTW_ADAPTIVITY_MODE = normal
CONFIG_SIGNAL_SCALE_MAPPING = n
CONFIG_80211W = n
CONFIG_80211W = y
CONFIG_REDUCE_TX_CPU_LOADING = n
CONFIG_BR_EXT = y
CONFIG_TDLS = n
@ -133,6 +137,7 @@ CONFIG_PLATFORM_ARM_RTD299X = n
CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n
CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n
CONFIG_PLATFORM_ARM_WMT = n
CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_TI_DM365 = n
CONFIG_PLATFORM_MOZART = n
CONFIG_PLATFORM_RTK119X = n
@ -886,10 +891,6 @@ ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif
ifeq ($(CONFIG_INTEL_WIDI), y)
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
endif
ifeq ($(CONFIG_WAPI_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
endif
@ -1716,6 +1717,15 @@ MODULE_NAME := 8192eu
endif
ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE :=
KVER ?= $(shell uname -r)
KSRC ?= /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
endif
ifeq ($(CONFIG_PLATFORM_RTK129X), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DRTK_129X_PLATFORM
@ -1841,7 +1851,6 @@ endif
$(MODULE_NAME)-y += $(rtk_core)
$(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
$(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
core/rtw_wapi_sms4.o
@ -1866,7 +1875,7 @@ export CONFIG_RTL8812AU = m
all: modules
modules:
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
$(MAKE) -j $(shell nproc || echo 1) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
strip:
$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded

View File

@ -336,7 +336,6 @@ u16 rtw_get_efuse_mask_arraylen(PADAPTER pAdapter)
return 0;
}
#ifdef RTW_HALMAC
#include "../../hal/hal_halmac.h"
@ -386,7 +385,6 @@ void EFUSE_GetEfuseDefinition(PADAPTER adapter, u8 efusetype, u8 type, void *out
struct dvobj_priv *d;
u32 v32 = 0;
d = adapter_to_dvobj(adapter);
if (adapter->HalFunc.EFUSEGetEfuseDefinition) {
@ -414,7 +412,6 @@ u8 rtw_efuse_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
u32 size, i;
int err;
d = adapter_to_dvobj(adapter);
err = rtw_halmac_get_physical_efuse_size(d, &size);
if (err)
@ -715,7 +712,6 @@ VOID hal_ReadEFuse_BT_logic_map(
u16 i, total, used;
u8 efuse_usage;
/* */
/* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */
/* */
@ -830,7 +826,6 @@ exit:
rtw_mfree(efuseTbl, EFUSE_BT_MAP_LEN);
}
static u8 hal_EfusePartialWriteCheck(
PADAPTER padapter,
u8 efuseType,
@ -873,7 +868,6 @@ static u8 hal_EfusePartialWriteCheck(
return bRet;
}
static u8 hal_EfusePgPacketWrite2ByteHeader(
PADAPTER padapter,
u8 efuseType,
@ -940,7 +934,6 @@ static u8 hal_EfusePgPacketWrite2ByteHeader(
return _TRUE;
}
static u8 hal_EfusePgPacketWrite1ByteHeader(
PADAPTER pAdapter,
u8 efuseType,
@ -953,7 +946,6 @@ static u8 hal_EfusePgPacketWrite1ByteHeader(
u16 efuse_addr = *pAddr;
u8 repeatcnt = 0;
/* RTW_INFO("%s\n", __FUNCTION__); */
pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
@ -996,7 +988,6 @@ static u8 hal_EfusePgPacketWriteHeader(
return bRet;
}
static u8
Hal_EfuseWordEnableDataWrite(
PADAPTER padapter,
@ -1010,7 +1001,6 @@ Hal_EfuseWordEnableDataWrite(
u8 badworden = 0x0F;
u8 tmpdata[PGPKT_DATA_SIZE];
/* RTW_INFO("%s: efuse_addr=%#x word_en=%#x\n", __FUNCTION__, efuse_addr, word_en); */
_rtw_memset(tmpdata, 0xFF, PGPKT_DATA_SIZE);
@ -1116,7 +1106,6 @@ u8 EfusePgPacketWrite_BT(
return _TRUE;
}
#else /* !RTW_HALMAC */
/* ------------------------------------------------------------------------------ */
#define REG_EFUSE_CTRL 0x0030
@ -1469,7 +1458,6 @@ EFUSE_Write1Byte(
}
} /* EFUSE_Write1Byte */
/* 11/16/2008 MH Read one byte from real Efuse. */
u8
efuse_OneByteRead(
@ -1555,7 +1543,6 @@ efuse_OneByteWrite(
/* -----------------e-fuse reg ctrl --------------------------------- */
/* address */
efuseValue = rtw_read32(pAdapter, EFUSE_CTRL);
efuseValue |= (BIT21 | BIT31);
efuseValue &= ~(0x3FFFF);
@ -1627,7 +1614,6 @@ Efuse_PgPacketWrite(IN PADAPTER pAdapter,
return ret;
}
int
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
IN u8 offset,
@ -1642,7 +1628,6 @@ Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
return ret;
}
u8
Efuse_WordEnableDataWrite(IN PADAPTER pAdapter,
IN u16 efuse_addr,
@ -2087,7 +2072,6 @@ efuse_ShadowRead4Byte(
} /* efuse_ShadowRead4Byte */
/*-----------------------------------------------------------------------------
* Function: efuse_ShadowWrite1Byte
* efuse_ShadowWrite2Byte
@ -2135,7 +2119,6 @@ efuse_ShadowWrite2Byte(
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
pHalData->efuse_eeprom_data[Offset] = Value & 0x00FF;
pHalData->efuse_eeprom_data[Offset + 1] = Value >> 8;
@ -2157,7 +2140,6 @@ efuse_ShadowWrite4Byte(
} /* efuse_ShadowWrite1Byte */
/*-----------------------------------------------------------------------------
* Function: EFUSE_ShadowRead
*
@ -2225,7 +2207,6 @@ EFUSE_ShadowWrite(
if (pAdapter->registrypriv.mp_mode == 0)
return;
if (Type == 1)
efuse_ShadowWrite1Byte(pAdapter, Offset, (u8)Value);
else if (Type == 2)
@ -2344,7 +2325,6 @@ void EFUSE_ShadowMapUpdate(
u8 *efuse_map = NULL;
int err;
mapLen = EEPROM_MAX_SIZE;
efuse_map = pHalData->efuse_eeprom_data;
/* efuse default content is 0xFF */

View File

@ -4108,11 +4108,6 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf)
case CHECK_HIQ_WK_CID:
rtw_chk_hi_queue_hdl(padapter);
break;
#endif
#ifdef CONFIG_INTEL_WIDI
case INTEl_WIDI_WK_CID:
intel_widi_wk_hdl(padapter, pdrvextra_cmd->type, pdrvextra_cmd->pbuf);
break;
#endif
/* add for CONFIG_IEEE80211W, none 11w can use it */
case RESET_SECURITYPRIV:

View File

@ -1279,13 +1279,6 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
|| _SUCCESS != rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)
) {
rtw_set_to_roam(adapter, 0);
#ifdef CONFIG_INTEL_WIDI
if (adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING) {
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL, 0);
RTW_INFO("change to widi listen\n");
}
#endif /* CONFIG_INTEL_WIDI */
rtw_free_assoc_resources(adapter, 1);
rtw_indicate_disconnect(adapter, 0, _FALSE);
} else
@ -1515,20 +1508,12 @@ void rtw_indicate_connect(_adapter *padapter)
}
rtw_set_to_roam(padapter, 0);
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING) {
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_WK, NULL, 0);
RTW_INFO("change to widi listen\n");
}
#endif /* CONFIG_INTEL_WIDI */
if (!check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))
rtw_mi_set_scan_deny(padapter, 3000);
}
/*
*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
*/
@ -2442,10 +2427,6 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf)
roam = _TRUE;
roam_target = pmlmepriv->roam_network;
}
#ifdef CONFIG_INTEL_WIDI
else if (adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_CONNECTED)
roam = _TRUE;
#endif /* CONFIG_INTEL_WIDI */
if (roam == _TRUE) {
if (rtw_to_roam(adapter) > 0)
@ -2471,10 +2452,6 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf)
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
rtw_indicate_disconnect(adapter, *(u16 *)pstadel->rsvd, pstadel->locally_generated);
#ifdef CONFIG_INTEL_WIDI
if (!rtw_to_roam(adapter))
process_intel_widi_disconnect(adapter, 1);
#endif /* CONFIG_INTEL_WIDI */
_rtw_roaming(adapter, roam_target);
}
@ -2593,13 +2570,6 @@ void _rtw_join_timeout_handler(_adapter *adapter)
}
break;
} else {
#ifdef CONFIG_INTEL_WIDI
if (adapter->mlmepriv.widi_state == INTEL_WIDI_STATE_ROAMING) {
_rtw_memset(pmlmepriv->sa_ext, 0x00, L2SDTA_SERVICE_VE_LEN);
intel_widi_wk_cmd(adapter, INTEL_WIDI_LISTEN_WK, NULL, 0);
RTW_INFO("change to widi listen\n");
}
#endif /* CONFIG_INTEL_WIDI */
RTW_INFO("%s We've try roaming but fail\n", __FUNCTION__);
rtw_indicate_disconnect(adapter, 0, _FALSE);
break;

View File

@ -5645,9 +5645,6 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da)
#ifdef CONFIG_WFD
u32 wfdielen = 0;
#endif
#ifdef CONFIG_INTEL_WIDI
u8 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 };
#endif /* CONFIG_INTEL_WIDI */
/* RTW_INFO("%s\n", __FUNCTION__); */
@ -5749,39 +5746,6 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da)
/* Value: */
wpsie[wpsielen++] = WPS_VERSION_1; /* Version 1.0 */
#ifdef CONFIG_INTEL_WIDI
/* Commented by Kurt */
/* Appended WiDi info. only if we did issued_probereq_widi(), and then we saved ven. ext. in pmlmepriv->sa_ext. */
if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE
|| pmlmepriv->num_p2p_sdt != 0) {
/* Sec dev type */
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_SEC_DEV_TYPE_LIST);
wpsielen += 2;
/* Length: */
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(0x0008);
wpsielen += 2;
/* Value: */
/* Category ID */
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_PDT_CID_DISPLAYS);
wpsielen += 2;
/* OUI */
*(u32 *)(wpsie + wpsielen) = cpu_to_be32(INTEL_DEV_TYPE_OUI);
wpsielen += 4;
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_PDT_SCID_WIDI_CONSUMER_SINK);
wpsielen += 2;
if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE) {
/* Vendor Extension */
_rtw_memcpy(wpsie + wpsielen, pmlmepriv->sa_ext, L2SDTA_SERVICE_VE_LEN);
wpsielen += L2SDTA_SERVICE_VE_LEN;
}
}
#endif /* CONFIG_INTEL_WIDI */
/* WiFi Simple Config State */
/* Type: */
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_ATTR_SIMPLE_CONF_STATE);
@ -6406,13 +6370,6 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
result = process_p2p_group_negotation_req(pwdinfo, frame_body, len);
issue_p2p_GO_response(padapter, GetAddr2Ptr(pframe), frame_body, len, result);
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_LISTEN) {
padapter->mlmepriv.widi_state = INTEL_WIDI_STATE_WFD_CONNECTION;
_cancel_timer_ex(&(padapter->mlmepriv.listen_timer));
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_STOP_WK, NULL, 0);
}
#endif /* CONFIG_INTEL_WIDI */
/* Commented by Albert 20110718 */
/* No matter negotiating or negotiation failure, the driver should set up the restore P2P state timer. */
@ -6564,11 +6521,6 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
}
} else {
rtw_p2p_set_state(pwdinfo, P2P_STATE_RECV_INVITE_REQ_DISMATCH);
#ifdef CONFIG_INTEL_WIDI
_rtw_memcpy(pwdinfo->p2p_peer_device_addr, group_id.go_device_addr , ETH_ALEN);
rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT);
#endif /* CONFIG_INTEL_WIDI */
status_code = P2P_STATUS_FAIL_UNKNOWN_P2PGROUP;
}
}
@ -6614,13 +6566,6 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
issue_p2p_invitation_response(padapter, GetAddr2Ptr(pframe), pwdinfo->inviteresp_info.token, status_code);
_set_timer(&pwdinfo->restore_p2p_state_timer, 3000);
}
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_LISTEN) {
padapter->mlmepriv.widi_state = INTEL_WIDI_STATE_WFD_CONNECTION;
_cancel_timer_ex(&(padapter->mlmepriv.listen_timer));
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_STOP_WK, NULL, 0);
}
#endif /* CONFIG_INTEL_WIDI */
break;
}
case P2P_INVIT_RESP: {
@ -6685,13 +6630,6 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
rtw_p2p_set_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ);
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.widi_state == INTEL_WIDI_STATE_LISTEN) {
padapter->mlmepriv.widi_state = INTEL_WIDI_STATE_WFD_CONNECTION;
_cancel_timer_ex(&(padapter->mlmepriv.listen_timer));
intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_STOP_WK, NULL, 0);
}
#endif /* CONFIG_INTEL_WIDI */
break;
case P2P_PROVISION_DISC_RESP:
@ -10500,12 +10438,6 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI
}
#ifdef CONFIG_INTEL_WIDI
/* process_intel_widi_query_or_tigger(padapter, bssid); */
if (process_intel_widi_query_or_tigger(padapter, bssid))
return _FAIL;
#endif /* CONFIG_INTEL_WIDI */
#if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) & 1
if (strcmp(bssid->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) {
RTW_INFO("Receiving %s("MAC_FMT", DSConfig:%u) from ch%u with ss:%3u, sq:%3u, RawRSSI:%3ld\n"

View File

@ -1867,16 +1867,6 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
{
u8 p2pie[MAX_P2P_IE_LEN] = { 0x00 };
u32 len = 0, p2pielen = 0;
#ifdef CONFIG_INTEL_WIDI
struct mlme_priv *pmlmepriv = &(pwdinfo->padapter->mlmepriv);
u8 zero_array_check[L2SDTA_SERVICE_VE_LEN] = { 0x00 };
u8 widi_version = 0, i = 0;
if (_rtw_memcmp(pmlmepriv->sa_ext, zero_array_check, L2SDTA_SERVICE_VE_LEN) == _FALSE)
widi_version = 35;
else if (pmlmepriv->num_p2p_sdt != 0)
widi_version = 40;
#endif /* CONFIG_INTEL_WIDI */
/* P2P OUI */
p2pielen = 0;
@ -1959,13 +1949,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
/* 21->P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
/* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */
/* *(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 21 + pwdinfo->device_name_len ); */
#ifdef CONFIG_INTEL_WIDI
if (widi_version == 35)
RTW_PUT_LE16(p2pie + p2pielen, 21 + 8 + pwdinfo->device_name_len);
else if (widi_version == 40)
RTW_PUT_LE16(p2pie + p2pielen, 21 + 8 * pmlmepriv->num_p2p_sdt + pwdinfo->device_name_len);
else
#endif /* CONFIG_INTEL_WIDI */
RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len);
p2pielen += 2;
@ -1980,25 +1964,6 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->supported_wps_cm);
p2pielen += 2;
#ifdef CONFIG_INTEL_WIDI
if (widi_version == 40) {
/* Primary Device Type */
/* Category ID */
/* *(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_CID_MULIT_MEDIA ); */
RTW_PUT_BE16(p2pie + p2pielen, pmlmepriv->p2p_pdt_cid);
p2pielen += 2;
/* OUI */
/* *(u32*) ( p2pie + p2pielen ) = cpu_to_be32( WPSOUI ); */
RTW_PUT_BE32(p2pie + p2pielen, WPSOUI);
p2pielen += 4;
/* Sub Category ID */
/* *(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER ); */
RTW_PUT_BE16(p2pie + p2pielen, pmlmepriv->p2p_pdt_scid);
p2pielen += 2;
} else
#endif /* CONFIG_INTEL_WIDI */
{
/* Primary Device Type */
/* Category ID */
@ -2018,32 +1983,6 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
}
/* Number of Secondary Device Types */
#ifdef CONFIG_INTEL_WIDI
if (widi_version == 35) {
p2pie[p2pielen++] = 0x01;
RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_DISPLAYS);
p2pielen += 2;
RTW_PUT_BE32(p2pie + p2pielen, INTEL_DEV_TYPE_OUI);
p2pielen += 4;
RTW_PUT_BE16(p2pie + p2pielen, P2P_SCID_WIDI_CONSUMER_SINK);
p2pielen += 2;
} else if (widi_version == 40) {
p2pie[p2pielen++] = pmlmepriv->num_p2p_sdt;
for (; i < pmlmepriv->num_p2p_sdt; i++) {
RTW_PUT_BE16(p2pie + p2pielen, pmlmepriv->p2p_sdt_cid[i]);
p2pielen += 2;
RTW_PUT_BE32(p2pie + p2pielen, INTEL_DEV_TYPE_OUI);
p2pielen += 4;
RTW_PUT_BE16(p2pie + p2pielen, pmlmepriv->p2p_sdt_scid[i]);
p2pielen += 2;
}
} else
#endif /* CONFIG_INTEL_WIDI */
p2pie[p2pielen++] = 0x00; /* No Secondary Device Type List */
/* Device Name */
@ -5133,10 +5072,6 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
#endif
} else if (role == P2P_ROLE_DISABLE) {
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.p2p_reject_disable == _TRUE)
return ret;
#endif /* CONFIG_INTEL_WIDI */
#ifdef CONFIG_IOCTL_CFG80211
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211)

View File

@ -3038,11 +3038,6 @@ void update_tx_basic_rate(_adapter *padapter, u8 wirelessmode)
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
return;
#endif /* CONFIG_P2P */
#ifdef CONFIG_INTEL_WIDI
if (padapter->mlmepriv.widi_state != INTEL_WIDI_STATE_NONE)
return;
#endif /* CONFIG_INTEL_WIDI */
_rtw_memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
/* clear B mod if current channel is in 5G band, avoid tx cck rate in 5G band. */

View File

@ -22,7 +22,6 @@
//#include <drv_types.h>
#include <rtl8814a_hal.h>
s32 rtl8814au_init_xmit_priv(_adapter *padapter)
{
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
@ -629,9 +628,10 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
// check pkt amount in one bulk
descCount = 0;
bulkPtr = bulkSize;
if (pbuf < bulkPtr)
if (pbuf < bulkPtr) {
descCount++;
if (descCount == pHalData->UsbTxAggDescNum)
}
if (descCount == pHalData->UsbTxAggDescNum)
goto agg_end;
else {
descCount = 0;
@ -816,12 +816,10 @@ agg_end:
// xmit address == ((xmit_frame*)pxmitbuf->priv_data)->buf_addr
rtw_write_port(padapter, ff_hwaddr, pbuf_tail, (u8*)pxmitbuf);
//3 5. update statisitc
pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE);
pbuf_tail -= (pfirstframe->pkt_offset * PACKET_OFFSET_SZ);
rtw_count_tx_stats(padapter, pfirstframe, pbuf_tail);
rtw_free_xmitframe(pxmitpriv, pfirstframe);
@ -853,7 +851,6 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
}
}
do
{
pxmitframe = rtw_dequeue_xframe(pxmitpriv, phwxmits, hwentry);
@ -876,10 +873,8 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
rtw_os_xmit_complete(padapter, pxmitframe);//always return ndis_packet after rtw_xmitframe_coalesce
}
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("xmitframe_complete(): rtw_dump_xframe\n"));
if(res == _SUCCESS)
{
rtw_dump_xframe(padapter, pxmitframe);
@ -908,8 +903,6 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
}
#endif
static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe)
{
s32 res = _SUCCESS;
@ -1024,7 +1017,6 @@ s32 rtl8814au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmi
}
#ifdef CONFIG_HOSTAPD_MLME
static void rtl8814au_hostap_mgnt_xmit_cb(struct urb *urb)
@ -1054,7 +1046,6 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
//RTW_INFO("%s\n", __FUNCTION__);
skb = pkt;
@ -1110,12 +1101,10 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
//offset 20
//HW append seq
ptxdesc->txdw4 |= cpu_to_le32(BIT(7)); // Hw set sequence number
ptxdesc->txdw3 |= cpu_to_le32((8 <<28)); //set bit3 to 1. Suugested by TimChen. 2009.12.29.
rtl8188eu_cal_txdesc_chksum(ptxdesc);
// ----- end of fill tx desc -----
@ -1126,7 +1115,6 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
//RTW_INFO("mgnt_xmit, len=%x\n", pxmit_skb->len);
// ----- prepare urb for submit -----
//translate DMA FIFO addr to pipehandle
@ -1145,7 +1133,6 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
}
usb_free_urb(urb);
_exit:
rtw_skb_free(skb);
@ -1156,4 +1143,3 @@ _exit:
}
#endif

View File

@ -73,10 +73,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
#include <rtw_vht.h>
#endif
#ifdef CONFIG_INTEL_WIDI
#include <rtw_intel_widi.h>
#endif
#include <rtw_cmd.h>
#include <cmd_osdep.h>
#include <rtw_security.h>

View File

@ -710,33 +710,6 @@ struct mlme_priv {
_workitem Linkup_workitem;
_workitem Linkdown_workitem;
#endif
#ifdef CONFIG_INTEL_WIDI
int widi_state;
int listen_state;
_timer listen_timer;
ATOMIC_T rx_probe_rsp; /* 1:receive probe respone from RDS source. */
u8 *l2sdTaBuffer;
u8 channel_idx;
u8 group_cnt; /* In WiDi 3.5, they specified another scan algo. for WFD/RDS co-existed */
u8 sa_ext[L2SDTA_SERVICE_VE_LEN];
u8 widi_enable;
/**
* For WiDi 4; upper layer would set
* p2p_primary_device_type_category_id
* p2p_primary_device_type_sub_category_id
* p2p_secondary_device_type_category_id
* p2p_secondary_device_type_sub_category_id
*/
u16 p2p_pdt_cid;
u16 p2p_pdt_scid;
u8 num_p2p_sdt;
u16 p2p_sdt_cid[MAX_NUM_P2P_SDT];
u16 p2p_sdt_scid[MAX_NUM_P2P_SDT];
u8 p2p_reject_disable; /* When starting NL80211 wpa_supplicant/hostapd, it will call netdev_close */
/* such that it will cause p2p disabled. Use this flag to reject. */
#endif /* CONFIG_INTEL_WIDI */
u32 lastscantime;
#ifdef CONFIG_CONCURRENT_MODE
u8 scanning_via_buddy_intf;

View File

@ -77,7 +77,6 @@
#endif /* CONFIG_WAPI_SUPPORT */
static const u32 rtw_cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104,
@ -196,7 +195,6 @@ static struct ieee80211_channel rtw_5ghz_a_channels[] = {
CHAN5G(216, 0),
};
void rtw_2g_channels_init(struct ieee80211_channel *channels)
{
_rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels,
@ -471,7 +469,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
}
/* _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); */
channel = pnetwork->network.Configuration.DSConfig;
freq = rtw_ch2freq(channel);
notify_channel = ieee80211_get_channel(wiphy, freq);
@ -524,7 +521,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
_rtw_memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN);
_rtw_memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN);
/* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */
len = sizeof(struct rtw_ieee80211_hdr_3addr);
_rtw_memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength);
@ -754,10 +750,10 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
}
check_bss:
if (!rtw_cfg80211_check_bss(padapter))
if (!rtw_cfg80211_check_bss(padapter)){
RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
if (rtw_to_roam(padapter) > 0) {
}else if (rtw_to_roam(padapter) > 0) {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
struct wiphy *wiphy = pwdev->wiphy;
struct ieee80211_channel *notify_channel;
@ -894,7 +890,6 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
}
}
#ifdef CONFIG_AP_MODE
static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
{
@ -6497,6 +6492,10 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
#endif
#if defined(CONFIG_NET_NS)
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
#endif //CONFIG_NET_NS
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
#if defined(CONFIG_NET_NS)
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
@ -6597,6 +6596,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
.set_channel = cfg80211_rtw_set_channel,
#endif
/* .auth = cfg80211_rtw_auth, */
/* .assoc = cfg80211_rtw_assoc, */
#endif /* CONFIG_AP_MODE */

View File

@ -4285,10 +4285,6 @@ static int rtw_wps_start(struct net_device *dev,
else if (u32wps_start == 3) /* WPS Stop because of wps fail */
rtw_led_control(padapter, LED_CTL_STOP_WPS_FAIL);
#ifdef CONFIG_INTEL_WIDI
process_intel_widi_wps_status(padapter, u32wps_start);
#endif /* CONFIG_INTEL_WIDI */
exit:
return ret;
@ -5184,13 +5180,6 @@ static int rtw_p2p_connect(struct net_device *dev,
return ret;
}
#ifdef CONFIG_INTEL_WIDI
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
RTW_INFO("[%s] WiFi is under survey!\n", __FUNCTION__);
return ret;
}
#endif /* CONFIG_INTEL_WIDI */
if (pwdinfo->ui_got_wps_info == P2P_NO_WPSINFO)
return -1;
@ -5273,19 +5262,6 @@ static int rtw_p2p_connect(struct net_device *dev,
} else {
RTW_INFO("[%s] Not Found in Scanning Queue~\n", __FUNCTION__);
#ifdef CONFIG_INTEL_WIDI
_cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
rtw_free_network_queue(padapter, _TRUE);
/**
* For WiDi, if we can't find candidate device in scanning queue,
* driver will do scanning itself
*/
_enter_critical_bh(&pmlmepriv->lock, &irqL);
rtw_sitesurvey_cmd(padapter, NULL, 0, NULL, 0);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
#endif /* CONFIG_INTEL_WIDI */
ret = -1;
}
exit:
@ -5854,13 +5830,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
RTW_INFO("[%s] WiFi Direct is disable!\n", __FUNCTION__);
return ret;
} else {
#ifdef CONFIG_INTEL_WIDI
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) {
RTW_INFO("[%s] WiFi is under survey!\n", __FUNCTION__);
return ret;
}
#endif /* CONFIG_INTEL_WIDI */
/* Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request. */
_rtw_memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
_rtw_memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
@ -5930,18 +5899,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
}
#ifdef CONFIG_INTEL_WIDI
/* Some Intel WiDi source may not provide P2P IE, */
/* so we could only compare mac addr by 802.11 Source Address */
if (pmlmepriv->widi_state == INTEL_WIDI_STATE_WFD_CONNECTION
&& uintPeerChannel == 0) {
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
break;
}
}
#endif /* CONFIG_INTEL_WIDI */
plist = get_next(plist);
}
@ -6031,15 +5988,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
} else {
RTW_INFO("[%s] NOT Found in the Scanning Queue!\n", __FUNCTION__);
#ifdef CONFIG_INTEL_WIDI
_cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
rtw_free_network_queue(padapter, _TRUE);
_enter_critical_bh(&pmlmepriv->lock, &irqL);
rtw_sitesurvey_cmd(padapter, NULL, 0, NULL, 0);
_exit_critical_bh(&pmlmepriv->lock, &irqL);
#endif /* CONFIG_INTEL_WIDI */
}
exit:
@ -11527,46 +11475,6 @@ static int rtw_tdls_get(struct net_device *dev,
return ret;
}
#ifdef CONFIG_INTEL_WIDI
static int rtw_widi_set(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
int ret = 0;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
process_intel_widi_cmd(padapter, extra);
return ret;
}
static int rtw_widi_set_probe_request(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
int ret = 0;
u8 *pbuf = NULL;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
pbuf = rtw_malloc(sizeof(l2_msg_t));
if (pbuf) {
if (copy_from_user(pbuf, wrqu->data.pointer, wrqu->data.length))
ret = -EFAULT;
/* _rtw_memcpy(pbuf, wrqu->data.pointer, wrqu->data.length); */
if (wrqu->data.flags == 0)
intel_widi_wk_cmd(padapter, INTEL_WIDI_ISSUE_PROB_WK, pbuf, sizeof(l2_msg_t));
else if (wrqu->data.flags == 1)
rtw_set_wfd_rds_sink_info(padapter, (l2_msg_t *)pbuf);
}
return ret;
}
#endif /* CONFIG_INTEL_WIDI */
#ifdef CONFIG_MAC_LOOPBACK_DRIVER
#if defined(CONFIG_RTL8188E)
@ -12411,18 +12319,6 @@ static const struct iw_priv_args rtw_private_args[] = {
SIOCIWFIRSTPRIV + 0x1D,
IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test"
},
#ifdef CONFIG_INTEL_WIDI
{
SIOCIWFIRSTPRIV + 0x1E,
IW_PRIV_TYPE_CHAR | 1024, 0, "widi_set"
},
{
SIOCIWFIRSTPRIV + 0x1F,
IW_PRIV_TYPE_CHAR | 128, 0, "widi_prob_req"
},
#endif /* CONFIG_INTEL_WIDI */
{ SIOCIWFIRSTPRIV + 0x0E, IW_PRIV_TYPE_CHAR | 1024, 0 , ""}, /* set */
{ SIOCIWFIRSTPRIV + 0x0F, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , ""},/* get
* --- sub-ioctls definitions --- */
@ -12547,10 +12443,6 @@ static iw_handler rtw_private_handler[] = {
#endif
NULL, /* 0x1C is reserved for hostapd */
rtw_test, /* 0x1D */
#ifdef CONFIG_INTEL_WIDI
rtw_widi_set, /* 0x1E */
rtw_widi_set_probe_request, /* 0x1F */
#endif /* CONFIG_INTEL_WIDI */
};
#if WIRELESS_EXT >= 17

View File

@ -826,9 +826,6 @@ uint loadparam(_adapter *padapter)
#ifdef CONFIG_LAYER2_ROAMING
registry_par->max_roaming_times = (u8)rtw_max_roaming_times;
#ifdef CONFIG_INTEL_WIDI
registry_par->max_roaming_times = (u8)rtw_max_roaming_times + 2;
#endif /* CONFIG_INTEL_WIDI */
#endif
#ifdef CONFIG_IOL
@ -1948,14 +1945,6 @@ u8 rtw_init_drv_sw(_adapter *padapter)
rtw_hal_sreset_init(padapter);
#endif
#ifdef CONFIG_INTEL_WIDI
if (rtw_init_intel_widi(padapter) == _FAIL) {
RTW_INFO("Can't rtw_init_intel_widi\n");
ret8 = _FAIL;
goto exit;
}
#endif /* CONFIG_INTEL_WIDI */
#ifdef CONFIG_WAPI_SUPPORT
padapter->WapiSupport = true; /* set true temp, will revise according to Efuse or Registry value later. */
rtw_wapi_init(padapter);
@ -2055,10 +2044,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
_rtw_spinlock_free(&padapter->br_ext_lock);
#endif /* CONFIG_BR_EXT */
#ifdef CONFIG_INTEL_WIDI
rtw_free_intel_widi(padapter);
#endif /* CONFIG_INTEL_WIDI */
free_mlme_ext_priv(&padapter->mlmeextpriv);
#ifdef CONFIG_TDLS

View File

@ -183,8 +183,6 @@ static void find_ns(struct ieee80211_radiotap_iterator *iterator,
}
}
/**
* ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
* @iterator: radiotap_iterator to move to next arg (if any)
@ -366,4 +364,3 @@ int rtw_ieee80211_radiotap_iterator_next(
return 0;
}
}

View File

@ -202,6 +202,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(0x2019, 0xAB32), .driver_info = RTL8821}, /* Planex - GW-450S */
{USB_DEVICE(0x0846, 0x9052), .driver_info = RTL8821}, /* Netgear - A6100 */
{USB_DEVICE(0x0411, 0x029B), .driver_info = RTL8821}, /* Buffalo - WI-U2-433DHP */
{USB_DEVICE(0x056E, 0x4007), .driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */
#endif
#ifdef CONFIG_RTL8192E
@ -230,6 +231,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(0x056E, 0x400D), .driver_info = RTL8814A}, /* ELECOM - ELECOM */
{USB_DEVICE(0x7392, 0xA834), .driver_info = RTL8814A}, /* Edimax - Edimax */
{USB_DEVICE(0x7392, 0xA833), .driver_info = RTL8814A}, /* Edimax - AC1750 */
{USB_DEVICE(0x0BDA, 0x8813), .driver_info = RTL8814A}, /* Edimax - EDUP Adapters */
{USB_DEVICE(0x2357, 0x0106), .driver_info = RTL8814A}, /* TP-LINK Archer T9UH */
{USB_DEVICE(0x20F4, 0x809A), .driver_info = RTL8814A}, /* TRENDnet - TRENDnet */
{USB_DEVICE(0x20F4, 0x809B), .driver_info = RTL8814A}, /* TRENDnet TEW-809UB */

View File

@ -1919,12 +1919,10 @@ static int readFile(struct file *fp, char *buf, int len)
return -EPERM;
while (sum < len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
#else
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
#endif
#else
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
#endif