From 45eaba6385be16116897d19986fdea8d211d1069 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 1 Jul 2015 05:14:42 +0000 Subject: [PATCH] core/linux-veyron to 3.14.0-4 --- .../0001-use-chromiumos-mwifiex-drivers.patch | 16 +- ...reate-AP-and-P2P-interfaces-upon-dri.patch | 63 +++++++ core/linux-veyron/99-veyron-brcm.rules | 1 + core/linux-veyron/PKGBUILD | 30 +++- core/linux-veyron/brcmfmac4354-sdio.txt | 155 ++++++++++++++++++ core/linux-veyron/config | 34 +--- 6 files changed, 258 insertions(+), 41 deletions(-) create mode 100644 core/linux-veyron/0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch create mode 100644 core/linux-veyron/99-veyron-brcm.rules create mode 100644 core/linux-veyron/brcmfmac4354-sdio.txt diff --git a/core/linux-veyron/0001-use-chromiumos-mwifiex-drivers.patch b/core/linux-veyron/0001-use-chromiumos-mwifiex-drivers.patch index 6e5a7cb73..c737a8a21 100644 --- a/core/linux-veyron/0001-use-chromiumos-mwifiex-drivers.patch +++ b/core/linux-veyron/0001-use-chromiumos-mwifiex-drivers.patch @@ -1,17 +1,17 @@ -From 9216b45c24df6971ae006379008e9a4ab0124898 Mon Sep 17 00:00:00 2001 +From d1f7cbbd8efbc022222d84a697595ba9f6637de0 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 25 Jun 2015 20:35:06 -0600 -Subject: [PATCH] use chromiumos mwifiex drivers +Subject: [PATCH 1/2] use chromiumos mwifiex drivers Signed-off-by: Kevin Mihelich --- - drivers/net/wireless/mwifiex/sdio.h | 6 +++--- + drivers/net/wireless-3.8/mwifiex/sdio.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h -index 532ae0a..971a4bc 100644 ---- a/drivers/net/wireless/mwifiex/sdio.h -+++ b/drivers/net/wireless/mwifiex/sdio.h +diff --git a/drivers/net/wireless-3.8/mwifiex/sdio.h b/drivers/net/wireless-3.8/mwifiex/sdio.h +index f9ee413..9686025 100644 +--- a/drivers/net/wireless-3.8/mwifiex/sdio.h ++++ b/drivers/net/wireless-3.8/mwifiex/sdio.h @@ -30,9 +30,9 @@ #include "main.h" @@ -22,9 +22,9 @@ index 532ae0a..971a4bc 100644 +#define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta_cros.bin" +#define SD8797_DEFAULT_FW_NAME "mrvl/sd8797_uapsta_cros.bin" +#define SD8897_DEFAULT_FW_NAME "mrvl/sd8897_uapsta_cros.bin" + #define SD8887_DEFAULT_FW_NAME "mrvl/sd8887_wlan_a2.bin" #define BLOCK_MODE 1 - #define BYTE_MODE 0 -- 2.4.4 diff --git a/core/linux-veyron/0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch b/core/linux-veyron/0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch new file mode 100644 index 000000000..b0f6a43c6 --- /dev/null +++ b/core/linux-veyron/0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch @@ -0,0 +1,63 @@ +From d24fdf29978108413eb405302255139fdbb94a16 Mon Sep 17 00:00:00 2001 +From: Bing Zhao +Date: Mon, 19 Aug 2013 16:10:21 -0700 +Subject: [PATCH 2/2] mwifiex: do not create AP and P2P interfaces upon driver + loading + +Bug 60747 - 1286:2044 [Microsoft Surface Pro] + Marvell 88W8797 wifi show 3 interface under network +https://bugzilla.kernel.org/show_bug.cgi?id=60747 + +This issue was also reported previously by OLPC and some folks from +the community. + +There are 3 network interfaces with different types being created +when mwifiex driver is loaded: + +1. mlan0 (infra. STA) +2. uap0 (AP) +3. p2p0 (P2P_CLIENT) + +The Network Manager attempts to use all 3 interfaces above without +filtering the managed interface type. As the result, 3 identical +interfaces are displayed under network manager. If user happens to +click on an entry under which its interface is uap0 or p2p0, the +association will fail. + +Work around it by removing the creation of AP and P2P interfaces +at driver loading time. These interfaces can be added with 'iw' or +other applications manually when they are needed. + +Signed-off-by: Bing Zhao +Signed-off-by: Avinash Patil +--- + drivers/net/wireless-3.8/mwifiex/main.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/drivers/net/wireless-3.8/mwifiex/main.c b/drivers/net/wireless-3.8/mwifiex/main.c +index b3f9247..a503264 100644 +--- a/drivers/net/wireless-3.8/mwifiex/main.c ++++ b/drivers/net/wireless-3.8/mwifiex/main.c +@@ -515,19 +515,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context) + goto err_add_intf; + } + +- /* Create AP interface by default */ +- if (!mwifiex_add_virtual_intf(adapter->wiphy, "uap%d", +- NL80211_IFTYPE_AP, NULL, NULL)) { +- dev_err(adapter->dev, "cannot create default AP interface\n"); +- goto err_add_intf; +- } +- +- /* Create P2P interface by default */ +- if (!mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d", +- NL80211_IFTYPE_P2P_CLIENT, NULL, NULL)) { +- dev_err(adapter->dev, "cannot create default P2P interface\n"); +- goto err_add_intf; +- } + rtnl_unlock(); + + mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1); +-- +2.4.4 + diff --git a/core/linux-veyron/99-veyron-brcm.rules b/core/linux-veyron/99-veyron-brcm.rules new file mode 100644 index 000000000..42ccf4888 --- /dev/null +++ b/core/linux-veyron/99-veyron-brcm.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="sdio", ENV{SDIO_CLASS}=="02", ENV{SDIO_ID}=="02D0:4354", RUN+="/usr/bin/brcm_patchram_plus -d --patchram /usr/lib/firmware/brcm/BCM4354_003.001.012.0306.0659.hcd --no2bytes --enable_hci --enable_lpm --scopcm=1,2,0,1,1,0,0,0,0,0 --baudrate 3000000 --use_baudrate_for_download --tosleep=50000 /dev/ttyS0" diff --git a/core/linux-veyron/PKGBUILD b/core/linux-veyron/PKGBUILD index e06a3315a..de513f407 100644 --- a/core/linux-veyron/PKGBUILD +++ b/core/linux-veyron/PKGBUILD @@ -7,34 +7,44 @@ pkgbase=linux-veyron _kernelname=${pkgbase#linux} _desc="Veyron Chromebooks" pkgver=3.14.0 -pkgrel=3 +pkgrel=4 _commit=ec35b77b5626479af06faf09e196034c928100ee arch=('armv7h') url="https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.14" license=('GPL2') +depends=('brcm-patchram-plus') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc') options=('!strip') source=("https://chromium.googlesource.com/chromiumos/third_party/kernel/+archive/${_commit}.tar.gz" http://archlinuxarm.org/builder/src/veyron/sd{8787,8797,8897}_uapsta_cros.bin + 'http://archlinuxarm.org/builder/src/veyron/BCM4354_003.001.012.0306.0659.hcd' '0001-use-chromiumos-mwifiex-drivers.patch' + '0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch' 'config' 'kernel.its' 'kernel.keyblock' 'kernel_data_key.vbprivk' - 'cmdline') -md5sums=('4c6f6e0a1fb651641282ff733a3b802f' + 'cmdline' + 'brcmfmac4354-sdio.txt' + '99-veyron-brcm.rules') +md5sums=('bfe89c90286511d358a7a1d89f776dfc' 'bda543cb5943eac34e16d12911f3ee99' '5e2d7cd74de07d13052de99411c13a2f' '1534c1dbfe5df35a5634072f7b912840' - 'cc43bf29f9ce7d611b6f6c3851d3e323' - '1af2cda63584b7ff96ad3ba12e5f6cf1' + '20f8931f3795e5226829d48c3d470334' + 'b40864640c0dc67feb87f82019a0212e' + '3b4bb3ab088502164c507b85217e1fd0' + '1981c2ceb90d166cd7b0024bc55d5d17' '1d77c34a9c759a7f54df718cd80de567' '61c5ff73c136ed07a7aadbf58db3d96a' '584777ae88bce2c5659960151b64c7d8' - 'e3bdf63d5d936fb982c4cd62da1433ad') + 'e3bdf63d5d936fb982c4cd62da1433ad' + '97297f16115fb38e157bdc3a4527252d' + 'cd779bcbe50e6562428279ff7e5b0cd9') prepare() { git apply 0001-use-chromiumos-mwifiex-drivers.patch + git apply 0002-mwifiex-do-not-create-AP-and-P2P-interfaces-upon-dri.patch cp config .config @@ -43,6 +53,8 @@ prepare() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh + + export WIFIVERSION=-3.8 } build() { @@ -133,6 +145,12 @@ _package() { # install ChromeOS mwifiex firmware mkdir -p "${pkgdir}"/usr/lib/firmware/mrvl cp sd{8787,8797,8897}_uapsta_cros.bin "${pkgdir}"/usr/lib/firmware/mrvl + + # install ChromeOS brcm firmware + mkdir -p "${pkgdir}"/usr/lib/firmware/brcm + mkdir -p "${pkgdir}"/usr/lib/udev/rules.d + cp BCM4354_003.001.012.0306.0659.hcd brcmfmac4354-sdio.txt "${pkgdir}"/usr/lib/firmware/brcm + cp 99-veyron-brcm.rules "${pkgdir}"/usr/lib/udev/rules.d } _package-headers() { diff --git a/core/linux-veyron/brcmfmac4354-sdio.txt b/core/linux-veyron/brcmfmac4354-sdio.txt new file mode 100644 index 000000000..c24f8e45d --- /dev/null +++ b/core/linux-veyron/brcmfmac4354-sdio.txt @@ -0,0 +1,155 @@ +# Sample variables file for BCM94354Z NGFF 22x30mm iPA, iLNA board with PCIe/SDIO for production package +# SDIO interface +NVRAMRev=$Rev: 373428 $ +sromrev=11 +boardrev=0x1224 +boardtype=0x0707 +boardflags=0x02400201 +#enable LNA1 bypass for both 2G & 5G + +#boardflags2=0xc0800000 +boardflags2=0x00802000 + +boardflags3=0x4800000a +#boardnum=57410 +macaddr=00:11:22:33:44:55 +ccode=0 +regrev=0 +antswitch=0 +pdgain5g=4 +pdgain2g=4 +tworangetssi2g=0 +tworangetssi5g=0 +paprdis=0 +femctrl=10 +vendid=0x14e4 +devid=0x43a3 +manfid=0x2d0 +#prodid=0x052e +nocrc=1 +otpimagesize=502 +xtalfreq=37400 +rxgains2gelnagaina0=0 + +#rxgains2gtrisoa0=3 +rxgains2gtrisoa0=7 + +rxgains2gtrelnabypa0=0 +rxgains5gelnagaina0=0 + +#rxgains5gtrisoa0=4 +rxgains5gtrisoa0=11 + +rxgains5gtrelnabypa0=0 +rxgains5gmelnagaina0=0 + +#rxgains5gmtrisoa0=4 +rxgains5gmtrisoa0=13 + +rxgains5gmtrelnabypa0=0 +rxgains5ghelnagaina0=0 + +#rxgains5ghtrisoa0=4 +rxgains5ghtrisoa0=12 + +rxgains5ghtrelnabypa0=0 +rxgains2gelnagaina1=0 + +#rxgains2gtrisoa1=3 +rxgains2gtrisoa1=7 + +rxgains2gtrelnabypa1=0 +rxgains5gelnagaina1=0 + +#rxgains5gtrisoa1=4 +rxgains5gtrisoa1=10 + +rxgains5gtrelnabypa1=0 +rxgains5gmelnagaina1=0 + +#rxgains5gmtrisoa1=4 +rxgains5gmtrisoa1=11 + +rxgains5gmtrelnabypa1=0 +rxgains5ghelnagaina1=0 + +#rxgains5ghtrisoa1=4 +rxgains5ghtrisoa1=11 + +rxgains5ghtrelnabypa1=0 +rxchain=3 +txchain=3 +aa2g=3 +aa5g=3 +agbg0=2 +agbg1=2 +aga0=2 +aga1=2 +tssipos2g=1 +extpagain2g=2 +tssipos5g=1 +extpagain5g=2 +tempthresh=255 +tempoffset=255 +rawtempsense=0x1ff +pa2ga0=-147,5992,-705 +pa2ga1=-161,5991,-701 +pa5ga0=-194,5999,-739,-188,6057,-743,-185,6001,-725,-171,5978,-715 +pa5ga1=-190,6103,-757,-190,6105,-759,-190,6105,-757,-184,6111,-746 +subband5gver=0x4 +pdoffsetcckma0=0x4 +pdoffsetcckma1=0x4 +pdoffset40ma0=0x0000 +pdoffset80ma0=0x0000 +pdoffset40ma1=0x0000 +pdoffset80ma1=0x0000 +maxp2ga0=70 +maxp5ga0=58,58,58,58 +maxp2ga1=70 +maxp5ga1=58,58,58,58 +cckbw202gpo=0x1111 +cckbw20ul2gpo=0x0000 +mcsbw202gpo=0x66666666 +mcsbw402gpo=0xAAAAAAAA +dot11agofdmhrbw202gpo=0x4444 +ofdmlrbw202gpo=0x0044 +mcsbw205glpo=0x66666666 +mcsbw405glpo=0x66666666 +mcsbw805glpo=0xAAAAAAAA +mcsbw205gmpo=0x66666666 +mcsbw405gmpo=0x66666666 +mcsbw805gmpo=0xAAAAAAAA +mcsbw205ghpo=0x66666666 +mcsbw405ghpo=0x66666666 +mcsbw805ghpo=0xAAAAAAAA +mcslr5glpo=0x0000 +mcslr5gmpo=0x0000 +mcslr5ghpo=0x0000 +sb20in40hrpo=0x0 +sb20in80and160hr5glpo=0x0 +sb40and80hr5glpo=0x0 +sb20in80and160hr5gmpo=0x0 +sb40and80hr5gmpo=0x0 +sb20in80and160hr5ghpo=0x0 +sb40and80hr5ghpo=0x0 +sb20in40lrpo=0x0 +sb20in80and160lr5glpo=0x0 +sb40and80lr5glpo=0x0 +sb20in80and160lr5gmpo=0x0 +sb40and80lr5gmpo=0x0 +sb20in80and160lr5ghpo=0x0 +sb40and80lr5ghpo=0x0 +dot11agduphrpo=0x0 +dot11agduplrpo=0x0 +phycal_tempdelta=25 +temps_period=15 +temps_hysteresis=15 +AvVmid_c0=2,140,2,145,2,145,2,145,2,145 +AvVmid_c1=2,140,2,145,2,145,2,145,2,145 +AvVmid_c2=0,0,0,0,0,0,0,0,0,0 +rssicorrnorm_c0=4,4 +rssicorrnorm_c1=4,4 +rssicorrnorm5g_c0=1,2,3,1,2,3,6,6,8,6,6,8 +rssicorrnorm5g_c1=1,2,3,2,2,2,7,7,8,7,7,8 +ltecxmux=0x534201 +Ofdmfilttype=6 diff --git a/core/linux-veyron/config b/core/linux-veyron/config index ca08a429d..f96abf0a2 100644 --- a/core/linux-veyron/config +++ b/core/linux-veyron/config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.14.0-2 Kernel Configuration +# Linux/arm 3.14.0-3 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -1579,12 +1579,11 @@ CONFIG_LIBERTAS_THINFIRM=m # CONFIG_LIBERTAS_THINFIRM_DEBUG is not set CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_AT76C50X_USB=m -CONFIG_USB_ZD1201=m +# CONFIG_USB_ZD1201 is not set CONFIG_USB_NET_RNDIS_WLAN=m CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y CONFIG_MAC80211_HWSIM=m -# CONFIG_WIFI_CONTROL_FUNC is not set CONFIG_ATH_COMMON=m CONFIG_ATH_CARDS=m # CONFIG_ATH_DEBUG is not set @@ -1594,32 +1593,20 @@ CONFIG_ATH9K_BTCOEX_SUPPORT=y CONFIG_ATH9K=m CONFIG_ATH9K_AHB=y # CONFIG_ATH9K_DEBUGFS is not set -# CONFIG_ATH9K_WOW is not set -# CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set +CONFIG_ATH9K_RATE_CONTROL=y CONFIG_ATH9K_RFKILL=y CONFIG_ATH9K_HTC=m # CONFIG_ATH9K_HTC_DEBUGFS is not set -CONFIG_CARL9170=m -CONFIG_CARL9170_LEDS=y -# CONFIG_CARL9170_DEBUGFS is not set -CONFIG_CARL9170_WPC=y -CONFIG_CARL9170_HWRNG=y +# CONFIG_CARL9170 is not set CONFIG_ATH6KL=m # CONFIG_ATH6KL_SDIO is not set CONFIG_ATH6KL_USB=m # CONFIG_ATH6KL_DEBUG is not set -# CONFIG_ATH6KL_TRACING is not set CONFIG_AR5523=m -CONFIG_ATH10K=m -# CONFIG_ATH10K_DEBUG is not set -# CONFIG_ATH10K_DEBUGFS is not set -# CONFIG_ATH10K_TRACING is not set -CONFIG_WCN36XX=m -# CONFIG_WCN36XX_DEBUGFS is not set # CONFIG_B43 is not set # CONFIG_B43LEGACY is not set CONFIG_BRCMUTIL=m -CONFIG_BRCMSMAC=m +# CONFIG_BRCMSMAC is not set CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_SDIO=y CONFIG_BRCMFMAC_USB=y @@ -1636,7 +1623,6 @@ CONFIG_LIBERTAS_USB=m # CONFIG_LIBERTAS_MESH is not set CONFIG_P54_COMMON=m CONFIG_P54_USB=m -# CONFIG_P54_SPI is not set CONFIG_P54_LEDS=y CONFIG_RT2X00=m CONFIG_RT2500USB=m @@ -1644,9 +1630,7 @@ CONFIG_RT73USB=m CONFIG_RT2800USB=m CONFIG_RT2800USB_RT33XX=y CONFIG_RT2800USB_RT35XX=y -CONFIG_RT2800USB_RT3573=y CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y CONFIG_RT2800_LIB=m CONFIG_RT2X00_LIB_USB=m @@ -1656,19 +1640,15 @@ CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y # CONFIG_RT2X00_LIB_DEBUGFS is not set # CONFIG_RT2X00_DEBUG is not set -CONFIG_RTL_CARDS=m CONFIG_RTL8192CU=m CONFIG_RTLWIFI=m -CONFIG_RTLWIFI_USB=m # CONFIG_RTLWIFI_DEBUG is not set CONFIG_RTL8192C_COMMON=m # CONFIG_WL_TI is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_ZD1211RW is not set CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m CONFIG_MWIFIEX_USB=m -# CONFIG_CW1200 is not set # # WiMAX Wireless Broadband devices @@ -4454,7 +4434,7 @@ CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_BIT is not set CONFIG_CRC7=m CONFIG_LIBCRC32C=y -# CONFIG_CRC8 is not set +CONFIG_CRC8=m # CONFIG_RANDOM32_SELFTEST is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y