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

@ -1,7 +1,7 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
@ -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;
@ -45,22 +44,22 @@ void rtl8814au_free_xmit_priv(_adapter *padapter)
}
static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bagg_pkt)
{
{
int pull=0;
uint qsel;
u8 data_rate,pwr_status,offset;
_adapter *padapter = pxmitframe->padapter;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
u8 *ptxdesc = pmem;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
sint bmcst = IS_MCAST(pattrib->ra);
u16 SWDefineContent = 0x0;
u16 SWDefineContent = 0x0;
u8 DriverFixedRate = 0x0;
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
if (padapter->registrypriv.mp_mode == 0)
{
if((PACKET_OFFSET_SZ != 0) && (!bagg_pkt) &&(rtw_usb_bulk_size_boundary(padapter,TXDESC_SIZE+sz)==_FALSE))
@ -73,20 +72,20 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
_rtw_memset(ptxdesc, 0, TXDESC_SIZE);
//4 offset 0
//SET_TX_DESC_FIRST_SEG_8812(ptxdesc, 1);
SET_TX_DESC_LAST_SEG_8814A(ptxdesc, 1);
//SET_TX_DESC_OWN_8812(ptxdesc, 1);
//RTW_INFO("%s==> pkt_len=%d,bagg_pkt=%02x\n",__FUNCTION__,sz,bagg_pkt);
SET_TX_DESC_PKT_SIZE_8814A(ptxdesc, sz);
offset = TXDESC_SIZE + OFFSET_SZ;
#ifdef CONFIG_TX_EARLY_MODE
if(bagg_pkt){
offset += EARLY_MODE_INFO_SIZE ;//0x28
offset = TXDESC_SIZE + OFFSET_SZ;
#ifdef CONFIG_TX_EARLY_MODE
if(bagg_pkt){
offset += EARLY_MODE_INFO_SIZE ;//0x28
}
#endif
//RTW_INFO("%s==>offset(0x%02x) \n",__FUNCTION__,offset);
@ -100,11 +99,11 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
if (padapter->registrypriv.mp_mode == 0)
{
if((PACKET_OFFSET_SZ != 0) && (!bagg_pkt)){
if((pull) && (pxmitframe->pkt_offset>0)) {
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
if((pull) && (pxmitframe->pkt_offset>0)) {
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
}
}
}
}
#endif
//RTW_INFO("%s, pkt_offset=0x%02x\n",__FUNCTION__,pxmitframe->pkt_offset);
@ -135,7 +134,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
if((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
{
//RTW_INFO("pxmitframe->frame_tag == DATA_FRAMETAG\n");
//RTW_INFO("pxmitframe->frame_tag == DATA_FRAMETAG\n");
rtl8814a_fill_txdesc_sectype(pattrib, ptxdesc);
@ -186,7 +185,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
if (pHalData->fw_ractrl == _FALSE) {
SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
DriverFixedRate = 0x01;
if(pHalData->INIDATA_RATE[pattrib->mac_id] & BIT(7))
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 1);
@ -195,7 +194,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
if (padapter->fix_rate != 0xFF) { // modify data rate by iwpriv
SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
DriverFixedRate = 0x01;
DriverFixedRate = 0x01;
if(padapter->fix_rate & BIT(7))
SET_TX_DESC_DATA_SHORT_8814A(ptxdesc, 1);
@ -206,9 +205,9 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
if (pattrib->ldpc)
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 1);
if (pattrib->stbc)
if (pattrib->stbc)
SET_TX_DESC_DATA_STBC_8814A(ptxdesc, 1);
//work arond before fixing RA
//SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
//SET_TX_DESC_TX_RATE_8814A(ptxdesc, 0x10);
@ -234,7 +233,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
}
else if((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG)
{
//RTW_INFO("pxmitframe->frame_tag == MGNT_FRAMETAG\n");
//RTW_INFO("pxmitframe->frame_tag == MGNT_FRAMETAG\n");
SET_TX_DESC_USE_RATE_8814A(ptxdesc, 1);
DriverFixedRate = 0x01;
@ -251,7 +250,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
}
// VHT NDPA or HT NDPA Packet for Beamformer.
if((pattrib->subtype == WIFI_NDPA) ||
if((pattrib->subtype == WIFI_NDPA) ||
((pattrib->subtype == WIFI_ACTION_NOACK) && (pattrib->order == 1)))
{
SET_TX_DESC_NAV_USE_HDR_8814A(ptxdesc, 1);
@ -266,7 +265,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
//if(pattrib->rts_cca)
//{
// SET_TX_DESC_NDPA_8812(ptxdesc, 2);
//}
//}
//else
{
SET_TX_DESC_NDPA_8814A(ptxdesc, 1);
@ -316,7 +315,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
SET_TX_DESC_SW_DEFINE_8814A(ptxdesc, SWDefineContent);
SET_TX_DESC_GID_8814A(ptxdesc, pattrib->txbf_g_id);
SET_TX_DESC_PAID_8814A(ptxdesc, pattrib->txbf_p_aid);
SET_TX_DESC_PAID_8814A(ptxdesc, pattrib->txbf_p_aid);
/* injected frame */
if(pattrib->inject == 0xa5) {
@ -335,7 +334,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
SET_TX_DESC_TX_RATE_8814A(ptxdesc, MRateToHwRate(pattrib->rate));
if (pattrib->ldpc) {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 1);
} else {
} else {
SET_TX_DESC_DATA_LDPC_8814A(ptxdesc, 0);
}
SET_TX_DESC_DATA_STBC_8814A(ptxdesc, pattrib->stbc & 3);
@ -343,7 +342,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
}
rtl8814a_cal_txdesc_chksum(ptxdesc);
_dbg_dump_tx_info(padapter,pxmitframe->frame_tag,ptxdesc);
_dbg_dump_tx_info(padapter,pxmitframe->frame_tag,ptxdesc);
return pull;
}
@ -438,18 +437,18 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
mem_addr = pxmitframe->buf_addr;
//RTW_INFO("rtw_dump_xframe()\n");
for (t = 0; t < pattrib->nr_frags; t++)
{
if (inner_ret != _SUCCESS && ret == _SUCCESS)
ret = _FAIL;
if (t != (pattrib->nr_frags - 1))
{
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("pattrib->nr_frags=%d\n", pattrib->nr_frags));
sz = pxmitpriv->frag_len;
sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : pattrib->icv_len);
sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : pattrib->icv_len);
}
else //no frag
{
@ -457,12 +456,12 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
}
pull = update_txdesc(pxmitframe, mem_addr, sz, _FALSE);
if(pull)
{
mem_addr += PACKET_OFFSET_SZ; //pull txdesc head
//pxmitbuf ->pbuf = mem_addr;
//pxmitbuf ->pbuf = mem_addr;
pxmitframe->buf_addr = mem_addr;
w_sz = sz + TXDESC_SIZE;
@ -470,7 +469,7 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
else
{
w_sz = sz + TXDESC_SIZE + PACKET_OFFSET_SZ;
}
}
ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
@ -484,19 +483,19 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
rtw_count_tx_stats(padapter, pxmitframe, sz);
//RTW_INFO("rtw_write_port, w_sz=%d\n", w_sz);
//RTW_INFO("rtw_write_port, w_sz=%d, sz=%d, txdesc_sz=%d, tid=%d\n", w_sz, sz, w_sz-sz, pattrib->priority);
//RTW_INFO("rtw_write_port, w_sz=%d, sz=%d, txdesc_sz=%d, tid=%d\n", w_sz, sz, w_sz-sz, pattrib->priority);
mem_addr += w_sz;
mem_addr = (u8 *)RND4(((SIZE_PTR)(mem_addr)));
}
rtw_free_xmitframe(pxmitpriv, pxmitframe);
if (ret != _SUCCESS)
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_UNKNOWN);
return ret;
}
@ -568,7 +567,7 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
//3 1. pick up first frame
do {
rtw_free_xmitframe(pxmitpriv, pxmitframe);
pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
if (pxmitframe == NULL) {
// no more xmit frame, release xmit buffer
@ -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;
@ -678,7 +678,7 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
xmitframe_plist = get_next(xmitframe_phead);
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE)
{
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
@ -686,23 +686,23 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
if(_FAIL == rtw_hal_busagg_qsel_check(padapter,pfirstframe->attrib.qsel,pxmitframe->attrib.qsel))
break;
pxmitframe->agg_num = 0; // not first frame of aggregation
#ifdef CONFIG_TX_EARLY_MODE
pxmitframe->pkt_offset = 1;// not first frame of aggregation,reserve offset for EM Info
#else
pxmitframe->pkt_offset = 0; // not first frame of aggregation, no need to reserve offset
#endif
#endif
len = xmitframe_need_length(pxmitframe) + TXDESC_SIZE +(pxmitframe->pkt_offset*PACKET_OFFSET_SZ);
if (_RND8(pbuf + len) > MAX_XMITBUF_SZ)
//if (_RND8(pbuf + len) > (MAX_XMITBUF_SZ/2))//to do : for TX TP finial tune , Georgia 2012-0323
{
//RTW_INFO("%s....len> MAX_XMITBUF_SZ\n",__FUNCTION__);
pxmitframe->agg_num = 1;
pxmitframe->pkt_offset = 1;
break;
pxmitframe->pkt_offset = 1;
break;
}
rtw_list_delete(&pxmitframe->list);
ptxservq->qcnt--;
@ -731,7 +731,7 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
// pxmitframe->pxmitbuf = pxmitbuf;
pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf;
if (rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe) == _FALSE) {
RTW_INFO("%s coalesce failed \n",__FUNCTION__);
rtw_free_xmitframe(pxmitpriv, pxmitframe);
@ -744,7 +744,7 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
// (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz
update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz,_TRUE);
// don't need xmitframe any more
rtw_free_xmitframe(pxmitpriv, pxmitframe);
@ -754,9 +754,9 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
pfirstframe->agg_num++;
#ifdef CONFIG_TX_EARLY_MODE
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].offset = _RND8(len);
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].pkt_len = pxmitframe->attrib.last_txcmdsz;
#ifdef CONFIG_TX_EARLY_MODE
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].offset = _RND8(len);
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].pkt_len = pxmitframe->attrib.last_txcmdsz;
#endif
if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num)
break;
@ -801,27 +801,25 @@ agg_end:
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz,_TRUE);
#ifdef CONFIG_TX_EARLY_MODE
//prepare EM info for first frame, agg_num value start from 1
pxmitpriv->agg_pkt[0].offset = _RND8(pfirstframe->attrib.last_txcmdsz +TXDESC_SIZE +(pfirstframe->pkt_offset*PACKET_OFFSET_SZ));
pxmitpriv->agg_pkt[0].pkt_len = pfirstframe->attrib.last_txcmdsz;//get from rtw_xmitframe_coalesce
pxmitpriv->agg_pkt[0].pkt_len = pfirstframe->attrib.last_txcmdsz;//get from rtw_xmitframe_coalesce
UpdateEarlyModeInfo8812(pxmitpriv,pxmitbuf );
#endif
//3 4. write xmit buffer to USB FIFO
ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);
//RTW_INFO("%s ===================================== write port,buf_size(%d) \n",__FUNCTION__,pbuf_tail);
// 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);
@ -832,11 +830,11 @@ agg_end:
#else //CONFIG_USB_TX_AGGREGATION
s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
{
{
struct hw_xmit *phwxmits;
sint hwentry;
struct xmit_frame *pxmitframe=NULL;
struct xmit_frame *pxmitframe=NULL;
int res=_SUCCESS, xcnt = 0;
phwxmits = pxmitpriv->hwxmits;
@ -846,70 +844,65 @@ s32 rtl8814au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
if(pxmitbuf==NULL)
{
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if(!pxmitbuf)
{
return _FALSE;
}
}
}
}
do
{
{
pxmitframe = rtw_dequeue_xframe(pxmitpriv, phwxmits, hwentry);
if(pxmitframe)
{
pxmitframe->pxmitbuf = pxmitbuf;
pxmitframe->pxmitbuf = pxmitbuf;
pxmitframe->buf_addr = pxmitbuf->pbuf;
pxmitbuf->priv_data = pxmitframe;
pxmitbuf->priv_data = pxmitframe;
if((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
{
{
if(pxmitframe->attrib.priority<=15)//TID0~15
{
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
}
}
//RTW_INFO("==> pxmitframe->attrib.priority:%d\n",pxmitframe->attrib.priority);
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);
rtw_dump_xframe(padapter, pxmitframe);
}
else
{
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
rtw_free_xmitframe(pxmitpriv, pxmitframe);
rtw_free_xmitframe(pxmitpriv, pxmitframe);
}
xcnt++;
}
else
{
{
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
return _FALSE;
}
break;
}while(0/*xcnt < (NR_XMITFRAME >> 3)*/);
return _TRUE;
}
#endif
static s32 xmitframe_direct(_adapter *padapter, struct xmit_frame *pxmitframe)
{
s32 res = _SUCCESS;
@ -1006,12 +999,12 @@ s32 rtl8814au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmi
{
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
s32 err;
if ((err=rtw_xmitframe_enqueue(padapter, pxmitframe)) != _SUCCESS)
if ((err=rtw_xmitframe_enqueue(padapter, pxmitframe)) != _SUCCESS)
{
rtw_free_xmitframe(pxmitpriv, pxmitframe);
pxmitpriv->tx_drop++;
pxmitpriv->tx_drop++;
}
else
{
@ -1019,46 +1012,44 @@ s32 rtl8814au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmi
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
#endif
}
return err;
}
return err;
}
#ifdef CONFIG_HOSTAPD_MLME
static void rtl8814au_hostap_mgnt_xmit_cb(struct urb *urb)
{
{
#ifdef PLATFORM_LINUX
struct sk_buff *skb = (struct sk_buff *)urb->context;
//RTW_INFO("%s\n", __FUNCTION__);
rtw_skb_free(skb);
#endif
#endif
}
s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
{
#ifdef PLATFORM_LINUX
u16 fc;
int rc, len, pipe;
int rc, len, pipe;
unsigned int bmcst, tid, qsel;
struct sk_buff *skb, *pxmit_skb;
struct urb *urb;
unsigned char *pxmitbuf;
struct tx_desc *ptxdesc;
struct rtw_ieee80211_hdr *tx_hdr;
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
struct net_device *pnetdev = padapter->pnetdev;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
//RTW_INFO("%s\n", __FUNCTION__);
skb = pkt;
len = skb->len;
tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data);
fc = le16_to_cpu(tx_hdr->frame_ctl);
@ -1079,42 +1070,40 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
goto _exit;
}
// ----- fill tx desc -----
ptxdesc = (struct tx_desc *)pxmitbuf;
// ----- fill tx desc -----
ptxdesc = (struct tx_desc *)pxmitbuf;
_rtw_memset(ptxdesc, 0, sizeof(*ptxdesc));
//offset 0
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
//offset 0
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000);//default = 32 bytes for TX Desc
ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
if(bmcst)
if(bmcst)
{
ptxdesc->txdw0 |= cpu_to_le32(BIT(24));
}
}
//offset 4
//offset 4
ptxdesc->txdw1 |= cpu_to_le32(0x00);//MAC_ID
ptxdesc->txdw1 |= cpu_to_le32((0x12<<QSEL_SHT)&0x00001f00);
ptxdesc->txdw1 |= cpu_to_le32((0x06<< 16) & 0x000f0000);//b mode
//offset 8
//offset 8
//offset 12
//offset 12
ptxdesc->txdw3 |= cpu_to_le32((le16_to_cpu(tx_hdr->seq_ctl)<<16)&0xffff0000);
//offset 16
//offset 16
ptxdesc->txdw4 |= cpu_to_le32(BIT(8));//driver uses rate
//offset 20
//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,16 +1115,15 @@ 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
//pipe = ffaddr2pipehdl(pdvobj, MGT_QUEUE_INX);
pipe = usb_sndbulkpipe(pdvobj->pusbdev, pHalData->Queue2EPNum[(u8)MGT_QUEUE_INX]&0x0f);
usb_fill_bulk_urb(urb, pdvobj->pusbdev, pipe,
pxmit_skb->data, pxmit_skb->len, rtl8192cu_hostap_mgnt_xmit_cb, pxmit_skb);
urb->transfer_flags |= URB_ZERO_PACKET;
usb_anchor_urb(urb, &phostapdpriv->anchored);
rc = usb_submit_urb(urb, GFP_ATOMIC);
@ -1145,9 +1133,8 @@ s32 rtl8814au_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
}
usb_free_urb(urb);
_exit:
_exit:
rtw_skb_free(skb);
#endif
@ -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