Merge pull request #373 from ThijsWithaar/v5.6.4

Merging Rpi3-related changes from v.5.3.4
This commit is contained in:
Christian Bremvåg 2019-06-15 19:10:24 +02:00 committed by GitHub
commit 02dee251ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 50 additions and 491 deletions

View File

@ -74,6 +74,11 @@ CONFIG_REDUCE_TX_CPU_LOADING = n
CONFIG_BR_EXT = y
CONFIG_TDLS = n
CONFIG_WIFI_MONITOR = y
# If you are setting up AP (e.g. by hostapd) in 802.11ac mode, you may have to choose 'y' below.
# Otherwise some channels may be flagged 'NO-IR' (i.e. Passive scanning) by the driver.
# Please check your country's regulatory domain first,
# to see whether active scanning is permitted by law/regulations on the desired channels.
CONFIG_DISABLE_REGD_C=y
CONFIG_MCC_MODE = n
CONFIG_APPEND_VENDOR_IE_ENABLE = n
CONFIG_RTW_NAPI = y
@ -158,6 +163,7 @@ CONFIG_PLATFORM_ARM_LGE = 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_ARM64_RPI = n
CONFIG_PLATFORM_TI_DM365 = n
CONFIG_PLATFORM_MOZART = n
@ -181,6 +187,10 @@ CONFIG_DRVEXT_MODULE = n
export TopDIR ?= $(shell pwd)
########### COMMON #################################
ifeq ($(CONFIG_DISABLE_REGD_C), y)
EXTRA_CFLAGS += -DCONFIG_DISABLE_REGD_C
endif
ifeq ($(CONFIG_GSPI_HCI), y)
HCI_NAME = gspi
endif
@ -488,7 +498,7 @@ endif
EXTRA_CFLAGS += -DCONFIG_RTL8821A
_HAL_INTFS_FILES += hal/rtl8812a/hal8821a_fw.o
endif
ifeq ($(CONFIG_BT_COEXIST), y)
@ -564,10 +574,6 @@ endif
########### HAL_RTL8814A #################################
ifeq ($(CONFIG_RTL8814A), y)
## ADD NEW VHT MP HW TX MODE ##
#EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE
#CONFIG_MP_VHT_HW_TX_MODE = y
##########################################
RTL871X = rtl8814a
ifeq ($(CONFIG_USB_HCI), y)
MODULE_NAME = 8814au
@ -942,7 +948,7 @@ _HAL_INTFS_FILES += \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \
hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o
ifeq ($(CONFIG_PCI_HCI), y)
_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o
else
@ -1248,6 +1254,10 @@ EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
## For I386 X86 ToolChain use Hardware FLOATING
EXTRA_CFLAGS += -mhard-float
EXTRA_CFLAGS += -DMARK_KERNEL_PFU
else ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
## For Rpi3: use hardware floating, but not on the api
EXTRA_CFLAGS += -mfloat-abi=softfp
else
## For ARM ToolChain use Hardware FLOATING
EXTRA_CFLAGS += -mfloat-abi=hard
@ -1983,6 +1993,17 @@ KSRC := /home/android_sdk/WonderMedia/wm8880-android4.4/kernel4.4/
MODULE_NAME :=8189es_kk
endif
ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH ?= arm
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT
@ -2120,7 +2141,7 @@ ARCH := arm
CROSS_COMPILE := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
KSRC := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/kernel
MODULE_NAME := wlan
endif
endif
ifeq ($(CONFIG_PLATFORM_RTL8197D), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTL8197D
@ -2272,7 +2293,7 @@ rtk_core := core/rtw_cmd.o \
core/rtw_odm.o \
core/rtw_rm.o \
core/rtw_rm_fsm.o \
core/efuse/rtw_efuse.o
core/efuse/rtw_efuse.o
ifeq ($(CONFIG_SDIO_HCI), y)
rtk_core += core/rtw_sdio.o

View File

@ -19,6 +19,10 @@
#include <rtw_mp_ioctl.h>
#include "../../hal/phydm/phydm_precomp.h"
ifdef MARK_KERNEL_PFU
#include <linux/kernel.h>
#include <asm/fpu/api.h>
#endif
#if defined(CONFIG_RTL8723B)
#include <rtw_bt_mp.h>
@ -1718,6 +1722,10 @@ int rtw_mp_tx(struct net_device *dev,
PMAC_Get_Pkt_Param(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo);
#ifdef MARK_KERNEL_PFU
kernel_fpu_begin();
#endif
if (MPT_IS_CCK_RATE(pMptCtx->PMacTxInfo.TX_RATE))
CCK_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo);
@ -1726,6 +1734,11 @@ int rtw_mp_tx(struct net_device *dev,
/* 24 BIT*/
L_SIG_generator(pMptCtx->PMacPktInfo.N_sym, &pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo);
}
#ifdef MARK_KERNEL_PFU
kernel_fpu_end();
#endif
/* 48BIT*/
if (MPT_IS_HT_RATE(pMptCtx->PMacTxInfo.TX_RATE))
HT_SIG_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo);

View File

@ -44,7 +44,7 @@ static struct country_code_to_enum_rd allCountries[] = {
/* 2G chan 12 - chan 13, PASSIV SCAN */
#define RTW_2GHZ_CH12_13 \
REG_RULE(2467-10, 2472+10, 40, 0, 20, \
NL80211_RRF_PASSIVE_SCAN)
0)
/* 2G chan 14, PASSIVS SCAN, NO OFDM (B only) */
#define RTW_2GHZ_CH14 \
@ -69,7 +69,7 @@ static struct country_code_to_enum_rd allCountries[] = {
/* 5G chan 36 - chan 165 */
#define RTW_5GHZ_5150_5850 \
REG_RULE(5150-10, 5850+10, 40, 0, 30, \
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
0)
static const struct ieee80211_regdomain rtw_regdom_rd = {
.n_reg_rules = 3,
@ -81,176 +81,6 @@ static const struct ieee80211_regdomain rtw_regdom_rd = {
}
};
static const struct ieee80211_regdomain rtw_regdom_11 = {
.n_reg_rules = 1,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
}
};
static const struct ieee80211_regdomain rtw_regdom_12_13 = {
.n_reg_rules = 2,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
RTW_2GHZ_CH12_13,
}
};
static const struct ieee80211_regdomain rtw_regdom_no_midband = {
.n_reg_rules = 3,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
RTW_5GHZ_5150_5350,
RTW_5GHZ_5725_5850,
}
};
static const struct ieee80211_regdomain rtw_regdom_60_64 = {
.n_reg_rules = 3,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
RTW_2GHZ_CH12_13,
RTW_5GHZ_5725_5850,
}
};
static const struct ieee80211_regdomain rtw_regdom_14_60_64 = {
.n_reg_rules = 4,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
RTW_2GHZ_CH12_13,
RTW_2GHZ_CH14,
RTW_5GHZ_5725_5850,
}
};
static const struct ieee80211_regdomain rtw_regdom_14 = {
.n_reg_rules = 3,
.alpha2 = "99",
.reg_rules = {
RTW_2GHZ_CH01_11,
RTW_2GHZ_CH12_13,
RTW_2GHZ_CH14,
}
};
#if 0
static struct rtw_regulatory *rtw_regd;
#endif
#if 0 /* not_yet */
static void _rtw_reg_apply_beaconing_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator initiator)
{
enum nl80211_band band;
struct ieee80211_supported_band *sband;
const struct ieee80211_reg_rule *reg_rule;
struct ieee80211_channel *ch;
unsigned int i;
u32 bandwidth = 0;
int r;
for (band = 0; band < NUM_NL80211_BANDS; band++) {
if (!wiphy->bands[band])
continue;
sband = wiphy->bands[band];
for (i = 0; i < sband->n_channels; i++) {
ch = &sband->channels[i];
if (rtw_is_dfs_ch(ch->hw_value) ||
(ch->flags & IEEE80211_CHAN_RADAR))
continue;
if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
r = freq_reg_info(wiphy, ch->center_freq,
bandwidth, &reg_rule);
if (r)
continue;
/*
*If 11d had a rule for this channel ensure
*we enable adhoc/beaconing if it allows us to
*use it. Note that we would have disabled it
*by applying our static world regdomain by
*default during init, prior to calling our
*regulatory_hint().
*/
if (!(reg_rule->flags & NL80211_RRF_NO_IBSS))
ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
if (!
(reg_rule->flags &
NL80211_RRF_PASSIVE_SCAN))
ch->flags &=
~IEEE80211_CHAN_PASSIVE_SCAN;
} else {
if (ch->beacon_found)
ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN);
}
}
}
}
/* Allows active scan scan on Ch 12 and 13 */
static void _rtw_reg_apply_active_scan_flags(struct wiphy *wiphy,
enum nl80211_reg_initiator
initiator)
{
struct ieee80211_supported_band *sband;
struct ieee80211_channel *ch;
const struct ieee80211_reg_rule *reg_rule;
u32 bandwidth = 0;
int r;
if (!wiphy->bands[NL80211_BAND_2GHZ])
return;
sband = wiphy->bands[NL80211_BAND_2GHZ];
/*
* If no country IE has been received always enable active scan
* on these channels. This is only done for specific regulatory SKUs
*/
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
ch = &sband->channels[11]; /* CH 12 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
ch = &sband->channels[12]; /* CH 13 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
return;
}
/*
* If a country IE has been received check its rule for this
* channel first before enabling active scan. The passive scan
* would have been enforced by the initial processing of our
* custom regulatory domain.
*/
ch = &sband->channels[11]; /* CH 12 */
r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
if (!r) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
}
ch = &sband->channels[12]; /* CH 13 */
r = freq_reg_info(wiphy, ch->center_freq, bandwidth, &reg_rule);
if (!r) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
}
}
#endif
void rtw_regd_apply_flags(struct wiphy *wiphy)
{
@ -274,11 +104,15 @@ void rtw_regd_apply_flags(struct wiphy *wiphy)
ch = &sband->channels[j];
if (ch)
#ifndef CONFIG_DISABLE_REGD_C
ch->flags = IEEE80211_CHAN_DISABLED;
#else
ch->flags = 0;
#endif
}
}
}
#ifndef CONFIG_DISABLE_REGD_C
/* channels apply by channel plans. */
for (i = 0; i < max_chan_nums; i++) {
channel = channel_set[i].ChannelNum;
@ -316,21 +150,14 @@ void rtw_regd_apply_flags(struct wiphy *wiphy)
}
#endif /* CONFIG_DFS */
}
#endif
}
static const struct ieee80211_regdomain *_rtw_regdomain_select(struct
rtw_regulatory
*reg)
{
#if 0
switch (reg->country_code) {
case COUNTRY_CODE_USER:
default:
return &rtw_regdom_rd;
}
#else
return &rtw_regdom_rd;
#endif
}
static void rtw_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
@ -402,21 +229,6 @@ static struct country_code_to_enum_rd *_rtw_regd_find_country(u16 countrycode)
int rtw_regd_init(struct wiphy *wiphy)
{
#if 0
if (rtw_regd == NULL) {
rtw_regd = (struct rtw_regulatory *)
rtw_malloc(sizeof(struct rtw_regulatory));
rtw_regd->alpha2[0] = '9';
rtw_regd->alpha2[1] = '9';
rtw_regd->country_code = COUNTRY_CODE_USER;
}
RTW_INFO("%s: Country alpha2 being used: %c%c\n",
__func__, rtw_regd->alpha2[0], rtw_regd->alpha2[1]);
#endif
_rtw_regd_init_wiphy(NULL, wiphy);
return 0;

View File

@ -1,79 +0,0 @@
##### hostapd configuration file ##############################################
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=DIRECT-RT
channel=6
wpa=2
wpa_passphrase=12345678
##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU
# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345
# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=6-0050F204-1
# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300
# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad
##### default configuration #######################################
driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240

View File

@ -1,79 +0,0 @@
##### hostapd configuration file ##############################################
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=rtwap
channel=6
wpa=2
wpa_passphrase=87654321
#bridge=br0
##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU
# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345
# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=6-0050F204-1
# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300
# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad
##### default configuration #######################################
driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400

View File

@ -1,78 +0,0 @@
##### hostapd configuration file ##############################################
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=rtwap
channel=36
wpa=2
wpa_passphrase=87654321
#bridge=br0
##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_SOFTAP
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU
# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345
# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=6-0050F204-1
# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300
# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad
##### default configuration #######################################
driver=rtl871xdrv
beacon_int=100
hw_mode=a
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400

View File

@ -1,51 +0,0 @@
ctrl_interface=/var/run/wpa_supplicant
update_config=1
# Wi-Fi Protected Setup (WPS) parameters
# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
device_name=RTL8192CU
# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
manufacturer=Realtek
# Model Name
# Model of the device (up to 32 ASCII characters)
model_name=RTW_STA
# Model Number
# Additional device description (up to 32 ASCII characters)
model_number=WLAN_CU
# Serial Number
# Serial number of the device (up to 32 characters)
serial_number=12345
# Primary Device Type
# Used format: <categ>-<OUI>-<subcateg>
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)
device_type=1-0050F204-1
# OS Version
# 4-octet operating system version number (hex string)
os_version=01020300
# Config Methods
# List of the supported configuration methods
# Available methods: usba ethernet label display ext_nfc_token int_nfc_token
# nfc_interface push_button keypad virtual_display physical_display
# virtual_push_button physical_push_button
# For WSC 1.0:
#config_methods=display push_button keypad
# For WSC 2.0:
config_methods=virtual_display virtual_push_button keypad