Ssc377qe fpv build (#75)
* Add ssc377qe_fpv_generic device * ssc377qe_fpv_generic added ath9k patched drivers * Add ssc377qe region library
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_WEXT_CORE=y
|
||||
|
||||
# Atheros driver fix
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=m
|
||||
CONFIG_MAC80211_LEDS=y
|
||||
|
||||
# Allow regdb overwriting
|
||||
# CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not set
|
||||
@@ -0,0 +1,79 @@
|
||||
# Architecture
|
||||
BR2_arm=y
|
||||
BR2_cortex_a35=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
|
||||
# Toolchain
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabihf"
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_10=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/infinity6c-ssc027d.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/fragments/wext.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
|
||||
# Filesystem
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
|
||||
BR2_PACKAGE_EXFATPROGS=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_ZLIB=y
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
# BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
# BR2_PACKAGE_WIREGUARD_TOOLS=y
|
||||
BR2_PACKAGE_WIRELESS_REGDB=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||
# BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
# BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
|
||||
# BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
|
||||
# OpenIPC
|
||||
BR2_OPENIPC_SOC_VENDOR="sigmastar"
|
||||
BR2_OPENIPC_SOC_MODEL="ssc377qe"
|
||||
BR2_OPENIPC_SOC_FAMILY="infinity6c"
|
||||
BR2_OPENIPC_VARIANT="fpv"
|
||||
BR2_OPENIPC_FLASH_SIZE="16"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_DROPBEAR_OPENIPC=y
|
||||
BR2_PACKAGE_EXFAT_OPENIPC=y
|
||||
BR2_PACKAGE_IPCTOOL=y
|
||||
BR2_PACKAGE_JSONFILTER=y
|
||||
BR2_PACKAGE_LIBCURL_OPENIPC=y
|
||||
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
|
||||
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
|
||||
BR2_PACKAGE_LIBEVENT_OPENIPC=y
|
||||
BR2_PACKAGE_LIBOGG_OPENIPC=y
|
||||
# BR2_PACKAGE_LINUX_PATCHER_SIGMASTAR_DTB="infinity6c-ssc027d-s01a-demo"
|
||||
BR2_PACKAGE_MAJESTIC_FONTS=y
|
||||
BR2_PACKAGE_MAJESTIC_WEBUI=y
|
||||
BR2_PACKAGE_MAJESTIC=y
|
||||
BR2_PACKAGE_MBEDTLS_OPENIPC=y
|
||||
BR2_PACKAGE_OPUS_OPENIPC=y
|
||||
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_ATHEROS_9271=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y
|
||||
BR2_PACKAGE_LINUX_PATCHER_ATHEROS=y
|
||||
BR2_PACKAGE_RTL8733BU_OPENIPC=y
|
||||
BR2_PACKAGE_RTL88X2EU_OPENIPC=y
|
||||
BR2_PACKAGE_RTL8812AU_OPENIPC=y
|
||||
BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6C=y
|
||||
BR2_PACKAGE_VTUND_OPENIPC=y
|
||||
BR2_PACKAGE_WIFIBROADCAST_NG=y
|
||||
BR2_PACKAGE_YAML_CLI=y
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+319
@@ -0,0 +1,319 @@
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/common-init.c linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/common-init.c
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/common-init.c 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/common-init.c 2017-07-05 22:29:13.285134611 +0200
|
||||
@@ -22,14 +22,14 @@
|
||||
.band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_idx), \
|
||||
- .max_power = 20, \
|
||||
+ .max_power = 30, \
|
||||
}
|
||||
|
||||
#define CHAN5G(_freq, _idx) { \
|
||||
.band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_idx), \
|
||||
- .max_power = 20, \
|
||||
+ .max_power = 30, \
|
||||
}
|
||||
|
||||
/* Some 2 GHz radios are actually tunable on 2312-2732
|
||||
@@ -37,6 +37,27 @@
|
||||
* we have calibration data for all cards though to make
|
||||
* this static */
|
||||
static const struct ieee80211_channel ath9k_2ghz_chantable[] = {
|
||||
+ CHAN2G(2312, 34), /* Channel XX */
|
||||
+ CHAN2G(2317, 35), /* Channel XX */
|
||||
+ CHAN2G(2322, 36), /* Channel XX */
|
||||
+ CHAN2G(2327, 37), /* Channel XX */
|
||||
+ CHAN2G(2332, 38), /* Channel XX */
|
||||
+ CHAN2G(2337, 39), /* Channel XX */
|
||||
+ CHAN2G(2342, 40), /* Channel XX */
|
||||
+ CHAN2G(2347, 41), /* Channel XX */
|
||||
+ CHAN2G(2352, 42), /* Channel XX */
|
||||
+ CHAN2G(2357, 43), /* Channel XX */
|
||||
+ CHAN2G(2362, 44), /* Channel XX */
|
||||
+ CHAN2G(2367, 45), /* Channel XX */
|
||||
+ CHAN2G(2372, 46), /* Channel XX */
|
||||
+ CHAN2G(2377, 47), /* Channel XX */
|
||||
+ CHAN2G(2382, 48), /* Channel XX */
|
||||
+ CHAN2G(2387, 49), /* Channel XX */
|
||||
+ CHAN2G(2392, 50), /* Channel XX */
|
||||
+ CHAN2G(2397, 51), /* Channel XX */
|
||||
+ CHAN2G(2402, 52), /* Channel XX */
|
||||
+ CHAN2G(2407, 53), /* Channel XX */
|
||||
+
|
||||
CHAN2G(2412, 0), /* Channel 1 */
|
||||
CHAN2G(2417, 1), /* Channel 2 */
|
||||
CHAN2G(2422, 2), /* Channel 3 */
|
||||
@@ -50,7 +71,31 @@
|
||||
CHAN2G(2462, 10), /* Channel 11 */
|
||||
CHAN2G(2467, 11), /* Channel 12 */
|
||||
CHAN2G(2472, 12), /* Channel 13 */
|
||||
- CHAN2G(2484, 13), /* Channel 14 */
|
||||
+
|
||||
+ CHAN2G(2477, 13), /* Channel XX */
|
||||
+ CHAN2G(2478, 14), /* Channel XX */
|
||||
+ CHAN2G(2482, 15), /* Channel XX */
|
||||
+
|
||||
+ CHAN2G(2484, 16), /* Channel 14 */
|
||||
+
|
||||
+ CHAN2G(2487, 17), /* Channel XX */
|
||||
+ CHAN2G(2489, 18), /* Channel XX */
|
||||
+ CHAN2G(2492, 19), /* Channel XX */
|
||||
+ CHAN2G(2494, 20), /* Channel XX */
|
||||
+ CHAN2G(2497, 21), /* Channel XX */
|
||||
+ CHAN2G(2499, 22), /* Channel XX */
|
||||
+ CHAN2G(2512, 23), /* Channel XX */
|
||||
+ CHAN2G(2532, 24), /* Channel XX */
|
||||
+ CHAN2G(2572, 25), /* Channel XX */
|
||||
+ CHAN2G(2592, 26), /* Channel XX */
|
||||
+ CHAN2G(2612, 27), /* Channel XX */
|
||||
+ CHAN2G(2632, 28), /* Channel XX */
|
||||
+ CHAN2G(2652, 29), /* Channel XX */
|
||||
+ CHAN2G(2672, 30), /* Channel XX */
|
||||
+ CHAN2G(2692, 31), /* Channel XX */
|
||||
+ CHAN2G(2712, 32), /* Channel XX */
|
||||
+ CHAN2G(2732, 33), /* Channel XX */
|
||||
+
|
||||
};
|
||||
|
||||
/* Some 5 GHz radios are actually tunable on XXXX-YYYY
|
||||
@@ -58,34 +103,39 @@
|
||||
* we have calibration data for all cards though to make
|
||||
* this static */
|
||||
static const struct ieee80211_channel ath9k_5ghz_chantable[] = {
|
||||
+ CHAN5G(4920, 54), /* Channel XX */
|
||||
+ CHAN5G(4940, 55), /* Channel XX */
|
||||
+ CHAN5G(4960, 56), /* Channel XX */
|
||||
+ CHAN5G(4980, 57), /* Channel XX */
|
||||
+
|
||||
/* _We_ call this UNII 1 */
|
||||
- CHAN5G(5180, 14), /* Channel 36 */
|
||||
- CHAN5G(5200, 15), /* Channel 40 */
|
||||
- CHAN5G(5220, 16), /* Channel 44 */
|
||||
- CHAN5G(5240, 17), /* Channel 48 */
|
||||
+ CHAN5G(5180, 58), /* Channel 36 */
|
||||
+ CHAN5G(5200, 59), /* Channel 40 */
|
||||
+ CHAN5G(5220, 60), /* Channel 44 */
|
||||
+ CHAN5G(5240, 61), /* Channel 48 */
|
||||
/* _We_ call this UNII 2 */
|
||||
- CHAN5G(5260, 18), /* Channel 52 */
|
||||
- CHAN5G(5280, 19), /* Channel 56 */
|
||||
- CHAN5G(5300, 20), /* Channel 60 */
|
||||
- CHAN5G(5320, 21), /* Channel 64 */
|
||||
+ CHAN5G(5260, 62), /* Channel 52 */
|
||||
+ CHAN5G(5280, 63), /* Channel 56 */
|
||||
+ CHAN5G(5300, 64), /* Channel 60 */
|
||||
+ CHAN5G(5320, 65), /* Channel 64 */
|
||||
/* _We_ call this "Middle band" */
|
||||
- CHAN5G(5500, 22), /* Channel 100 */
|
||||
- CHAN5G(5520, 23), /* Channel 104 */
|
||||
- CHAN5G(5540, 24), /* Channel 108 */
|
||||
- CHAN5G(5560, 25), /* Channel 112 */
|
||||
- CHAN5G(5580, 26), /* Channel 116 */
|
||||
- CHAN5G(5600, 27), /* Channel 120 */
|
||||
- CHAN5G(5620, 28), /* Channel 124 */
|
||||
- CHAN5G(5640, 29), /* Channel 128 */
|
||||
- CHAN5G(5660, 30), /* Channel 132 */
|
||||
- CHAN5G(5680, 31), /* Channel 136 */
|
||||
- CHAN5G(5700, 32), /* Channel 140 */
|
||||
+ CHAN5G(5500, 66), /* Channel 100 */
|
||||
+ CHAN5G(5520, 67), /* Channel 104 */
|
||||
+ CHAN5G(5540, 68), /* Channel 108 */
|
||||
+ CHAN5G(5560, 69), /* Channel 112 */
|
||||
+ CHAN5G(5580, 70), /* Channel 116 */
|
||||
+ CHAN5G(5600, 71), /* Channel 120 */
|
||||
+ CHAN5G(5620, 72), /* Channel 124 */
|
||||
+ CHAN5G(5640, 73), /* Channel 128 */
|
||||
+ CHAN5G(5660, 74), /* Channel 132 */
|
||||
+ CHAN5G(5680, 75), /* Channel 136 */
|
||||
+ CHAN5G(5700, 76), /* Channel 140 */
|
||||
/* _We_ call this UNII 3 */
|
||||
- CHAN5G(5745, 33), /* Channel 149 */
|
||||
- CHAN5G(5765, 34), /* Channel 153 */
|
||||
- CHAN5G(5785, 35), /* Channel 157 */
|
||||
- CHAN5G(5805, 36), /* Channel 161 */
|
||||
- CHAN5G(5825, 37), /* Channel 165 */
|
||||
+ CHAN5G(5745, 77), /* Channel 149 */
|
||||
+ CHAN5G(5765, 78), /* Channel 153 */
|
||||
+ CHAN5G(5785, 79), /* Channel 157 */
|
||||
+ CHAN5G(5805, 80), /* Channel 161 */
|
||||
+ CHAN5G(5825, 81), /* Channel 165 */
|
||||
};
|
||||
|
||||
/* Atheros hardware rate code addition for short premble */
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/eeprom_4k.c linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2017-07-08 10:26:46.864373518 +0200
|
||||
@@ -18,6 +18,9 @@
|
||||
#include "hw.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
+extern u8 tx_power_man;
|
||||
+extern u8 thresh62_man;
|
||||
+
|
||||
static int ath9k_hw_4k_get_eeprom_ver(struct ath_hw *ah)
|
||||
{
|
||||
return ((ah->eeprom.map4k.baseEepHeader.version >> 12) & 0xF);
|
||||
@@ -636,8 +639,12 @@
|
||||
if (test)
|
||||
return;
|
||||
|
||||
- for (i = 0; i < Ar5416RateSize; i++)
|
||||
- ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
|
||||
+ for (i = 0; i < Ar5416RateSize; i++) {
|
||||
+// ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
|
||||
+ ratesArray[i] = tx_power_man;
|
||||
+ }
|
||||
+
|
||||
+ printk("ATH: TX Power set: %d\n",tx_power_man);
|
||||
|
||||
ENABLE_REGWRITE_BUFFER(ah);
|
||||
|
||||
@@ -1009,10 +1016,8 @@
|
||||
if (AR_SREV_9271_10(ah))
|
||||
REG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_A2_RX_ON,
|
||||
pModal->txEndToRxOn);
|
||||
- REG_RMW_FIELD(ah, AR_PHY_CCA, AR9280_PHY_CCA_THRESH62,
|
||||
- pModal->thresh62);
|
||||
- REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62,
|
||||
- pModal->thresh62);
|
||||
+ REG_RMW_FIELD(ah, AR_PHY_CCA, AR9280_PHY_CCA_THRESH62, thresh62_man);
|
||||
+ REG_RMW_FIELD(ah, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, thresh62_man);
|
||||
|
||||
if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >=
|
||||
AR5416_EEP_MINOR_VER_2) {
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/eeprom_9287.c linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/eeprom_9287.c
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2017-07-08 09:12:25.724306578 +0200
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "hw.h"
|
||||
#include "ar9002_phy.h"
|
||||
|
||||
+extern u8 tx_power_man;
|
||||
+
|
||||
#define SIZE_EEPROM_AR9287 (sizeof(struct ar9287_eeprom) / sizeof(u16))
|
||||
|
||||
static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah)
|
||||
@@ -762,8 +764,12 @@
|
||||
if (test)
|
||||
return;
|
||||
|
||||
- for (i = 0; i < Ar5416RateSize; i++)
|
||||
- ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
|
||||
+ for (i = 0; i < Ar5416RateSize; i++) {
|
||||
+// ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
|
||||
+ ratesArray[i] = tx_power_man;
|
||||
+ }
|
||||
+
|
||||
+ printk("ATH: TX Power set: %d\n",tx_power_man);
|
||||
|
||||
ENABLE_REGWRITE_BUFFER(ah);
|
||||
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hif_usb.h linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hif_usb.h
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hif_usb.h 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hif_usb.h 2017-07-05 22:45:17.405149078 +0200
|
||||
@@ -61,7 +61,7 @@
|
||||
#define MAX_PKT_NUM_IN_TRANSFER 10
|
||||
|
||||
#define MAX_REG_OUT_URB_NUM 1
|
||||
-#define MAX_REG_IN_URB_NUM 64
|
||||
+#define MAX_REG_IN_URB_NUM 8
|
||||
|
||||
#define MAX_REG_IN_BUF_SIZE 64
|
||||
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hw.c linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hw.c
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hw.c 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hw.c 2017-07-08 10:33:39.816379714 +0200
|
||||
@@ -37,6 +37,40 @@
|
||||
MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
+u8 tx_power_man = 58; //manual power
|
||||
+u8 cwmin_man = 7;
|
||||
+u8 cwmax_man = 15;
|
||||
+u8 aifs_man = 2;
|
||||
+u8 cck_sifs_man = 10;
|
||||
+u8 ofdm_sifs_man = 16;
|
||||
+u8 slottime_man = 9;
|
||||
+u8 thresh62_man = 28;
|
||||
+
|
||||
+module_param_named(txpower,tx_power_man,byte,0444);
|
||||
+MODULE_PARM_DESC(txpower,"Manual TX power setting, default 58, max 63");
|
||||
+
|
||||
+module_param_named(cwmin,cwmin_man,byte,0444);
|
||||
+MODULE_PARM_DESC(cwmin,"CWMIN setting, 0-255, default 7");
|
||||
+
|
||||
+module_param_named(cwmax,cwmax_man,byte,0444);
|
||||
+MODULE_PARM_DESC(cwmax,"CWMAX setting, 0-255, default 15");
|
||||
+
|
||||
+module_param_named(aifs,aifs_man,byte,0444);
|
||||
+MODULE_PARM_DESC(aifs,"AIFS setting, default 2");
|
||||
+
|
||||
+module_param_named(cck_sifs,cck_sifs_man,byte,0444);
|
||||
+MODULE_PARM_DESC(cck_sifs,"CCK SIFS setting, default 10");
|
||||
+
|
||||
+module_param_named(ofdm_sifs,ofdm_sifs_man,byte,0444);
|
||||
+MODULE_PARM_DESC(ofdm_sifs,"OFDM SIFS setting, default 16");
|
||||
+
|
||||
+module_param_named(slottime,slottime_man,byte,0444);
|
||||
+MODULE_PARM_DESC(slottime,"Slottime setting, default 9");
|
||||
+
|
||||
+module_param_named(thresh62,thresh62_man,byte,0444);
|
||||
+MODULE_PARM_DESC(thresh62,"CCA THRESH62 setting, default 28");
|
||||
+
|
||||
+
|
||||
static void ath9k_hw_set_clockrate(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1076,7 +1110,8 @@
|
||||
}
|
||||
|
||||
/* As defined by IEEE 802.11-2007 17.3.8.6 */
|
||||
- slottime += 3 * ah->coverage_class;
|
||||
+// slottime += 3 * ah->coverage_class;
|
||||
+ slottime = slottime_man;
|
||||
acktimeout = slottime + sifstime + ack_offset;
|
||||
ctstimeout = acktimeout;
|
||||
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hw.h linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hw.h
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/hw.h 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/hw.h 2017-07-05 22:50:22.949153662 +0200
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
#define ATH9K_RSSI_BAD -128
|
||||
|
||||
-#define ATH9K_NUM_CHANNELS 38
|
||||
+#define ATH9K_NUM_CHANNELS 82
|
||||
|
||||
/* Register read/write primitives */
|
||||
#define REG_WRITE(_ah, _reg, _val) \
|
||||
diff -Naur linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/mac.c linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/mac.c
|
||||
--- linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367/drivers/net/wireless/ath/ath9k/mac.c 2017-05-15 17:23:14.000000000 +0200
|
||||
+++ linux-1423ac8bfbfb2a9d092b604c676e7a58a5fa3367.patched/drivers/net/wireless/ath/ath9k/mac.c 2017-07-08 10:12:18.540360489 +0200
|
||||
@@ -18,6 +18,14 @@
|
||||
#include "hw-ops.h"
|
||||
#include <linux/export.h>
|
||||
|
||||
+extern u8 cwmin_man;
|
||||
+extern u8 cwmax_man;
|
||||
+extern u8 aifs_man;
|
||||
+extern u8 cck_sifs;
|
||||
+extern u8 ofdm_sifs;
|
||||
+
|
||||
+
|
||||
+
|
||||
static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah,
|
||||
struct ath9k_tx_queue_info *qi)
|
||||
{
|
||||
@@ -216,7 +224,8 @@
|
||||
if (qinfo->tqi_aifs != ATH9K_TXQ_USEDEFAULT)
|
||||
qi->tqi_aifs = min(qinfo->tqi_aifs, 255U);
|
||||
else
|
||||
- qi->tqi_aifs = INIT_AIFS;
|
||||
+// qi->tqi_aifs = INIT_AIFS;
|
||||
+ qi->tqi_aifs = aifs_man;
|
||||
if (qinfo->tqi_cwmin != ATH9K_TXQ_USEDEFAULT) {
|
||||
cw = min(qinfo->tqi_cwmin, 1024U);
|
||||
qi->tqi_cwmin = 1;
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||
index f15e7bd..3a46707 100644
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -33,12 +33,12 @@ static int __ath_regd_init(struct ath_regulatory *reg);
|
||||
*/
|
||||
|
||||
/* Only these channels all allow active scan on all world regulatory domains */
|
||||
-#define ATH_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
|
||||
+#define ATH_2GHZ_CH01_11 REG_RULE(2312-10, 2462+10, 40, 0, 30, 0)
|
||||
|
||||
/* We enable active scan on these a case by case basis by regulatory domain */
|
||||
#define ATH_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
|
||||
NL80211_RRF_NO_IR)
|
||||
-#define ATH_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
|
||||
+#define ATH_2GHZ_CH14 REG_RULE(2484-10, 2732+10, 40, 0, 30,\
|
||||
NL80211_RRF_NO_IR | \
|
||||
NL80211_RRF_NO_OFDM)
|
||||
|
||||
@@ -77,9 +77,8 @@ static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH_2GHZ_CH01_11,
|
||||
- ATH_2GHZ_CH12_13,
|
||||
- ATH_5GHZ_NO_MIDBAND,
|
||||
+ ATH_2GHZ_ALL,
|
||||
+ ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -88,8 +87,8 @@ static const struct ieee80211_regdomain ath_world_regdom_64 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH_2GHZ_CH01_11,
|
||||
- ATH_5GHZ_NO_MIDBAND,
|
||||
+ ATH_2GHZ_ALL,
|
||||
+ ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -98,7 +97,7 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH_2GHZ_CH01_11,
|
||||
+ ATH_2GHZ_ALL,
|
||||
ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -108,8 +107,7 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH_2GHZ_CH01_11,
|
||||
- ATH_2GHZ_CH12_13,
|
||||
+ ATH_2GHZ_ALL,
|
||||
ATH_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -258,9 +256,7 @@ static bool ath_is_radar_freq(u16 center_freq,
|
||||
struct ath_regulatory *reg)
|
||||
|
||||
{
|
||||
- if (reg->country_code == CTRY_INDIA)
|
||||
- return (center_freq >= 5500 && center_freq <= 5700);
|
||||
- return (center_freq >= 5260 && center_freq <= 5700);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void ath_force_clear_no_ir_chan(struct wiphy *wiphy,
|
||||
--
|
||||
2.39.2
|
||||
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c 2023-10-29 23:13:23.000000000 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c 2023-10-29 23:51:03.576486582 +0200
|
||||
@@ -45,6 +45,12 @@
|
||||
u8 ofdm_sifs_man = 16;
|
||||
u8 slottime_man = 9;
|
||||
u8 thresh62_man = 28;
|
||||
+u8 disable_CS = 1;
|
||||
+u8 disable_CS_man = 0;
|
||||
+u8 CTSTimeOut_man = 0;
|
||||
+u8 ACKTimeOut_man = 0;
|
||||
+u8 CTSTimeOut = 0;
|
||||
+u8 ACKTimeOut = 0;
|
||||
|
||||
module_param_named(txpower, tx_power_man, byte, 0444);
|
||||
MODULE_PARM_DESC(txpower, "Manual TX power setting, default 58, max 63");
|
||||
@@ -70,6 +76,16 @@
|
||||
module_param_named(thresh62, thresh62_man, byte, 0444);
|
||||
MODULE_PARM_DESC(thresh62, "CCA THRESH62 setting, default 28");
|
||||
|
||||
+module_param_named(disable_CS,disable_CS_man,byte,0444);
|
||||
+MODULE_PARM_DESC(disable_CS,"Disable Carrier Sense default 0");
|
||||
+
|
||||
+module_param_named(CTSTimeOut,CTSTimeOut_man,byte,0444);
|
||||
+MODULE_PARM_DESC(CTSTimeOut,"CTSTimeOut default 0");
|
||||
+
|
||||
+module_param_named(ACKTimeOut,ACKTimeOut_man,byte,0444);
|
||||
+MODULE_PARM_DESC(ACKTimeOut,"ACKTimeOut default 0");
|
||||
+
|
||||
+
|
||||
static void ath9k_hw_set_clockrate(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1052,6 +1068,7 @@
|
||||
int sifstime;
|
||||
int rx_lat = 0, tx_lat = 0, eifs = 0;
|
||||
u32 reg;
|
||||
+ int qnum=0;
|
||||
|
||||
ath_dbg(ath9k_hw_common(ah), RESET, "ah->misc_mode 0x%x\n",
|
||||
ah->misc_mode);
|
||||
@@ -1134,6 +1151,26 @@
|
||||
ah->dynack.ackto = acktimeout;
|
||||
}
|
||||
|
||||
+ bool register_override=false;
|
||||
+ if (ofdm_sifs_man!=16) {
|
||||
+ sifstime=ofdm_sifs_man;
|
||||
+ eifs=ofdm_sifs_man;
|
||||
+ register_override=true;
|
||||
+ }
|
||||
+ if (ACKTimeOut_man!=0){
|
||||
+ acktimeout= ACKTimeOut_man;
|
||||
+ register_override=true;
|
||||
+ }
|
||||
+ if (CTSTimeOut_man!=0){
|
||||
+ ctstimeout=CTSTimeOut_man;
|
||||
+ register_override=true;
|
||||
+ }
|
||||
+
|
||||
+ if (cck_sifs_man!=10){
|
||||
+ tx_lat=cck_sifs_man*10;
|
||||
+ register_override=true;
|
||||
+ }
|
||||
+
|
||||
ath9k_hw_set_sifs_time(ah, sifstime);
|
||||
ath9k_hw_setslottime(ah, slottime);
|
||||
ath9k_hw_set_ack_timeout(ah, acktimeout);
|
||||
@@ -1148,6 +1185,19 @@
|
||||
SM(tx_lat, AR_USEC_TX_LAT),
|
||||
AR_USEC_TX_LAT | AR_USEC_RX_LAT | AR_USEC_USEC);
|
||||
|
||||
+ ath_err(common,"SET rx_lat:%d, tx_lat:%d, sifstime:%d, eifs:%d, slottime:%d, acktimeout:%d, ctstimeout:%d",rx_lat, tx_lat, sifstime, eifs, slottime, acktimeout, ctstimeout);
|
||||
+
|
||||
+ if(disable_CS_man==1){
|
||||
+ ath_err(ath9k_hw_common(ah), "Disabled Carrier Sense! %d !\n",disable_CS, disable_CS_man);
|
||||
+ REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_RX_CLEAR);
|
||||
+ REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_IGNORE_VIRT_CS);
|
||||
+ REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
||||
+ }
|
||||
+
|
||||
+ if (register_override || disable_CS_man==1){
|
||||
+ for (qnum=0;qnum<7;qnum++)
|
||||
+ REG_WRITE(ah, AR_DLCL_IFS(qnum), 0);
|
||||
+ }
|
||||
if (IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))
|
||||
REG_RMW(ah, AR_TXSIFS,
|
||||
sifstime | SM(ack_shift, AR_TXSIFS_ACK_SHIFT),
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c 2023-10-29 23:13:23.000000000 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c 2023-10-29 23:56:49.383741779 +0200
|
||||
@@ -18,6 +18,12 @@
|
||||
#include "hw-ops.h"
|
||||
#include <linux/export.h>
|
||||
|
||||
+extern u8 cwmin_man;
|
||||
+extern u8 cwmax_man;
|
||||
+extern u8 aifs_man;
|
||||
+extern u8 cck_sifs;
|
||||
+extern u8 ofdm_sifs;
|
||||
+
|
||||
static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah,
|
||||
struct ath9k_tx_queue_info *qi)
|
||||
{
|
||||
@@ -217,6 +217,7 @@
|
||||
qi->tqi_aifs = min(qinfo->tqi_aifs, 255U);
|
||||
else
|
||||
qi->tqi_aifs = aifs_man;
|
||||
+
|
||||
if (qinfo->tqi_cwmin != ATH9K_TXQ_USEDEFAULT) {
|
||||
cw = min(qinfo->tqi_cwmin, 1024U);
|
||||
qi->tqi_cwmin = 1;
|
||||
@@ -245,6 +246,21 @@
|
||||
qi->tqi_burstTime = qinfo->tqi_burstTime;
|
||||
qi->tqi_readyTime = qinfo->tqi_readyTime;
|
||||
|
||||
+ bool override=false;
|
||||
+ if (cwmax_man!=15){
|
||||
+ qi->tqi_cwmax=cwmax_man;
|
||||
+ override=true;
|
||||
+ }
|
||||
+ if (cwmin_man!=7){
|
||||
+ qi->tqi_cwmin=cwmin_man;
|
||||
+ override=true;
|
||||
+ }
|
||||
+ if (aifs_man!=2){
|
||||
+ qi->tqi_aifs = aifs_man;
|
||||
+ override=true;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
switch (qinfo->tqi_subtype) {
|
||||
case ATH9K_WME_UPSD:
|
||||
if (qi->tqi_type == ATH9K_TX_QUEUE_DATA)
|
||||
@@ -254,6 +270,11 @@
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (override){
|
||||
+ REG_WRITE(ah, AR_DLCL_IFS(q), 0);
|
||||
+ ath_err(common, "SET cwmax:%d, cwmin:%d, aifs:%d for queu:%d", qi->tqi_cwmax, qi->tqi_cwmin, qi->tqi_aifs,q);
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_set_txq_props);
|
||||
|
||||
+218
@@ -0,0 +1,218 @@
|
||||
diff --git a/ath.h b/ath.h
|
||||
index da7a7c8..02765fd 100644
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -151,6 +151,7 @@ struct ath_common {
|
||||
int debug_mask;
|
||||
enum ath_device_state state;
|
||||
unsigned long op_flags;
|
||||
+ u32 chan_bw;
|
||||
|
||||
struct ath_ani ani;
|
||||
|
||||
@@ -179,6 +180,7 @@ struct ath_common {
|
||||
const struct ath_ops *ops;
|
||||
const struct ath_bus_ops *bus_ops;
|
||||
const struct ath_ps_ops *ps_ops;
|
||||
+ const struct ieee80211_ops *ieee_ops;
|
||||
|
||||
bool btcoex_enabled;
|
||||
bool disable_ani;
|
||||
diff --git a/ath9k/common-debug.c b/ath9k/common-debug.c
|
||||
index 84afcf7..2c55389 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common-debug.c
|
||||
@@ -259,3 +259,56 @@ void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
|
||||
&fops_phy_err);
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_cmn_debug_phy_err);
|
||||
+
|
||||
+
|
||||
+static ssize_t read_file_chan_bw(struct file *file, char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct ath_hw *ah = file->private_data;
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ char buf[32];
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ len = sprintf(buf, "0x%08x\n", common->chan_bw);
|
||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
+}
|
||||
+
|
||||
+static ssize_t write_file_chan_bw(struct file *file, const char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct ath_hw *ah = file->private_data;
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ unsigned long chan_bw;
|
||||
+ char buf[32];
|
||||
+ ssize_t len;
|
||||
+
|
||||
+ len = min(count, sizeof(buf) - 1);
|
||||
+ if (copy_from_user(buf, user_buf, len))
|
||||
+ return -EFAULT;
|
||||
+
|
||||
+ buf[len] = '\0';
|
||||
+ if (kstrtoul(buf, 0, &chan_bw))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ common->chan_bw = chan_bw;
|
||||
+ if (!test_bit(ATH_OP_INVALID, &common->op_flags))
|
||||
+ common->ieee_ops->config(ah->hw, IEEE80211_CONF_CHANGE_CHANNEL);
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations fops_chanbw = {
|
||||
+ .read = read_file_chan_bw,
|
||||
+ .write = write_file_chan_bw,
|
||||
+ .open = simple_open,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .llseek = default_llseek,
|
||||
+};
|
||||
+
|
||||
+void ath9k_cmn_debug_chanbw(struct dentry *debugfs_phy,
|
||||
+ struct ath_hw *ah)
|
||||
+{
|
||||
+ debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, debugfs_phy, ah,
|
||||
+ &fops_chanbw);
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath9k_cmn_debug_chanbw);
|
||||
\ No newline at end of file
|
||||
diff --git a/ath9k/common-debug.h b/ath9k/common-debug.h
|
||||
index 7c97884..8972ab4 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/common-debug.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common-debug.h
|
||||
@@ -64,6 +64,8 @@ void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
|
||||
struct ath_hw *ah);
|
||||
void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
|
||||
struct ath_hw *ah);
|
||||
+void ath9k_cmn_debug_chanbw(struct dentry *debugfs_phy,
|
||||
+ struct ath_hw *ah);
|
||||
void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
|
||||
struct ath_rx_status *rs);
|
||||
void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
|
||||
diff --git a/ath9k/common.c b/ath9k/common.c
|
||||
index b80e08b..dbf4956 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -296,11 +296,13 @@ EXPORT_SYMBOL(ath9k_cmn_get_hw_crypto_keytype);
|
||||
/*
|
||||
* Update internal channel flags.
|
||||
*/
|
||||
-static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
|
||||
+static void ath9k_cmn_update_ichannel(struct ath_common *common,
|
||||
+ struct ath9k_channel *ichan,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct ieee80211_channel *chan = chandef->chan;
|
||||
u16 flags = 0;
|
||||
+ int width;
|
||||
|
||||
ichan->channel = chan->center_freq;
|
||||
ichan->chan = chan;
|
||||
@@ -308,7 +310,19 @@ static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
|
||||
if (chan->band == NL80211_BAND_5GHZ)
|
||||
flags |= CHANNEL_5GHZ;
|
||||
|
||||
- switch (chandef->width) {
|
||||
+ switch (common->chan_bw) {
|
||||
+ case 5:
|
||||
+ width = NL80211_CHAN_WIDTH_5;
|
||||
+ break;
|
||||
+ case 10:
|
||||
+ width = NL80211_CHAN_WIDTH_10;
|
||||
+ break;
|
||||
+ default:
|
||||
+ width = chandef->width;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ switch (width) {
|
||||
case NL80211_CHAN_WIDTH_5:
|
||||
flags |= CHANNEL_QUARTER;
|
||||
break;
|
||||
@@ -341,10 +355,11 @@ struct ath9k_channel *ath9k_cmn_get_channel(struct ieee80211_hw *hw,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct ieee80211_channel *curchan = chandef->chan;
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_channel *channel;
|
||||
|
||||
channel = &ah->channels[curchan->hw_value];
|
||||
- ath9k_cmn_update_ichannel(channel, chandef);
|
||||
+ ath9k_cmn_update_ichannel(common, channel, chandef);
|
||||
|
||||
return channel;
|
||||
}
|
||||
diff --git a/ath9k/debug.c b/ath9k/debug.c
|
||||
index c56e40f..6112431 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1385,6 +1385,7 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
|
||||
ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
+ ath9k_cmn_debug_chanbw(sc->debug.debugfs_phy, sc->sc_ah);
|
||||
|
||||
debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR,
|
||||
sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
|
||||
diff --git a/ath9k/htc_drv_debug.c b/ath9k/htc_drv_debug.c
|
||||
index dc79afd..2c08a41 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
|
||||
@@ -519,6 +519,7 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
|
||||
|
||||
ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah);
|
||||
ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah);
|
||||
+ ath9k_cmn_debug_chanbw(priv->debug.debugfs_phy, priv->ah);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/ath9k/htc_drv_init.c b/ath9k/htc_drv_init.c
|
||||
index b65c1b6..66b73da 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
|
||||
@@ -211,7 +211,7 @@ static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid,
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
- dev_info(priv->dev, "ath9k_htc: HTC initialized with %d credits\n",
|
||||
+ dev_info(priv->dev, "ath9k_htc: HTC initialized 2322~2712Mhz,ChannelBandwidth 10,5 with %d credits\n",
|
||||
priv->htc->credits);
|
||||
|
||||
return 0;
|
||||
@@ -633,6 +633,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv,
|
||||
priv->ah = ah;
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
+ common->ieee_ops = &ath9k_htc_ops;
|
||||
common->ops = &ah->reg_ops;
|
||||
common->ps_ops = &ath9k_htc_ps_ops;
|
||||
common->bus_ops = &ath9k_usb_bus_ops;
|
||||
@@ -750,9 +751,9 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
|
||||
|
||||
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |
|
||||
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
|
||||
- WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
-
|
||||
- hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
|
||||
+ WIPHY_FLAG_HAS_CHANNEL_SWITCH |
|
||||
+ WIPHY_FLAG_SUPPORTS_5_10_MHZ |
|
||||
+ WIPHY_FLAG_SUPPORTS_TDLS;
|
||||
|
||||
hw->queues = 4;
|
||||
hw->max_listen_interval = 1;
|
||||
diff --git a/ath9k/init.c b/ath9k/init.c
|
||||
index 297d4bb..50f832f 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -592,6 +592,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
|
||||
if (!ath9k_is_chanctx_enabled())
|
||||
sc->cur_chan->hw_queue_base = 0;
|
||||
|
||||
+ common->ieee_ops = &ath9k_ops;
|
||||
common->ops = &ah->reg_ops;
|
||||
common->bus_ops = bus_ops;
|
||||
common->ps_ops = &ath9k_ps_ops;
|
||||
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
#
|
||||
# linux-patcher
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LINUX_PATCHER_DEPENDENCIES = linux
|
||||
export UIMAGE_NAME = Linux-$(LINUX_VERSION_PROBED)-$(OPENIPC_SOC_MODEL)
|
||||
|
||||
# Exclude buildroot yylloc patches
|
||||
LINUX_POST_PATCH_HOOKS = LINUX_APPLY_LOCAL_PATCHES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PATCHER_ATHEROS),y)
|
||||
define LINUX_PATCHER_CONFIG_ATHEROS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FW_LOADER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_WLAN)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_MAC80211,m)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_ATH9K,m)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_ATH9K_HTC,m)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_LINUX_PATCHER_SIGMASTAR_DTB),"")
|
||||
define LINUX_PATCHER_CONFIG_SIGMASTAR_DTB
|
||||
$(call KCONFIG_SET_OPT,CONFIG_SS_DTB_NAME,$(BR2_PACKAGE_LINUX_PATCHER_SIGMASTAR_DTB))
|
||||
endef
|
||||
endif
|
||||
|
||||
define LINUX_PATCHER_LINUX_CONFIG_FIXUPS
|
||||
$(LINUX_PATCHER_CONFIG_ATHEROS)
|
||||
$(LINUX_PATCHER_CONFIG_SIGMASTAR_DTB)
|
||||
endef
|
||||
|
||||
#Disable regdb signing so that it can be overwritten on the cam
|
||||
define DISABLE_SIGNED_REGDB_IN_KCONFIG
|
||||
@echo "[force-nosign] Mangling net/wireless/Kconfig"
|
||||
# $(SED) already has -i -e; don't add extra -i/-e
|
||||
$(SED) '/^config CFG80211_REQUIRE_SIGNED_REGDB$$/,/^config /{ \
|
||||
s/^[[:space:]]*depends on .*/\tdepends on n/; \
|
||||
s/^[[:space:]]*default[[:space:]]*y/\tdefault n/; \
|
||||
}' $(LINUX_DIR)/net/wireless/Kconfig
|
||||
@echo "[force-nosign] Resulting Kconfig stanza:"
|
||||
@sed -n '/^config CFG80211_REQUIRE_SIGNED_REGDB$$/,/^config /p' \
|
||||
$(LINUX_DIR)/net/wireless/Kconfig
|
||||
endef
|
||||
LINUX_POST_PATCH_HOOKS += DISABLE_SIGNED_REGDB_IN_KCONFIG
|
||||
|
||||
# For some reasong cant enable this the simple way, always get removed
|
||||
define FORCE_MAC80211_LEDS_IN_KCONFIG
|
||||
@echo "[force-mac80211-leds] Mangling net/mac80211/Kconfig"
|
||||
$(SED) '/^config MAC80211_LEDS$$/,/^config /{ \
|
||||
s/^[[:space:]]*depends on .*/\tdepends on y/; \
|
||||
s/^[[:space:]]*default[[:space:]]*n/\tdefault y/; \
|
||||
}' $(LINUX_DIR)/net/mac80211/Kconfig
|
||||
@echo "[force-mac80211-leds] Resulting Kconfig stanza:"
|
||||
@sed -n '/^config MAC80211_LEDS$$/,/^config /p' \
|
||||
$(LINUX_DIR)/net/mac80211/Kconfig
|
||||
endef
|
||||
LINUX_POST_PATCH_HOOKS += FORCE_MAC80211_LEDS_IN_KCONFIG
|
||||
|
||||
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user