mirror of
https://github.com/svpcom/wfb-ng.git
synced 2025-02-20 23:43:49 -04:00
916 lines
33 KiB
Diff
916 lines
33 KiB
Diff
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/common-init.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/common-init.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/common-init.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/common-init.c 2016-06-19 18:35:17.000000000 +0200
|
|
@@ -16,20 +16,22 @@
|
|
|
|
/* We use the hw_value as an index into our private channel structure */
|
|
|
|
+ // CHANGES: Added additional channels, increased .max_power to 30
|
|
+
|
|
#include "common.h"
|
|
|
|
#define CHAN2G(_freq, _idx) { \
|
|
.band = IEEE80211_BAND_2GHZ, \
|
|
.center_freq = (_freq), \
|
|
.hw_value = (_idx), \
|
|
- .max_power = 20, \
|
|
+ .max_power = 30, \
|
|
}
|
|
|
|
#define CHAN5G(_freq, _idx) { \
|
|
.band = IEEE80211_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 +39,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 -19 */
|
|
+ CHAN2G(2317, 35), /* Channel -18 */
|
|
+ CHAN2G(2322, 36), /* Channel -17 */
|
|
+ CHAN2G(2327, 37), /* Channel -16 */
|
|
+ CHAN2G(2332, 38), /* Channel -15 */
|
|
+ CHAN2G(2337, 39), /* Channel -14 */
|
|
+ CHAN2G(2342, 40), /* Channel -13 */
|
|
+ CHAN2G(2347, 41), /* Channel -12 */
|
|
+ CHAN2G(2352, 42), /* Channel -11 */
|
|
+ CHAN2G(2357, 43), /* Channel -10 */
|
|
+ CHAN2G(2362, 44), /* Channel -9 */
|
|
+ CHAN2G(2367, 45), /* Channel -8 */
|
|
+ CHAN2G(2372, 46), /* Channel -7 */
|
|
+ CHAN2G(2377, 47), /* Channel -6 */
|
|
+ CHAN2G(2382, 48), /* Channel -5 */
|
|
+ CHAN2G(2387, 49), /* Channel -4 */
|
|
+ CHAN2G(2392, 50), /* Channel -3 */
|
|
+ CHAN2G(2397, 51), /* Channel -2 */
|
|
+ CHAN2G(2402, 52), /* Channel -1 */
|
|
+ CHAN2G(2407, 53), /* Channel 0 */
|
|
+
|
|
CHAN2G(2412, 0), /* Channel 1 */
|
|
CHAN2G(2417, 1), /* Channel 2 */
|
|
CHAN2G(2422, 2), /* Channel 3 */
|
|
@@ -50,7 +73,30 @@
|
|
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 +104,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 -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/eeprom_4k.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/eeprom_4k.c 2016-11-27 22:29:27.402201916 +0100
|
|
@@ -682,8 +682,12 @@
|
|
if (test)
|
|
return;
|
|
|
|
- for (i = 0; i < Ar5416RateSize; i++)
|
|
- ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
|
|
+// CHANGES: set 58 for every data rate
|
|
+
|
|
+ for (i = 0; i < Ar5416RateSize; i++) {
|
|
+// ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
|
|
+ ratesArray[i] = 58;
|
|
+ }
|
|
|
|
ENABLE_REGWRITE_BUFFER(ah);
|
|
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/eeprom_9287.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/eeprom_9287.c 2016-07-04 21:59:24.000000000 +0200
|
|
@@ -799,7 +799,8 @@
|
|
return;
|
|
|
|
for (i = 0; i < Ar5416RateSize; i++)
|
|
- ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
|
|
+// ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
|
|
+ ratesArray[i] = 58;
|
|
|
|
ENABLE_REGWRITE_BUFFER(ah);
|
|
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hif_usb.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hif_usb.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hif_usb.c 2016-11-27 22:31:59.746196470 +0100
|
|
@@ -1085,10 +1085,29 @@
|
|
char index[8], *chip;
|
|
int ret;
|
|
|
|
+
|
|
+// CHANGES
|
|
+
|
|
+/* int randwait;
|
|
+ int mstimerandwait;
|
|
+
|
|
+
|
|
+
|
|
+ get_random_bytes(&randwait, sizeof(int));
|
|
+ randwait = randwait % 10;
|
|
+
|
|
+ mstimerandwait = randwait * 100;
|
|
+
|
|
+ msleep(mstimerandwait);
|
|
+*/
|
|
+ msleep(1000);
|
|
+
|
|
+
|
|
+ // CHANGES: re-use debug firmware parameter for loading firmwares with different bitrates
|
|
if (first) {
|
|
- if (htc_use_dev_fw) {
|
|
+ if (htc_fw_bitrate) {
|
|
hif_dev->fw_minor_index = FIRMWARE_MINOR_IDX_MAX + 1;
|
|
- sprintf(index, "%s", "dev");
|
|
+ sprintf(index, "%d", htc_fw_bitrate);
|
|
} else {
|
|
hif_dev->fw_minor_index = FIRMWARE_MINOR_IDX_MAX;
|
|
sprintf(index, "%d", hif_dev->fw_minor_index);
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hif_usb.h linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hif_usb.h
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hif_usb.h 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hif_usb.h 2016-11-27 22:33:05.898194106 +0100
|
|
@@ -36,7 +36,8 @@
|
|
__stringify(MAJOR_VERSION_REQ) \
|
|
"." __stringify(FIRMWARE_MINOR_IDX_MAX) ".0.fw"
|
|
|
|
-extern int htc_use_dev_fw;
|
|
+// CHANGES: variable for firmware parameter
|
|
+extern int htc_fw_bitrate;
|
|
|
|
#define IS_AR7010_DEVICE(_v) (((_v) == AR9280_USB) || ((_v) == AR9287_USB))
|
|
|
|
@@ -61,7 +62,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 -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/htc_drv_init.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/htc_drv_init.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/htc_drv_init.c 2016-11-27 22:42:51.566173171 +0100
|
|
@@ -38,9 +38,11 @@
|
|
module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
|
|
MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
|
|
|
|
-int htc_use_dev_fw = 0;
|
|
-module_param_named(use_dev_fw, htc_use_dev_fw, int, 0444);
|
|
-MODULE_PARM_DESC(use_dev_fw, "Use development FW version");
|
|
+// CHANGES: re-use dev firmware parameter for different bitrate firmwares
|
|
+int htc_fw_bitrate = 0;
|
|
+module_param_named(fw_bitrate, htc_fw_bitrate, int, 0444);
|
|
+MODULE_PARM_DESC(fw_bitrate, "Set Firmware with bitrate to be loaded");
|
|
+
|
|
|
|
#ifdef CONFIG_MAC80211_LEDS
|
|
int ath9k_htc_led_blink = 1;
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/htc_drv_main.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/htc_drv_main.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/htc_drv_main.c 2016-11-27 22:37:15.018185201 +0100
|
|
@@ -215,6 +215,12 @@
|
|
channel->center_freq, ret);
|
|
}
|
|
|
|
+ // CHANGES: disable physical carrier sense
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_RX_CLEAR);
|
|
+
|
|
+// printk("!!! carrier sense disabled !!!\n");
|
|
+
|
|
ath9k_cmn_update_txpow(ah, priv->curtxpow, priv->txpowlimit,
|
|
&priv->curtxpow);
|
|
|
|
@@ -286,6 +292,12 @@
|
|
goto err;
|
|
}
|
|
|
|
+ // CHANGES: disable physical carrier sense
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_RX_CLEAR);
|
|
+
|
|
+// printk("!!! carrier sense disabled !!!\n");
|
|
+
|
|
ath9k_cmn_update_txpow(ah, priv->curtxpow, priv->txpowlimit,
|
|
&priv->curtxpow);
|
|
|
|
@@ -941,6 +953,13 @@
|
|
return ret;
|
|
}
|
|
|
|
+ // CHANGES: disable physical carrier sense
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
|
+// REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_RX_CLEAR);
|
|
+
|
|
+// printk("!!! carrier sense disabled !!!\n");
|
|
+
|
|
+
|
|
ath9k_cmn_update_txpow(ah, priv->curtxpow, priv->txpowlimit,
|
|
&priv->curtxpow);
|
|
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hw.h linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hw.h
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/hw.h 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/hw.h 2016-06-09 11:43:39.000000000 +0200
|
|
@@ -13,6 +13,7 @@
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
+ // CHANGES: increase NUM_CHANNELS to 82 for additional channels
|
|
|
|
#ifndef HW_H
|
|
#define HW_H
|
|
@@ -73,7 +74,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 -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/mac.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/mac.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/mac.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/mac.c 2016-06-30 17:01:25.000000000 +0200
|
|
@@ -160,7 +160,9 @@
|
|
}
|
|
|
|
REG_CLR_BIT(ah, AR_PCU_MISC, AR_PCU_FORCE_QUIET_COLL | AR_PCU_CLEAR_VMF);
|
|
- REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
|
+
|
|
+// CHANGES: do not clear disable physical carrier sense bit
|
|
+// REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
|
|
REG_CLR_BIT(ah, AR_D_GBL_IFS_MISC, AR_D_GBL_IFS_MISC_IGNORE_BACKOFF);
|
|
|
|
REG_WRITE(ah, AR_Q_TXD, 0);
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/mac.h linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/mac.h
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/ath9k/mac.h 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/ath9k/mac.h 2016-06-04 06:28:30.000000000 +0200
|
|
@@ -41,6 +41,9 @@
|
|
#define CCK_PREAMBLE_BITS 144
|
|
#define CCK_PLCP_BITS 48
|
|
|
|
+
|
|
+// CHANGES
|
|
+
|
|
#define OFDM_SIFS_TIME 16
|
|
#define OFDM_PREAMBLE_TIME 20
|
|
#define OFDM_PLCP_BITS 22
|
|
@@ -56,18 +59,18 @@
|
|
#define OFDM_PLCP_BITS_QUARTER 22
|
|
#define OFDM_SYMBOL_TIME_QUARTER 16
|
|
|
|
-#define INIT_AIFS 2
|
|
-#define INIT_CWMIN 15
|
|
-#define INIT_CWMIN_11B 31
|
|
-#define INIT_CWMAX 1023
|
|
-#define INIT_SH_RETRY 10
|
|
-#define INIT_LG_RETRY 10
|
|
-#define INIT_SSH_RETRY 32
|
|
-#define INIT_SLG_RETRY 32
|
|
-
|
|
-#define ATH9K_SLOT_TIME_6 6
|
|
-#define ATH9K_SLOT_TIME_9 9
|
|
-#define ATH9K_SLOT_TIME_20 20
|
|
+#define INIT_AIFS 0
|
|
+#define INIT_CWMIN 0
|
|
+#define INIT_CWMIN_11B 0
|
|
+#define INIT_CWMAX 0
|
|
+#define INIT_SH_RETRY 1
|
|
+#define INIT_LG_RETRY 1
|
|
+#define INIT_SSH_RETRY 3
|
|
+#define INIT_SLG_RETRY 3
|
|
+
|
|
+#define ATH9K_SLOT_TIME_6 1
|
|
+#define ATH9K_SLOT_TIME_9 1
|
|
+#define ATH9K_SLOT_TIME_20 1
|
|
|
|
#define ATH9K_TXERR_XRETRY 0x01
|
|
#define ATH9K_TXERR_FILT 0x02
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/regd.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/regd.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/ath/regd.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/ath/regd.c 2016-06-19 18:47:18.000000000 +0200
|
|
@@ -14,6 +14,12 @@
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
+// CHANGES: - changed frequency range to 2312-2732
|
|
+// - allowed channel 12, 13 and 14 for all
|
|
+// - removed 802.11b only restriction for channel 14
|
|
+// - increased txpower to 30 in ATH9K_2GHZ_ ... REGRULES
|
|
+// - always return 0 for radar detection
|
|
+
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
#include <linux/kernel.h>
|
|
@@ -32,34 +38,25 @@
|
|
* the flags on our reg_notifier() on a case by case basis.
|
|
*/
|
|
|
|
+
|
|
/* Only these channels all allow active scan on all world regulatory domains */
|
|
-#define ATH9K_2GHZ_CH01_11 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
|
|
+#define ATH9K_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 ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
|
|
- NL80211_RRF_NO_IR)
|
|
-#define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
|
|
- NL80211_RRF_NO_IR | \
|
|
- NL80211_RRF_NO_OFDM)
|
|
+#define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 30, 0)
|
|
+#define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2732+10, 40, 0, 30, 0)
|
|
|
|
/* We allow IBSS on these on a case by case basis by regulatory domain */
|
|
-#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
|
|
- NL80211_RRF_NO_IR)
|
|
-#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
|
|
- NL80211_RRF_NO_IR)
|
|
-#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\
|
|
- NL80211_RRF_NO_IR)
|
|
-
|
|
-#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
|
|
- ATH9K_2GHZ_CH12_13, \
|
|
- ATH9K_2GHZ_CH14
|
|
+#define ATH9K_5GHZ_5150_5350 REG_RULE(4920-10, 5350+10, 80, 0, 30, 0)
|
|
+#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30, 0)
|
|
+#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30, 0)
|
|
+
|
|
+#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, ATH9K_2GHZ_CH12_13, ATH9K_2GHZ_CH14
|
|
|
|
-#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
|
|
- ATH9K_5GHZ_5470_5850
|
|
+#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, ATH9K_5GHZ_5470_5850
|
|
|
|
/* This one skips what we call "mid band" */
|
|
-#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
|
- ATH9K_5GHZ_5725_5850
|
|
+#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, ATH9K_5GHZ_5725_5850
|
|
|
|
/* Can be used for:
|
|
* 0x60, 0x61, 0x62 */
|
|
@@ -77,9 +74,8 @@
|
|
.n_reg_rules = 4,
|
|
.alpha2 = "99",
|
|
.reg_rules = {
|
|
- ATH9K_2GHZ_CH01_11,
|
|
- ATH9K_2GHZ_CH12_13,
|
|
- ATH9K_5GHZ_NO_MIDBAND,
|
|
+ ATH9K_2GHZ_ALL,
|
|
+ ATH9K_5GHZ_ALL,
|
|
}
|
|
};
|
|
|
|
@@ -88,8 +84,8 @@
|
|
.n_reg_rules = 3,
|
|
.alpha2 = "99",
|
|
.reg_rules = {
|
|
- ATH9K_2GHZ_CH01_11,
|
|
- ATH9K_5GHZ_NO_MIDBAND,
|
|
+ ATH9K_2GHZ_ALL,
|
|
+ ATH9K_5GHZ_ALL,
|
|
}
|
|
};
|
|
|
|
@@ -98,7 +94,7 @@
|
|
.n_reg_rules = 3,
|
|
.alpha2 = "99",
|
|
.reg_rules = {
|
|
- ATH9K_2GHZ_CH01_11,
|
|
+ ATH9K_2GHZ_ALL,
|
|
ATH9K_5GHZ_ALL,
|
|
}
|
|
};
|
|
@@ -108,8 +104,7 @@
|
|
.n_reg_rules = 4,
|
|
.alpha2 = "99",
|
|
.reg_rules = {
|
|
- ATH9K_2GHZ_CH01_11,
|
|
- ATH9K_2GHZ_CH12_13,
|
|
+ ATH9K_2GHZ_ALL,
|
|
ATH9K_5GHZ_ALL,
|
|
}
|
|
};
|
|
@@ -256,7 +251,8 @@
|
|
/* Frequency is one where radar detection is required */
|
|
static bool ath_is_radar_freq(u16 center_freq)
|
|
{
|
|
- return (center_freq >= 5260 && center_freq <= 5700);
|
|
+// return (center_freq >= 5260 && center_freq <= 5700);
|
|
+ return 0;
|
|
}
|
|
|
|
static void ath_force_clear_no_ir_chan(struct wiphy *wiphy,
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/brcm80211/brcmfmac/core.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/brcm80211/brcmfmac/core.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/brcm80211/brcmfmac/core.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/brcm80211/brcmfmac/core.c 2016-11-27 22:48:43.586160588 +0100
|
|
@@ -1034,8 +1034,9 @@
|
|
|
|
brcmf_dbg(TRACE, "\n");
|
|
|
|
+ // CHANGES: change default interface name from wlanX to intwifiX
|
|
/* add primary networking interface */
|
|
- ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d", NULL);
|
|
+ ifp = brcmf_add_if(drvr, 0, 0, false, "intwifi%d", NULL);
|
|
if (IS_ERR(ifp))
|
|
return PTR_ERR(ifp);
|
|
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800lib.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800lib.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800lib.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800lib.c 2016-06-19 18:40:56.000000000 +0200
|
|
@@ -1485,12 +1485,13 @@
|
|
* and broadcast frames will always be accepted since
|
|
* there is no filter for it at this time.
|
|
*/
|
|
+
|
|
rt2800_register_read(rt2x00dev, RX_FILTER_CFG, ®);
|
|
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_CRC_ERROR,
|
|
!(filter_flags & FIF_FCSFAIL));
|
|
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_PHY_ERROR,
|
|
!(filter_flags & FIF_PLCPFAIL));
|
|
- rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME, 1);
|
|
+ rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_TO_ME, 0);
|
|
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_NOT_MY_BSSD, 0);
|
|
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_VER_ERROR, 1);
|
|
rt2x00_set_field32(®, RX_FILTER_CFG_DROP_MULTICAST,
|
|
@@ -1538,14 +1539,14 @@
|
|
*/
|
|
rt2800_register_read(rt2x00dev, TBTT_SYNC_CFG, ®);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_CWMIN, 0);
|
|
- rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_AIFSN, 1);
|
|
+ rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_AIFSN, 0);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_EXP_WIN, 32);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_TBTT_ADJUST, 0);
|
|
rt2800_register_write(rt2x00dev, TBTT_SYNC_CFG, reg);
|
|
} else {
|
|
rt2800_register_read(rt2x00dev, TBTT_SYNC_CFG, ®);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_CWMIN, 4);
|
|
- rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_AIFSN, 2);
|
|
+ rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_AIFSN, 0);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_BCN_EXP_WIN, 32);
|
|
rt2x00_set_field32(®, TBTT_SYNC_CFG_TBTT_ADJUST, 16);
|
|
rt2800_register_write(rt2x00dev, TBTT_SYNC_CFG, reg);
|
|
@@ -4117,7 +4118,7 @@
|
|
*/
|
|
delta += rt2800_get_txpower_reg_delta(rt2x00dev, power_level,
|
|
chan->max_power);
|
|
-
|
|
+
|
|
/*
|
|
* BBP_R1 controls TX power for all rates, it allow to set the following
|
|
* gains -12, -6, 0, +6 dBm by setting values 2, 1, 0, 3 respectively.
|
|
@@ -4135,12 +4136,13 @@
|
|
} else {
|
|
power_ctrl = 0;
|
|
}
|
|
+
|
|
rt2800_bbp_read(rt2x00dev, 1, &r1);
|
|
rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
|
|
rt2800_bbp_write(rt2x00dev, 1, r1);
|
|
|
|
offset = TX_PWR_CFG_0;
|
|
-
|
|
+
|
|
for (i = 0; i < EEPROM_TXPOWER_BYRATE_SIZE; i += 2) {
|
|
/* just to be safe */
|
|
if (offset > TX_PWR_CFG_4)
|
|
@@ -4153,6 +4155,7 @@
|
|
i, &eeprom);
|
|
|
|
is_rate_b = i ? 0 : 1;
|
|
+
|
|
/*
|
|
* TX_PWR_CFG_0: 1MBS, TX_PWR_CFG_1: 24MBS,
|
|
* TX_PWR_CFG_2: MCS4, TX_PWR_CFG_3: MCS12,
|
|
@@ -4162,8 +4165,10 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE0);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE0, txpower);
|
|
|
|
+
|
|
/*
|
|
* TX_PWR_CFG_0: 2MBS, TX_PWR_CFG_1: 36MBS,
|
|
* TX_PWR_CFG_2: MCS5, TX_PWR_CFG_3: MCS13,
|
|
@@ -4173,6 +4178,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE1);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE1, txpower);
|
|
|
|
/*
|
|
@@ -4184,6 +4190,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE2);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE2, txpower);
|
|
|
|
/*
|
|
@@ -4195,6 +4202,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE3);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE3, txpower);
|
|
|
|
/* read the next four txpower values */
|
|
@@ -4211,6 +4219,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE0);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE4, txpower);
|
|
|
|
/*
|
|
@@ -4222,6 +4231,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE1);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE5, txpower);
|
|
|
|
/*
|
|
@@ -4233,6 +4243,7 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE2);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE6, txpower);
|
|
|
|
/*
|
|
@@ -4244,8 +4255,11 @@
|
|
EEPROM_TXPOWER_BYRATE_RATE3);
|
|
txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band,
|
|
power_level, txpower, delta);
|
|
+ txpower += rt2800_txpower(rt2x00dev);
|
|
rt2x00_set_field32(®, TX_PWR_CFG_RATE7, txpower);
|
|
|
|
+
|
|
+
|
|
rt2800_register_write(rt2x00dev, offset, reg);
|
|
|
|
/* next TX_PWR_CFG register */
|
|
@@ -4871,11 +4885,12 @@
|
|
* connection problems with 11g + CTS protection. Hence, use the same
|
|
* defaults as the Ralink driver: 16 for both, CCK and OFDM SIFS.
|
|
*/
|
|
+ // CHANGES: TODO check if those are applied or not
|
|
rt2800_register_read(rt2x00dev, XIFS_TIME_CFG, ®);
|
|
- rt2x00_set_field32(®, XIFS_TIME_CFG_CCKM_SIFS_TIME, 16);
|
|
- rt2x00_set_field32(®, XIFS_TIME_CFG_OFDM_SIFS_TIME, 16);
|
|
- rt2x00_set_field32(®, XIFS_TIME_CFG_OFDM_XIFS_TIME, 4);
|
|
- rt2x00_set_field32(®, XIFS_TIME_CFG_EIFS, 314);
|
|
+ rt2x00_set_field32(®, XIFS_TIME_CFG_CCKM_SIFS_TIME, 0);
|
|
+ rt2x00_set_field32(®, XIFS_TIME_CFG_OFDM_SIFS_TIME, 0);
|
|
+ rt2x00_set_field32(®, XIFS_TIME_CFG_OFDM_XIFS_TIME, 0);
|
|
+ rt2x00_set_field32(®, XIFS_TIME_CFG_EIFS, 0);
|
|
rt2x00_set_field32(®, XIFS_TIME_CFG_BB_RXEND_ENABLE, 1);
|
|
rt2800_register_write(rt2x00dev, XIFS_TIME_CFG, reg);
|
|
|
|
@@ -7894,7 +7909,7 @@
|
|
field.bit_mask = 0xf << field.bit_offset;
|
|
|
|
rt2800_register_read(rt2x00dev, WMM_AIFSN_CFG, ®);
|
|
- rt2x00_set_field32(®, field, queue->aifs);
|
|
+ rt2x00_set_field32(®, field, 0);
|
|
rt2800_register_write(rt2x00dev, WMM_AIFSN_CFG, reg);
|
|
|
|
rt2800_register_read(rt2x00dev, WMM_CWMIN_CFG, ®);
|
|
@@ -7910,7 +7925,7 @@
|
|
|
|
rt2800_register_read(rt2x00dev, offset, ®);
|
|
rt2x00_set_field32(®, EDCA_AC0_CFG_TX_OP, queue->txop);
|
|
- rt2x00_set_field32(®, EDCA_AC0_CFG_AIFSN, queue->aifs);
|
|
+ rt2x00_set_field32(®, EDCA_AC0_CFG_AIFSN, 0);
|
|
rt2x00_set_field32(®, EDCA_AC0_CFG_CWMIN, queue->cw_min);
|
|
rt2x00_set_field32(®, EDCA_AC0_CFG_CWMAX, queue->cw_max);
|
|
rt2800_register_write(rt2x00dev, offset, reg);
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800lib.h linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800lib.h
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800lib.h 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800lib.h 2016-06-19 18:42:28.000000000 +0200
|
|
@@ -17,6 +17,8 @@
|
|
along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
+// CHANGES: Addes txpower module parameter related stuff
|
|
+
|
|
#ifndef RT2800LIB_H
|
|
#define RT2800LIB_H
|
|
|
|
@@ -43,6 +45,7 @@
|
|
|
|
int (*read_eeprom)(struct rt2x00_dev *rt2x00dev);
|
|
bool (*hwcrypt_disabled)(struct rt2x00_dev *rt2x00dev);
|
|
+ int (*txpower)(struct rt2x00_dev *rt2x00dev);
|
|
|
|
int (*drv_write_firmware)(struct rt2x00_dev *rt2x00dev,
|
|
const u8 *data, const size_t len);
|
|
@@ -129,6 +132,13 @@
|
|
return rt2800ops->hwcrypt_disabled(rt2x00dev);
|
|
}
|
|
|
|
+static inline int rt2800_txpower(struct rt2x00_dev *rt2x00dev)
|
|
+{
|
|
+ const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv;
|
|
+
|
|
+ return rt2800ops->txpower(rt2x00dev);
|
|
+}
|
|
+
|
|
static inline int rt2800_drv_write_firmware(struct rt2x00_dev *rt2x00dev,
|
|
const u8 *data, const size_t len)
|
|
{
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800usb.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800usb.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2800usb.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2800usb.c 2016-06-19 18:43:08.000000000 +0200
|
|
@@ -27,6 +27,8 @@
|
|
Supported chipsets: RT2800U.
|
|
*/
|
|
|
|
+// CHANGES: Addes txpower module parameter related stuff
|
|
+
|
|
#include <linux/delay.h>
|
|
#include <linux/etherdevice.h>
|
|
#include <linux/kernel.h>
|
|
@@ -51,6 +53,16 @@
|
|
return modparam_nohwcrypt;
|
|
}
|
|
|
|
+
|
|
+static int modparam_txpower;
|
|
+module_param_named(txpower, modparam_txpower, int, S_IRUGO);
|
|
+MODULE_PARM_DESC(txpower, "Change TXPower.");
|
|
+
|
|
+static int rt2800usb_txpower(struct rt2x00_dev *rt2x00dev)
|
|
+{
|
|
+ return modparam_txpower;
|
|
+}
|
|
+
|
|
/*
|
|
* Queue handlers.
|
|
*/
|
|
@@ -860,6 +872,7 @@
|
|
.regbusy_read = rt2x00usb_regbusy_read,
|
|
.read_eeprom = rt2800usb_read_eeprom,
|
|
.hwcrypt_disabled = rt2800usb_hwcrypt_disabled,
|
|
+ .txpower = rt2800usb_txpower,
|
|
.drv_write_firmware = rt2800usb_write_firmware,
|
|
.drv_init_registers = rt2800usb_init_registers,
|
|
.drv_get_txwi = rt2800usb_get_txwi,
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2x00.h linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2x00.h
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/drivers/net/wireless/rt2x00/rt2x00.h 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/drivers/net/wireless/rt2x00/rt2x00.h 2016-06-06 12:37:46.000000000 +0200
|
|
@@ -119,23 +119,25 @@
|
|
* Standard timing and size defines.
|
|
* These values should follow the ieee80211 specifications.
|
|
*/
|
|
+
|
|
+// CHANGES:
|
|
+
|
|
#define ACK_SIZE 14
|
|
#define IEEE80211_HEADER 24
|
|
#define PLCP 48
|
|
#define BEACON 100
|
|
#define PREAMBLE 144
|
|
#define SHORT_PREAMBLE 72
|
|
-#define SLOT_TIME 20
|
|
-#define SHORT_SLOT_TIME 9
|
|
+#define SLOT_TIME 1
|
|
+#define SHORT_SLOT_TIME 1
|
|
#define SIFS 10
|
|
#define PIFS ( SIFS + SLOT_TIME )
|
|
#define SHORT_PIFS ( SIFS + SHORT_SLOT_TIME )
|
|
#define DIFS ( PIFS + SLOT_TIME )
|
|
#define SHORT_DIFS ( SHORT_PIFS + SHORT_SLOT_TIME )
|
|
-#define EIFS ( SIFS + DIFS + \
|
|
- GET_DURATION(IEEE80211_HEADER + ACK_SIZE, 10) )
|
|
-#define SHORT_EIFS ( SIFS + SHORT_DIFS + \
|
|
- GET_DURATION(IEEE80211_HEADER + ACK_SIZE, 10) )
|
|
+#define EIFS 0
|
|
+#define SHORT_EIFS 0
|
|
+
|
|
|
|
enum rt2x00_chip_intf {
|
|
RT2X00_CHIP_INTF_PCI,
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/net/wireless/db.txt linux-abe33682e797932abcdc0fd1421f30cddc1f101a/net/wireless/db.txt
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/net/wireless/db.txt 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/net/wireless/db.txt 2016-06-19 18:44:30.000000000 +0200
|
|
@@ -1,17 +1,47 @@
|
|
-#
|
|
-# This file is a placeholder to prevent accidental build breakage if someone
|
|
-# enables CONFIG_CFG80211_INTERNAL_REGDB. Almost no one actually needs to
|
|
-# enable that build option.
|
|
-#
|
|
-# You should be using CRDA instead. It is even better if you use the CRDA
|
|
-# package provided by your distribution, since they will probably keep it
|
|
-# up-to-date on your behalf.
|
|
-#
|
|
-# If you _really_ intend to use CONFIG_CFG80211_INTERNAL_REGDB then you will
|
|
-# need to replace this file with one containing appropriately formatted
|
|
-# regulatory rules that cover the regulatory domains you will be using. Your
|
|
-# best option is to extract the db.txt file from the wireless-regdb git
|
|
-# repository:
|
|
-#
|
|
-# git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git
|
|
-#
|
|
+country 00:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country DE:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country AT:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country CH:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country TW:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country AU:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country CA:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country US:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country BO:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country GB:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country CN:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
+
|
|
+country NZ:
|
|
+ (2302 - 2742 @ 40), (30)
|
|
+ (4910 - 5835 @ 160), (30)
|
|
diff -ruN linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/net/wireless/reg.c linux-abe33682e797932abcdc0fd1421f30cddc1f101a/net/wireless/reg.c
|
|
--- linux-abe33682e797932abcdc0fd1421f30cddc1f101a.ORIG/net/wireless/reg.c 2016-11-15 18:17:42.000000000 +0100
|
|
+++ linux-abe33682e797932abcdc0fd1421f30cddc1f101a/net/wireless/reg.c 2016-06-25 15:14:55.000000000 +0200
|
|
@@ -229,32 +229,23 @@
|
|
.alpha2 = "00",
|
|
.reg_rules = {
|
|
/* IEEE 802.11b/g, channels 1..11 */
|
|
- REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
|
|
+ REG_RULE(2312-10, 2462+10, 40, 6, 30, 0),
|
|
/* IEEE 802.11b/g, channels 12..13. */
|
|
- REG_RULE(2467-10, 2472+10, 40, 6, 20,
|
|
- NL80211_RRF_NO_IR),
|
|
+ REG_RULE(2467-10, 2472+10, 40, 6, 30, 0),
|
|
/* IEEE 802.11 channel 14 - Only JP enables
|
|
* this and for 802.11b only */
|
|
- REG_RULE(2484-10, 2484+10, 20, 6, 20,
|
|
- NL80211_RRF_NO_IR |
|
|
- NL80211_RRF_NO_OFDM),
|
|
+ REG_RULE(2484-10, 2732+10, 40, 6, 30, 0),
|
|
/* IEEE 802.11a, channel 36..48 */
|
|
- REG_RULE(5180-10, 5240+10, 160, 6, 20,
|
|
- NL80211_RRF_NO_IR),
|
|
+ REG_RULE(4920-10, 5240+10, 160, 6, 30, 0),
|
|
|
|
/* IEEE 802.11a, channel 52..64 - DFS required */
|
|
- REG_RULE(5260-10, 5320+10, 160, 6, 20,
|
|
- NL80211_RRF_NO_IR |
|
|
- NL80211_RRF_DFS),
|
|
+ REG_RULE(5260-10, 5320+10, 160, 6, 30, 0),
|
|
|
|
/* IEEE 802.11a, channel 100..144 - DFS required */
|
|
- REG_RULE(5500-10, 5720+10, 160, 6, 20,
|
|
- NL80211_RRF_NO_IR |
|
|
- NL80211_RRF_DFS),
|
|
+ REG_RULE(5500-10, 5720+10, 160, 6, 30, 0),
|
|
|
|
/* IEEE 802.11a, channel 149..165 */
|
|
- REG_RULE(5745-10, 5825+10, 80, 6, 20,
|
|
- NL80211_RRF_NO_IR),
|
|
+ REG_RULE(5745-10, 6100+10, 160, 6, 30, 0),
|
|
|
|
/* IEEE 802.11ad (60GHz), channels 1..3 */
|
|
REG_RULE(56160+2160*1-1080, 56160+2160*3+1080, 2160, 0, 0, 0),
|
|
@@ -3173,7 +3164,7 @@
|
|
int cfg80211_get_unii(int freq)
|
|
{
|
|
/* UNII-1 */
|
|
- if (freq >= 5150 && freq <= 5250)
|
|
+ if (freq >= 4920 && freq <= 5250)
|
|
return 0;
|
|
|
|
/* UNII-2A */
|
|
@@ -3189,7 +3180,7 @@
|
|
return 3;
|
|
|
|
/* UNII-3 */
|
|
- if (freq > 5725 && freq <= 5825)
|
|
+ if (freq > 5725 && freq <= 6100)
|
|
return 4;
|
|
|
|
return -EINVAL;
|