kernel-module-qualcomm: initial support to compile qca6564 module externally
Add recipe kernel-module-qualcomm to compile kernel module externally with all the patches for kernel 4.1.15. https://jira.digi.com/browse/DEL-2653 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
6809d1f568
commit
bf32fec01e
|
|
@ -0,0 +1,58 @@
|
|||
# Copyright (C) 2016 Digi International.
|
||||
|
||||
SUMMARY = "Qualcomm's wireless driver for qca6564"
|
||||
DESCRIPTION = "qcacld-2.0 module.bbclass mechanism."
|
||||
LICENSE = "ISC"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d"
|
||||
DEPENDS = "virtual/kernel"
|
||||
|
||||
inherit module
|
||||
|
||||
CAF_MIRROR = "git://codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0"
|
||||
PV = "v4.2.74.63"
|
||||
SRCBRANCH = "caf-wlan/QCA6564_LE_1.0.3_LA.4.2.2.3"
|
||||
SRCREV = "38f01638d75bdf3eb83ac428a4b6ec528b26f541"
|
||||
|
||||
SRC_URI = " \
|
||||
${CAF_MIRROR};destsuffix=${PV};branch=${SRCBRANCH} \
|
||||
file://qualcomm-pre-up \
|
||||
file://modprobe-qualcomm.conf \
|
||||
file://0001-qcacld-Fix-compiling-errors-when-BUILD_DEBUG_VERSION.patch \
|
||||
file://0002-Update-cfg80211_vendor_event_alloc-call-for-newer-ke.patch \
|
||||
file://0003-wlan_hdd_main-Update-cfg80211_ap_stopped-to-nl80211_.patch \
|
||||
file://0004-qcacld-2.0-remove-unused-code.patch \
|
||||
file://0005-Including-header-file-for-regulatory_hint_user.patch \
|
||||
file://0006-Updating-calls-to-alloc_netdev_mq.patch \
|
||||
file://0007-wlan_hdd_cfg80211-update-cfg80211_inform_bss-params-.patch \
|
||||
file://0008-wlan_hdd_p2p-Update-call-to-cfg80211_rx_mgmt-for-dif.patch \
|
||||
file://0009-linux_ac-Fix-for-f_dentry.patch \
|
||||
file://0010-native_sdio-src-hif-Do-not-call-to-HIGH-SPEED-functi.patch \
|
||||
file://0011-osdep_adf.h-fix-for-undefined-ath_sysctl_pktlog_size.patch \
|
||||
file://0012-Kbuild-Add-compilation-flag-based-on-kernel-support.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/${PV}"
|
||||
|
||||
EXTRA_OEMAKE += "CONFIG_CLD_HL_SDIO_CORE=y CONFIG_LINUX_QCMBR=y WLAN_OPEN_SOURCE=1"
|
||||
# Explicity state it is not a QC platform, if not the driver will try to remap
|
||||
# memory that is not allowed in ARMv6 (kernel commit
|
||||
# 309caa9cc6ff39d261264ec4ff10e29489afc8f8)
|
||||
EXTRA_OEMAKE += "CONFIG_NON_QC_PLATFORM=y"
|
||||
|
||||
do_compile_prepend() {
|
||||
export BUILD_VER=${PV}
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}/network/if-pre-up.d
|
||||
install -m 0755 ${WORKDIR}/qualcomm-pre-up ${D}${sysconfdir}/network/if-pre-up.d/qualcomm
|
||||
install -d ${D}${sysconfdir}/modprobe.d
|
||||
install -m 0644 ${WORKDIR}/modprobe-qualcomm.conf ${D}${sysconfdir}/modprobe.d/qualcomm.conf
|
||||
}
|
||||
|
||||
FILES_${PN} += " \
|
||||
${sysconfdir}/network/if-pre-up.d/qualcomm \
|
||||
${sysconfdir}/modprobe.d/qualcomm.conf \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ccimx6ul)"
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
From: Yi Chen <yichen@qti.qualcomm.com>
|
||||
Date: Fri, 28 Aug 2015 19:24:45 +0800
|
||||
Subject: [PATCH 01/12] qcacld: Fix compiling errors when BUILD_DEBUG_VERSION
|
||||
:= 0.
|
||||
|
||||
This is a compiling issue when BUILD_DEBUG_VERSION := 0 is set in Kbuild.
|
||||
|
||||
Change-Id: Iaee98eb91d66990dfa4989a7c07cb5592f8a6079
|
||||
CRs-Fixed: 898366
|
||||
(cherry picked from commit d0258ff1dcf19236e4cfa69e45f75b72a1334609)
|
||||
---
|
||||
CORE/UTILS/FWLOG/dbglog_host.c | 4 ++--
|
||||
Kbuild | 8 ++++----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/CORE/UTILS/FWLOG/dbglog_host.c b/CORE/UTILS/FWLOG/dbglog_host.c
|
||||
index 2dfa45983a87..63fc742259fc 100644
|
||||
--- a/CORE/UTILS/FWLOG/dbglog_host.c
|
||||
+++ b/CORE/UTILS/FWLOG/dbglog_host.c
|
||||
@@ -55,8 +55,6 @@
|
||||
#include <a_debug.h>
|
||||
#define FWLOG_DEBUG ATH_DEBUG_MAKE_MODULE_MASK(0)
|
||||
|
||||
-#if defined(DEBUG)
|
||||
-
|
||||
static bool appstarted = FALSE;
|
||||
static bool senddriverstatus = FALSE;
|
||||
static bool kd_nl_init = FALSE;
|
||||
@@ -64,6 +62,8 @@ static int cnss_diag_pid = INVALID_PID;
|
||||
static int get_version = 0;
|
||||
static int gprint_limiter = 0;
|
||||
|
||||
+#if defined(DEBUG)
|
||||
+
|
||||
static ATH_DEBUG_MASK_DESCRIPTION g_fwlogDebugDescription[] = {
|
||||
{FWLOG_DEBUG,"fwlog"},
|
||||
};
|
||||
diff --git a/Kbuild b/Kbuild
|
||||
index 04461cfb7945..b248eee28bf0 100644
|
||||
--- a/Kbuild
|
||||
+++ b/Kbuild
|
||||
@@ -882,7 +882,6 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
|
||||
-DWLAN_PERF \
|
||||
-DPTT_SOCK_SVC_ENABLE \
|
||||
-Wall\
|
||||
- -Werror\
|
||||
-D__linux__ \
|
||||
-DHAL_SELF_STA_PER_BSS=1 \
|
||||
-DWLAN_FEATURE_VOWIFI_11R \
|
||||
@@ -966,11 +965,12 @@ CDEFINES += -DWCN_PRONTO
|
||||
CDEFINES += -DWCN_PRONTO_V1
|
||||
endif
|
||||
|
||||
+CDEFINES += -DTRACE_RECORD \
|
||||
+ -DLIM_TRACE_RECORD \
|
||||
+ -DSME_TRACE_RECORD
|
||||
+
|
||||
ifeq ($(BUILD_DEBUG_VERSION),1)
|
||||
CDEFINES += -DWLAN_DEBUG \
|
||||
- -DTRACE_RECORD \
|
||||
- -DLIM_TRACE_RECORD \
|
||||
- -DSME_TRACE_RECORD \
|
||||
-DPE_DEBUG_LOGW \
|
||||
-DPE_DEBUG_LOGE \
|
||||
-DDEBUG
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Mon, 18 Apr 2016 08:48:14 +0200
|
||||
Subject: [PATCH 02/12] Update cfg80211_vendor_event_alloc call for newer
|
||||
kernel versions
|
||||
|
||||
Current compilation fails with next error.
|
||||
|
||||
> wlan_hdd_cfg80211.h:995:9: error: too few arguments to function 'cfg80211_vendor_event_alloc'
|
||||
|
||||
This function has been updated starting with kernel 3.15
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/HDD/inc/wlan_hdd_cfg80211.h | 2 +-
|
||||
CORE/HDD/src/wlan_hdd_assoc.c | 8 ++++++++
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||
index 7602f1d3874b..a40c55144bc5 100644
|
||||
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||
@@ -992,7 +992,7 @@ backported_cfg80211_vendor_event_alloc(struct wiphy *wiphy,
|
||||
int approxlen,
|
||||
int event_idx, gfp_t gfp)
|
||||
{
|
||||
- return cfg80211_vendor_event_alloc(wiphy, approxlen, event_idx, gfp);
|
||||
+ return cfg80211_vendor_event_alloc(wiphy, wdev, approxlen, event_idx, gfp);
|
||||
}
|
||||
#define cfg80211_vendor_event_alloc backported_cfg80211_vendor_event_alloc
|
||||
#endif
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
|
||||
index bc3e15009d97..5dc882fa8f83 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_assoc.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
|
||||
@@ -2027,6 +2027,8 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
|
||||
eRoamCmdStatus roamStatus,
|
||||
eCsrRoamResult roamResult )
|
||||
{
|
||||
+ struct ieee80211_channel *chann;
|
||||
+
|
||||
hddLog(VOS_TRACE_LEVEL_INFO, "%s: %s: id %d, status %d, result %d",
|
||||
__func__, pAdapter->dev->name, roamId, roamStatus, roamResult);
|
||||
|
||||
@@ -2082,7 +2084,13 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
|
||||
return;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||
+ chann = ieee80211_get_channel(pAdapter->wdev.wiphy,
|
||||
+ (int)pRoamInfo->pBssDesc->channelId);
|
||||
+ cfg80211_ibss_joined(pAdapter->dev, bss->bssid, chann, GFP_KERNEL);
|
||||
+#else
|
||||
cfg80211_ibss_joined(pAdapter->dev, bss->bssid, GFP_KERNEL);
|
||||
+#endif
|
||||
cfg80211_put_bss(
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) || defined(WITH_BACKPORTS)
|
||||
pHddCtx->wiphy,
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 10:30:51 +0200
|
||||
Subject: [PATCH 03/12] wlan_hdd_main: Update cfg80211_ap_stopped to
|
||||
nl80211_send_ap_stopped
|
||||
|
||||
Use nl80211_send_ap_stopped instead of cfg80211_ap_stopped for newer
|
||||
kernel versions
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/HDD/src/wlan_hdd_main.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
|
||||
index 5e4e95aaaee4..0ff3f31b9863 100755
|
||||
--- a/CORE/HDD/src/wlan_hdd_main.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_main.c
|
||||
@@ -9929,8 +9929,12 @@ VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx )
|
||||
#if defined(MSM_PLATFORM) && !defined(WITH_BACKPORTS)
|
||||
hddLog(VOS_TRACE_LEVEL_ERROR, "%s [SSR] send stop ap to supplicant",
|
||||
__func__);
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
|
||||
cfg80211_ap_stopped(pAdapter->dev, GFP_KERNEL);
|
||||
#else
|
||||
+ nl80211_send_ap_stopped(pAdapter->dev->ieee80211_ptr);
|
||||
+#endif
|
||||
+#else
|
||||
hddLog(VOS_TRACE_LEVEL_ERROR, "%s [SSR] send restart supplicant",
|
||||
__func__);
|
||||
/* event supplicant to restart */
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
From: Karthick S <skarthic@qti.qualcomm.com>
|
||||
Date: Fri, 14 Aug 2015 14:52:23 +0530
|
||||
Subject: [PATCH 04/12] qcacld-2.0: remove unused code
|
||||
|
||||
Removed unused code from ReinitSDIO. Also removed mmcbusmode and it's
|
||||
related references in the code.
|
||||
|
||||
Change-Id: Idaa40f31cc830c0e2fa5d6fbda8c78c9f434bdaf
|
||||
CRs-Fixed: 890630
|
||||
(cherry picked from commit acca7f817db52580a985de2804f30973b2ed9cb7)
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
(cherry picked from commit d63533a6cc46671141ac31290e4f020c236298ee)
|
||||
---
|
||||
CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 165 +--------------------
|
||||
1 file changed, 2 insertions(+), 163 deletions(-)
|
||||
|
||||
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
index 31641c94351c..b3afed2a8d7c 100644
|
||||
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
@@ -57,11 +57,6 @@
|
||||
|
||||
#define MAX_HIF_DEVICES 2
|
||||
|
||||
-unsigned int mmcbusmode = 0;
|
||||
-module_param(mmcbusmode, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
-MODULE_PARM_DESC(mmcbusmode, "Set MMC driver Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104");
|
||||
-EXPORT_SYMBOL(mmcbusmode);
|
||||
-
|
||||
unsigned int mmcbuswidth = 0;
|
||||
module_param(mmcbuswidth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
MODULE_PARM_DESC(mmcbuswidth, "Set MMC driver Bus Width: 1-1Bit, 4-4Bit, 8-8Bit");
|
||||
@@ -689,98 +684,6 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
sdio_claim_host(func);
|
||||
|
||||
do {
|
||||
- /* 2.6.32 kernel does part of the SDIO initalization upon resume */
|
||||
- A_BOOL lt_2_6_32 = (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,32));
|
||||
- if (lt_2_6_32) {
|
||||
- A_UINT32 resp;
|
||||
- A_UINT16 rca;
|
||||
- A_UINT32 i;
|
||||
- int bit = fls(host->ocr_avail) - 1;
|
||||
- /* emulate the mmc_power_up(...) */
|
||||
- host->ios.vdd = bit;
|
||||
- host->ios.chip_select = MMC_CS_DONTCARE;
|
||||
- host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
|
||||
- host->ios.power_mode = MMC_POWER_UP;
|
||||
- host->ios.bus_width = MMC_BUS_WIDTH_1;
|
||||
- host->ios.timing = MMC_TIMING_LEGACY;
|
||||
- host->ops->set_ios(host, &host->ios);
|
||||
- /*
|
||||
- * This delay should be sufficient to allow the power supply
|
||||
- * to reach the minimum voltage.
|
||||
- */
|
||||
- msleep(2);
|
||||
-
|
||||
- host->ios.clock = host->f_min;
|
||||
- host->ios.power_mode = MMC_POWER_ON;
|
||||
- host->ops->set_ios(host, &host->ios);
|
||||
-
|
||||
- /*
|
||||
- * This delay must be at least 74 clock sizes, or 1 ms, or the
|
||||
- * time required to reach a stable voltage.
|
||||
- */
|
||||
- msleep(2);
|
||||
-
|
||||
- /* Issue CMD0. Goto idle state */
|
||||
- host->ios.chip_select = MMC_CS_HIGH;
|
||||
- host->ops->set_ios(host, &host->ios);
|
||||
- msleep(1);
|
||||
- err = IssueSDCommand(device, MMC_GO_IDLE_STATE, 0, (MMC_RSP_NONE | MMC_CMD_BC), NULL);
|
||||
- host->ios.chip_select = MMC_CS_DONTCARE;
|
||||
- host->ops->set_ios(host, &host->ios);
|
||||
- msleep(1);
|
||||
- host->use_spi_crc = 0;
|
||||
-
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD0 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (!host->ocr) {
|
||||
- /* Issue CMD5, arg = 0 */
|
||||
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, 0, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
- host->ocr = resp;
|
||||
- }
|
||||
-
|
||||
- /* Issue CMD5, arg = ocr. Wait till card is ready */
|
||||
- for (i=0;i<100;i++) {
|
||||
- err = IssueSDCommand(device, SD_IO_SEND_OP_COND, host->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp);
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD5 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
- if (resp & MMC_CARD_BUSY) {
|
||||
- break;
|
||||
- }
|
||||
- msleep(10);
|
||||
- }
|
||||
-
|
||||
- if ((i == 100) || (err)) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: card in not ready : %d %d \n",i,err));
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- /* Issue CMD3, get RCA */
|
||||
- err = IssueSDCommand(device, SD_SEND_RELATIVE_ADDR, 0, MMC_RSP_R6 | MMC_CMD_BCR, &resp);
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD3 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
- rca = resp >> 16;
|
||||
- host->ios.bus_mode = MMC_BUSMODE_PUSHPULL;
|
||||
- host->ops->set_ios(host, &host->ios);
|
||||
-
|
||||
- /* Issue CMD7, select card */
|
||||
- err = IssueSDCommand(device, MMC_SELECT_CARD, (rca << 16), MMC_RSP_R1 | MMC_CMD_AC, NULL);
|
||||
- if (err) {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD7 failed : %d \n",err));
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
/* Enable high speed */
|
||||
if (card->host->caps & MMC_CAP_SD_HIGHSPEED) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("ReinitSDIO: Set high speed mode\n"));
|
||||
@@ -1212,10 +1115,7 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe
|
||||
*/
|
||||
{
|
||||
A_UINT32 clock, clock_set = 12500000;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
|
||||
- unsigned int bus_speed = 0, timing = 0;
|
||||
- unsigned char speed = 0;
|
||||
-#endif
|
||||
+
|
||||
sdio_claim_host(func);
|
||||
if (writecccr1) {
|
||||
A_UINT32 err = Func0_CMD52WriteByte(func->card,
|
||||
@@ -1352,69 +1252,8 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe
|
||||
if (debugcccr) {
|
||||
HIFDumpCCCR(device);
|
||||
}
|
||||
- // Set MMC Bus Mode: 1-SDR12, 2-SDR25, 3-SDR50, 4-DDR50, 5-SDR104
|
||||
- if (mmcbusmode > 0) {
|
||||
- printk("host caps:0x%08X, card_sd3_bus_mode:0x%08X\n", (unsigned int)func->card->host->caps, (unsigned int)func->card->sw_caps.sd3_bus_mode);
|
||||
- if (mmcbusmode == 5 && (func->card->host->caps & MMC_CAP_UHS_SDR104) &&
|
||||
- ((func->card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR104) || forcecard)) {
|
||||
- bus_speed = SDIO_SPEED_SDR104;
|
||||
- timing = MMC_TIMING_UHS_SDR104;
|
||||
- func->card->sw_caps.uhs_max_dtr = UHS_SDR104_MAX_DTR;
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("%s: Set MMC bus mode to SDR104. \n", __func__));
|
||||
- } else if (mmcbusmode == 4 && (func->card->host->caps & MMC_CAP_UHS_DDR50) &&
|
||||
- ((func->card->sw_caps.sd3_bus_mode & SD_MODE_UHS_DDR50) || forcecard)) {
|
||||
- bus_speed = SDIO_SPEED_DDR50;
|
||||
- timing = MMC_TIMING_UHS_DDR50;
|
||||
- func->card->sw_caps.uhs_max_dtr = UHS_DDR50_MAX_DTR;
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("%s: Set MMC bus mode to DDR50. \n", __func__));
|
||||
- } else if (mmcbusmode == 3 && (func->card->host->caps & (MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50)) &&
|
||||
- ((func->card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR50) || forcecard)) {
|
||||
- bus_speed = SDIO_SPEED_SDR50;
|
||||
- timing = MMC_TIMING_UHS_SDR50;
|
||||
- func->card->sw_caps.uhs_max_dtr = UHS_SDR50_MAX_DTR;
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("%s: Set MMC bus mode to SDR50. \n", __func__));
|
||||
- } else if (mmcbusmode == 2 && (func->card->host->caps &
|
||||
- (MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25)) &&
|
||||
- ((func->card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR25) || forcecard)) {
|
||||
- bus_speed = SDIO_SPEED_SDR25;
|
||||
- timing = MMC_TIMING_UHS_SDR25;
|
||||
- func->card->sw_caps.uhs_max_dtr = UHS_SDR25_MAX_DTR;
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("%s: Set MMC bus mode to SDR25. \n", __func__));
|
||||
- } else if (mmcbusmode == 1 && (func->card->host->caps & (MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50 |
|
||||
- MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR12)) &&
|
||||
- ((func->card->sw_caps.sd3_bus_mode & SD_MODE_UHS_SDR12) || forcecard)) {
|
||||
- bus_speed = SDIO_SPEED_SDR12;
|
||||
- timing = MMC_TIMING_UHS_SDR12;
|
||||
- func->card->sw_caps.uhs_max_dtr = UHS_SDR12_MAX_DTR;
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("%s: Set MMC bus mode to SDR12. \n", __func__));
|
||||
- } else {
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s: MMC bus mode %d not supported. \n", __func__, mmcbusmode));
|
||||
- return ret = -1;
|
||||
- }
|
||||
-
|
||||
- ret = Func0_CMD52ReadByte(func->card, SDIO_CCCR_SPEED, &speed);
|
||||
- if (ret){
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s: CMD52 to get CCCR SPEED failed: %d, cap_uhs: %lu, sd3_bus_mode: %x \n", __func__, ret, (long unsigned int)(func->card->host->caps & (MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR12)), func->card->sw_caps.sd3_bus_mode));
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- speed &= ~SDIO_SPEED_BSS_MASK;
|
||||
- speed |= bus_speed;
|
||||
- ret = Func0_CMD52WriteByte(func->card, SDIO_CCCR_SPEED, speed);
|
||||
- if (ret){
|
||||
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s: CMD52 to set CCCR SPPED failed: %d \n", __func__, ret));
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- if (bus_speed) {
|
||||
- device->host->ios.timing = timing;
|
||||
- device->host->ops->set_ios(device->host, &device->host->ios);
|
||||
- // mmc_set_clock(func->card->host, func->card->sw_caps.uhs_max_dtr);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-#endif //#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
|
||||
|
||||
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) */
|
||||
sdio_release_host(func);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 13:19:10 +0200
|
||||
Subject: [PATCH 05/12] Including header file for "regulatory_hint_user"
|
||||
|
||||
The function "regulatory_hint_user" has been moved from
|
||||
include/net/cfg80211.h to net/wireless/reg.h.
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
(cherry picked from commit db944bc907127c191b1bbdcc58d3aecedcf44a8c)
|
||||
---
|
||||
CORE/VOSS/src/vos_nvitem.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
|
||||
index d79ae2871e4b..47290c9d1744 100644
|
||||
--- a/CORE/VOSS/src/vos_nvitem.c
|
||||
+++ b/CORE/VOSS/src/vos_nvitem.c
|
||||
@@ -53,6 +53,10 @@
|
||||
#include "regdomain.h"
|
||||
#include "regdomain_common.h"
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
|
||||
+#include <../net/wireless/reg.h>
|
||||
+#endif
|
||||
+
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) && !defined(WITH_BACKPORTS)
|
||||
#define IEEE80211_CHAN_NO_80MHZ 1<<7
|
||||
#endif
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 13:52:18 +0200
|
||||
Subject: [PATCH 06/12] Updating calls to "alloc_netdev_mq"
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/EPPING/src/epping_txrx.c | 6 ++++++
|
||||
CORE/HDD/src/wlan_hdd_hostapd.c | 4 ++++
|
||||
CORE/HDD/src/wlan_hdd_main.c | 10 +++++++---
|
||||
3 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CORE/EPPING/src/epping_txrx.c b/CORE/EPPING/src/epping_txrx.c
|
||||
index 678d58e0cfae..0985e362f94a 100644
|
||||
--- a/CORE/EPPING/src/epping_txrx.c
|
||||
+++ b/CORE/EPPING/src/epping_txrx.c
|
||||
@@ -355,7 +355,13 @@ epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
|
||||
struct net_device *dev;
|
||||
epping_adapter_t *pAdapter;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
|
||||
+ dev = alloc_netdev(sizeof(epping_adapter_t), "wifi%d", NET_NAME_UNKNOWN, ether_setup);
|
||||
+#else
|
||||
dev = alloc_netdev(sizeof(epping_adapter_t), "wifi%d", ether_setup);
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
if (dev == NULL) {
|
||||
EPPING_LOG(VOS_TRACE_LEVEL_FATAL,
|
||||
"%s: Cannot allocate epping_adapter_t\n", __func__);
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||
index 6251224c11df..8a80d26f355a 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||
@@ -5447,7 +5447,11 @@ hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAd
|
||||
|
||||
hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: iface_name = %s", __func__, iface_name);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
|
||||
+ pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, NET_NAME_UNKNOWN, ether_setup, NUM_TX_QUEUES);
|
||||
+#else
|
||||
pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, ether_setup, NUM_TX_QUEUES);
|
||||
+#endif
|
||||
|
||||
if (pWlanHostapdDev != NULL)
|
||||
{
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
|
||||
index 0ff3f31b9863..a10da2a9b164 100755
|
||||
--- a/CORE/HDD/src/wlan_hdd_main.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_main.c
|
||||
@@ -8226,7 +8226,11 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
|
||||
/*
|
||||
* cfg80211 initialization and registration....
|
||||
*/
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
|
||||
+ pWlanDev = alloc_netdev_mq(sizeof( hdd_adapter_t ), name, NET_NAME_UNKNOWN, ether_setup, NUM_TX_QUEUES);
|
||||
+#else
|
||||
pWlanDev = alloc_netdev_mq(sizeof( hdd_adapter_t ), name, ether_setup, NUM_TX_QUEUES);
|
||||
+#endif
|
||||
|
||||
if(pWlanDev != NULL)
|
||||
{
|
||||
@@ -9929,10 +9933,10 @@ VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx )
|
||||
#if defined(MSM_PLATFORM) && !defined(WITH_BACKPORTS)
|
||||
hddLog(VOS_TRACE_LEVEL_ERROR, "%s [SSR] send stop ap to supplicant",
|
||||
__func__);
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
|
||||
- cfg80211_ap_stopped(pAdapter->dev, GFP_KERNEL);
|
||||
-#else
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
|
||||
nl80211_send_ap_stopped(pAdapter->dev->ieee80211_ptr);
|
||||
+#else
|
||||
+ cfg80211_ap_stopped(pAdapter->dev, GFP_KERNEL);
|
||||
#endif
|
||||
#else
|
||||
hddLog(VOS_TRACE_LEVEL_ERROR, "%s [SSR] send restart supplicant",
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 13:56:15 +0200
|
||||
Subject: [PATCH 07/12] wlan_hdd_cfg80211: update "cfg80211_inform_bss" params
|
||||
for kernel version
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/HDD/src/wlan_hdd_cfg80211.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
|
||||
index c09ac0304852..c6c79552a9d0 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
|
||||
@@ -8460,8 +8460,11 @@ static struct cfg80211_bss* wlan_hdd_cfg80211_inform_bss(
|
||||
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
|
||||
if (bss == NULL) {
|
||||
rssi = (VOS_MIN ((pBssDesc->rssi + pBssDesc->sinr), 0))*100;
|
||||
-
|
||||
- return (cfg80211_inform_bss(wiphy, chan, pBssDesc->bssId,
|
||||
+ return (cfg80211_inform_bss(wiphy, chan,
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
||||
+ CFG80211_BSS_FTYPE_BEACON,
|
||||
+#endif
|
||||
+ pBssDesc->bssId,
|
||||
le64_to_cpu(*(__le64 *)pBssDesc->timeStamp),
|
||||
pBssDesc->capabilityInfo,
|
||||
pBssDesc->beaconInterval, ie, ie_length,
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 13:57:03 +0200
|
||||
Subject: [PATCH 08/12] wlan_hdd_p2p: Update call to "cfg80211_rx_mgmt" for
|
||||
different kernel versions
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/HDD/src/wlan_hdd_p2p.c | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
|
||||
index 0c6645f077f1..476b456e165c 100644
|
||||
--- a/CORE/HDD/src/wlan_hdd_p2p.c
|
||||
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
|
||||
@@ -826,7 +826,16 @@ void hdd_remainChanReadyHandler( hdd_adapter_t *pAdapter )
|
||||
// Check for cached action frame
|
||||
if(pRemainChanCtx->action_pkt_buff.frame_length != 0)
|
||||
{
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) || defined(WITH_BACKPORTS)
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
|
||||
+ cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr,
|
||||
+ pRemainChanCtx->action_pkt_buff.freq, 0,
|
||||
+ pRemainChanCtx->action_pkt_buff.frame_ptr,
|
||||
+ pRemainChanCtx->action_pkt_buff.frame_length,
|
||||
+ NL80211_RXMGMT_FLAG_ANSWERED);
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) || defined(WITH_BACKPORTS)
|
||||
+
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) || defined(WITH_BACKPORTS)
|
||||
cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr,
|
||||
pRemainChanCtx->action_pkt_buff.freq, 0,
|
||||
pRemainChanCtx->action_pkt_buff.frame_ptr,
|
||||
@@ -2340,7 +2349,11 @@ void hdd_indicateMgmtFrame( hdd_adapter_t *pAdapter,
|
||||
|
||||
//Indicate Frame Over Normal Interface
|
||||
hddLog( LOG1, FL("Indicate Frame over NL80211 Interface"));
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) || defined(WITH_BACKPORTS)
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
|
||||
+ cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, pbFrames,
|
||||
+ nFrameLength, NL80211_RXMGMT_FLAG_ANSWERED);
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) || defined(WITH_BACKPORTS)
|
||||
cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, pbFrames,
|
||||
nFrameLength, NL80211_RXMGMT_FLAG_ANSWERED, GFP_ATOMIC);
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 13:58:29 +0200
|
||||
Subject: [PATCH 09/12] =?UTF-8?q?linux=5Fac:=20Fix=20for=20=E2=80=98f=5Fde?=
|
||||
=?UTF-8?q?ntry=E2=80=99?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://communities.vmware.com/thread/499483?start=0&tstart=0
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/UTILS/PKTLOG/linux_ac.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c
|
||||
index b1969ad5d2ba..8d45d7365b2b 100644
|
||||
--- a/CORE/UTILS/PKTLOG/linux_ac.c
|
||||
+++ b/CORE/UTILS/PKTLOG/linux_ac.c
|
||||
@@ -576,7 +576,10 @@ pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
|
||||
int rem_len;
|
||||
int start_offset, end_offset;
|
||||
int fold_offset, ppos_data, cur_rd_offset;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
||||
+ struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
|
||||
+ PDE_DATA(file_inode(file));
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
|
||||
PDE_DATA(file->f_dentry->d_inode);
|
||||
#else
|
||||
@@ -817,7 +820,10 @@ static struct vm_operations_struct pktlog_vmops = {
|
||||
|
||||
static int pktlog_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
||||
+ struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
|
||||
+ PDE_DATA(file_inode(file));
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
|
||||
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
|
||||
PDE_DATA(file->f_dentry->d_inode);
|
||||
#else
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 14:00:59 +0200
|
||||
Subject: [PATCH 10/12] native_sdio/src/hif: Do not call to HIGH SPEED
|
||||
functions for newer kernels
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
index b3afed2a8d7c..1a1e51eff8c7 100644
|
||||
--- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
+++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c
|
||||
@@ -690,7 +690,9 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
err = Func0_CMD52ReadByte(card, SDIO_CCCR_SPEED, &cmd52_resp);
|
||||
if (err) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD52 read to CCCR speed register failed : %d \n",err));
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
card->state &= ~MMC_STATE_HIGHSPEED;
|
||||
+#endif
|
||||
/* no need to break */
|
||||
} else {
|
||||
err = Func0_CMD52WriteByte(card, SDIO_CCCR_SPEED, (cmd52_resp | SDIO_SPEED_EHS));
|
||||
@@ -698,14 +700,20 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("ReinitSDIO: CMD52 write to CCCR speed register failed : %d \n",err));
|
||||
break;
|
||||
}
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
mmc_card_set_highspeed(card);
|
||||
+#endif
|
||||
host->ios.timing = MMC_TIMING_SD_HS;
|
||||
host->ops->set_ios(host, &host->ios);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set clock */
|
||||
- if (mmc_card_highspeed(card)) {
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
+ if (mmc_card_highspeed(card)) {
|
||||
+#else
|
||||
+ if (mmc_card_hs(card)) {
|
||||
+#endif
|
||||
clock = 50000000;
|
||||
} else {
|
||||
clock = card->cis.max_dtr;
|
||||
@@ -1181,7 +1189,11 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe
|
||||
if (mmcclock > 0){
|
||||
clock_set = mmcclock;
|
||||
}
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
if (mmc_card_highspeed(func->card)){
|
||||
+#else
|
||||
+ if (mmc_card_hs(func->card)){
|
||||
+#endif
|
||||
clock = 50000000;
|
||||
} else {
|
||||
clock = func->card->cis.max_dtr;
|
||||
@@ -2000,7 +2012,11 @@ addHifDevice(struct sdio_func *func)
|
||||
hifdevice->func = func;
|
||||
hifdevice->powerConfig = HIF_DEVICE_POWER_UP;
|
||||
hifdevice->DeviceState = HIF_DEVICE_STATE_ON;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
|
||||
ret = sdio_set_drvdata(func, hifdevice);
|
||||
+#else
|
||||
+ sdio_set_drvdata(func, hifdevice);
|
||||
+#endif
|
||||
|
||||
EXIT("status %d", ret);
|
||||
return hifdevice;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 21 Apr 2016 14:32:57 +0200
|
||||
Subject: [PATCH 11/12] osdep_adf.h: fix for undefined ath_sysctl_pktlog_size
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
CORE/SERVICES/COMMON/osdep_adf.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/CORE/SERVICES/COMMON/osdep_adf.h b/CORE/SERVICES/COMMON/osdep_adf.h
|
||||
index 708b6f89fa03..48ca78618840 100644
|
||||
--- a/CORE/SERVICES/COMMON/osdep_adf.h
|
||||
+++ b/CORE/SERVICES/COMMON/osdep_adf.h
|
||||
@@ -168,6 +168,10 @@ typedef unsigned long TQUEUE_ARG;
|
||||
#define ATH_SYSCTL_PROC_DOSTRING(ctl, write, filp, buffer, lenp, ppos) \
|
||||
proc_dostring(ctl, write, filp, buffer, lenp, ppos)
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
||||
+typedef struct ctl_table ctl_table;
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Byte Order stuff
|
||||
*/
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Thu, 19 May 2016 12:28:39 +0200
|
||||
Subject: [PATCH 12/12] Kbuild: Add compilation flag based on kernel support
|
||||
|
||||
The option WLAN_NL80211_TESTMODE was inconditionally added to the compilation
|
||||
but it does required the specific kernel support.
|
||||
|
||||
https://jira.digi.com/browse/DEL-2567
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
Kbuild | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Kbuild b/Kbuild
|
||||
index b248eee28bf0..339262874c94 100644
|
||||
--- a/Kbuild
|
||||
+++ b/Kbuild
|
||||
@@ -908,7 +908,6 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
|
||||
-DWLAN_WAKEUP_EVENTS \
|
||||
-DFEATURE_WLAN_RA_FILTERING\
|
||||
-DWLAN_KD_READY_NOTIFIER \
|
||||
- -DWLAN_NL80211_TESTMODE \
|
||||
-DFEATURE_WLAN_BATCH_SCAN \
|
||||
-DFEATURE_WLAN_LPHB \
|
||||
-DFEATURE_WLAN_PAL_TIMER_DISABLE \
|
||||
@@ -948,6 +947,10 @@ CDEFINES += -DDFS_MASTER_OFFLOAD_IND_SUPPORT
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_NL80211_TESTMODE), y)
|
||||
+CDEFINES += -DWLAN_NL80211_TESTMODE
|
||||
+endif
|
||||
+
|
||||
ifeq ($(CONFIG_ARCH_MSM), y)
|
||||
CDEFINES += -DMSM_PLATFORM
|
||||
endif
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
install wlan true
|
||||
# Load the wlan module with values for SDIO3.0.
|
||||
options wlan asyncintdelay=0x2 writecccr1=0xf2 writecccr1value=0xf \
|
||||
writecccr2=0xf1 writecccr2value=0xa8 writecccr3=0xf0 \
|
||||
writecccr3value=0xa1 writecccr4=0x15 writecccr4value=0x30
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/sh
|
||||
#===============================================================================
|
||||
#
|
||||
# qualcomm-pre-up
|
||||
#
|
||||
# Copyright (C) 2016 by Digi International Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 as published by
|
||||
# the Free Software Foundation.
|
||||
#
|
||||
#
|
||||
# !Description: Load Qualcomm' wireless driver
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
[ "${IFACE}" != "wlan0" ] && exit 0
|
||||
|
||||
MACFILE="/lib/firmware/wlan/wlan_mac.bin"
|
||||
TMP_MACFILE="$(mktemp -t wlan_mac.XXXXXX)"
|
||||
|
||||
# Read the MACs from DeviceTree. We can have up to four wireless interfaces
|
||||
# The only required one is wlan0 that is mapped with device tree mac address
|
||||
# without suffix.
|
||||
for index in $(seq 0 3); do
|
||||
DT_WLANx_MAC="/proc/device-tree/wireless/mac-address"
|
||||
if [ "${index}" = "0" ]; then
|
||||
# Set a default MAC for wlan0
|
||||
MAC_ADDR="00:04:F3:FF:FF:FB"
|
||||
else
|
||||
# Add the interface suffix for the device tree node
|
||||
DT_WLANx_MAC=${DT_WLANx_MAC}${index}
|
||||
MAC_ADDR=""
|
||||
fi
|
||||
|
||||
if [ -f "${DT_WLANx_MAC}" ]; then
|
||||
MAC_ADDR="$(hexdump -ve '1/1 "%02X" ":"' ${DT_WLANx_MAC} | sed 's/:$//g')"
|
||||
fi
|
||||
|
||||
# Dump the MAC address in a file with the expected firmware format.
|
||||
# example: Intf0MacAddress=0004f3fffffb
|
||||
echo "Intf${index}MacAddress=${MAC_ADDR}" | sed s/://g >> ${TMP_MACFILE}
|
||||
done
|
||||
|
||||
# Override the MAC firmware file only if the MAC file has changed.
|
||||
if ! cmp -s ${TMP_MACFILE} ${MACFILE}; then
|
||||
cp ${TMP_MACFILE} ${MACFILE}
|
||||
fi
|
||||
rm -f ${TMP_MACFILE}
|
||||
|
||||
# Load the wireless module with the params defined in modprobe.d/qualcomm.conf
|
||||
modprobe wlan
|
||||
|
||||
# Validate that firmware was loaded by checking if the interface is present.
|
||||
if [ -d "/sys/class/net/${IFACE}" ]; then
|
||||
echo "Loading qca6564 module: [OK]"
|
||||
else
|
||||
echo "Loading qca6564 module: [FAILED]"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in New Issue