From 83b17b72773a4545d9b2a737406ebb5b2a99737c Mon Sep 17 00:00:00 2001 From: Markham Date: Sun, 30 Oct 2022 15:01:51 +0100 Subject: [PATCH] cleanup kernel patches --- .../hd51/0001-STV-Add-PLS-support.patch | 94 - ...STV-Add-SNR-Signal-report-parameters.patch | 92 - ...pport-TBS-USB-drivers-for-4.6-kernel.patch | 1334 --- .../hd51/0001-TBS-fixes-for-4.6-kernel.patch | 55 - ...01-stv090x-optimized-TS-sync-control.patch | 92 - .../hd51/TBS-fixes-for-4.10-kernel.patch | 46 - .../hd51/add-more-devices-rtl8xxxu.patch | 65 - .../armbox/hd51/blacklist_mmc0.patch | 15 - archive-patches/armbox/hd51/blindscan2.patch | 261 - archive-patches/armbox/hd51/defconfig | 4407 --------- archive-patches/armbox/hd51/dvbs2x.patch | 89 - .../hd51/export_pmpoweroffprepare.patch | 12 - .../armbox/hd51/reserve_dvb_adapter_0.patch | 13 - archive-patches/armbox/hd51/t230c2.patch | 323 - archive-patches/armbox/hd60/0001-remote.patch | 47 - ...ive-up-on-gcc-constant-optimizations.patch | 85 - .../0003-dont-mark-register-as-const.patch | 22 - ...-linux-fix-buffer-size-warning-error.patch | 24 - .../armbox/hd60/0005-xbox-one-tuner-4.4.patch | 238 - ...a18250-support-for-new-silicon-tuner.patch | 1192 --- .../hd60/0007-dvb-mn88472-staging.patch | 834 -- ...mpiler_attributes_h_to_support_GCC_9.patch | 51 - .../armbox/hd60/HauppaugeWinTV-dualHD.patch | 629 -- archive-patches/armbox/hd60/defconfig | 4537 --------- .../armbox/hd60/dib7000-linux_4.4.179.patch | 158 - .../armbox/hd60/dvb-usb-linux_4.4.179.patch | 67 - ...211-increase-scan-result-expire-time.patch | 11 - ...it__exit_attrs_to_initcleanup_module.patch | 84 - ..._reset_stream_ID_reg_if_no_PLP_given.patch | 33 - ..._inittest__exittest_as__maybe_unused.patch | 50 - .../hd60/move-default-dialect-to-SMB3.patch | 36 - .../armbox/hd60/wifi-linux_4.4.183.patch | 8663 ----------------- archive-patches/armbox/hd61/0001-remote.patch | 47 - ...ive-up-on-gcc-constant-optimizations.patch | 85 - .../0003-dont-mark-register-as-const.patch | 22 - ...-linux-fix-buffer-size-warning-error.patch | 24 - .../armbox/hd61/0005-xbox-one-tuner-4.4.patch | 238 - ...a18250-support-for-new-silicon-tuner.patch | 1192 --- .../hd61/0007-dvb-mn88472-staging.patch | 834 -- ...mpiler_attributes_h_to_support_GCC_9.patch | 51 - .../armbox/hd61/HauppaugeWinTV-dualHD.patch | 629 -- archive-patches/armbox/hd61/defconfig | 4537 --------- .../armbox/hd61/dib7000-linux_4.4.179.patch | 158 - .../armbox/hd61/dvb-usb-linux_4.4.179.patch | 67 - ...211-increase-scan-result-expire-time.patch | 11 - ...it__exit_attrs_to_initcleanup_module.patch | 84 - ..._reset_stream_ID_reg_if_no_PLP_given.patch | 33 - ..._inittest__exittest_as__maybe_unused.patch | 50 - .../hd61/move-default-dialect-to-SMB3.patch | 36 - .../armbox/hd61/wifi-linux_4.4.183.patch | 8663 ----------------- 50 files changed, 40420 deletions(-) delete mode 100644 archive-patches/armbox/hd51/0001-STV-Add-PLS-support.patch delete mode 100644 archive-patches/armbox/hd51/0001-STV-Add-SNR-Signal-report-parameters.patch delete mode 100644 archive-patches/armbox/hd51/0001-Support-TBS-USB-drivers-for-4.6-kernel.patch delete mode 100644 archive-patches/armbox/hd51/0001-TBS-fixes-for-4.6-kernel.patch delete mode 100644 archive-patches/armbox/hd51/0001-stv090x-optimized-TS-sync-control.patch delete mode 100644 archive-patches/armbox/hd51/TBS-fixes-for-4.10-kernel.patch delete mode 100644 archive-patches/armbox/hd51/add-more-devices-rtl8xxxu.patch delete mode 100644 archive-patches/armbox/hd51/blacklist_mmc0.patch delete mode 100644 archive-patches/armbox/hd51/blindscan2.patch delete mode 100644 archive-patches/armbox/hd51/defconfig delete mode 100644 archive-patches/armbox/hd51/dvbs2x.patch delete mode 100644 archive-patches/armbox/hd51/export_pmpoweroffprepare.patch delete mode 100644 archive-patches/armbox/hd51/reserve_dvb_adapter_0.patch delete mode 100644 archive-patches/armbox/hd51/t230c2.patch delete mode 100644 archive-patches/armbox/hd60/0001-remote.patch delete mode 100644 archive-patches/armbox/hd60/0002-log2-give-up-on-gcc-constant-optimizations.patch delete mode 100644 archive-patches/armbox/hd60/0003-dont-mark-register-as-const.patch delete mode 100644 archive-patches/armbox/hd60/0004-linux-fix-buffer-size-warning-error.patch delete mode 100644 archive-patches/armbox/hd60/0005-xbox-one-tuner-4.4.patch delete mode 100644 archive-patches/armbox/hd60/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch delete mode 100644 archive-patches/armbox/hd60/0007-dvb-mn88472-staging.patch delete mode 100644 archive-patches/armbox/hd60/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch delete mode 100644 archive-patches/armbox/hd60/HauppaugeWinTV-dualHD.patch delete mode 100644 archive-patches/armbox/hd60/defconfig delete mode 100644 archive-patches/armbox/hd60/dib7000-linux_4.4.179.patch delete mode 100644 archive-patches/armbox/hd60/dvb-usb-linux_4.4.179.patch delete mode 100644 archive-patches/armbox/hd60/ieee80211-increase-scan-result-expire-time.patch delete mode 100644 archive-patches/armbox/hd60/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch delete mode 100644 archive-patches/armbox/hd60/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch delete mode 100644 archive-patches/armbox/hd60/modules_mark__inittest__exittest_as__maybe_unused.patch delete mode 100644 archive-patches/armbox/hd60/move-default-dialect-to-SMB3.patch delete mode 100644 archive-patches/armbox/hd60/wifi-linux_4.4.183.patch delete mode 100644 archive-patches/armbox/hd61/0001-remote.patch delete mode 100644 archive-patches/armbox/hd61/0002-log2-give-up-on-gcc-constant-optimizations.patch delete mode 100644 archive-patches/armbox/hd61/0003-dont-mark-register-as-const.patch delete mode 100644 archive-patches/armbox/hd61/0004-linux-fix-buffer-size-warning-error.patch delete mode 100644 archive-patches/armbox/hd61/0005-xbox-one-tuner-4.4.patch delete mode 100644 archive-patches/armbox/hd61/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch delete mode 100644 archive-patches/armbox/hd61/0007-dvb-mn88472-staging.patch delete mode 100644 archive-patches/armbox/hd61/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch delete mode 100644 archive-patches/armbox/hd61/HauppaugeWinTV-dualHD.patch delete mode 100644 archive-patches/armbox/hd61/defconfig delete mode 100644 archive-patches/armbox/hd61/dib7000-linux_4.4.179.patch delete mode 100644 archive-patches/armbox/hd61/dvb-usb-linux_4.4.179.patch delete mode 100644 archive-patches/armbox/hd61/ieee80211-increase-scan-result-expire-time.patch delete mode 100644 archive-patches/armbox/hd61/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch delete mode 100644 archive-patches/armbox/hd61/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch delete mode 100644 archive-patches/armbox/hd61/modules_mark__inittest__exittest_as__maybe_unused.patch delete mode 100644 archive-patches/armbox/hd61/move-default-dialect-to-SMB3.patch delete mode 100644 archive-patches/armbox/hd61/wifi-linux_4.4.183.patch diff --git a/archive-patches/armbox/hd51/0001-STV-Add-PLS-support.patch b/archive-patches/armbox/hd51/0001-STV-Add-PLS-support.patch deleted file mode 100644 index 1780832..0000000 --- a/archive-patches/armbox/hd51/0001-STV-Add-PLS-support.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 4bbe1b749c6f01a7a2648714f195802517e138ed Mon Sep 17 00:00:00 2001 -From: Athanasios Oikonomou -Date: Sat, 5 Mar 2016 00:32:57 +0200 -Subject: [PATCH] STV: Add PLS support - - -diff --git a/drivers/media/dvb-frontends/stv0900_core.c b/drivers/media/dvb-frontends/stv0900_core.c -index fe31dd5..3a5df06 100644 ---- a/drivers/media/dvb-frontends/stv0900_core.c -+++ b/drivers/media/dvb-frontends/stv0900_core.c -@@ -1554,12 +1554,25 @@ static int stv0900_status(struct stv0900_internal *intp, - return locked; - } - -+static int stv0900_set_pls(struct stv0900_internal *intp, -+ enum fe_stv0900_demod_num demod, u8 pls_mode, u32 pls_code) -+{ -+ enum fe_stv0900_error error = STV0900_NO_ERROR; -+ -+ dprintk("Set PLS code %d (mode %d)", pls_code, pls_mode); -+ stv0900_write_reg(intp, PLROOT2, (pls_mode<<2) | (pls_code>>16)); -+ stv0900_write_reg(intp, PLROOT1, pls_code>>8); -+ stv0900_write_reg(intp, PLROOT0, pls_code); -+ -+ return error; -+} -+ - static int stv0900_set_mis(struct stv0900_internal *intp, - enum fe_stv0900_demod_num demod, int mis) - { - dprintk("%s\n", __func__); - -- if (mis < 0 || mis > 255) { -+ if (mis == NO_STREAM_ID_FILTER) { - dprintk("Disable MIS filtering\n"); - stv0900_write_bits(intp, FILTER_EN, 0); - } else { -@@ -1593,6 +1606,7 @@ static enum dvbfe_search stv0900_search(struct dvb_frontend *fe) - if (state->config->set_ts_params) - state->config->set_ts_params(fe, 0); - -+ stv0900_set_pls(intp, demod, (c->stream_id>>26) & 0x3, (c->stream_id>>8) & 0x3FFFF); - stv0900_set_mis(intp, demod, c->stream_id); - - p_result.locked = FALSE; -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index ce99b9d..264c4b8 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -3429,18 +3429,40 @@ err: - return -1; - } - -+static int stv090x_set_pls(struct stv090x_state *state, u8 pls_mode, u32 pls_code) -+{ -+ if (pls_mode == 0 && pls_code == 0) -+ pls_code = 1; -+ pls_mode &= 0x03; -+ pls_code &= 0x3FFFF; -+ -+ dprintk(FE_DEBUG, 1, "Set PLS code %d (mode %d)", pls_code, pls_mode); -+ if (STV090x_WRITE_DEMOD(state, PLROOT2, (pls_mode<<2) | (pls_code>>16)) < 0) -+ goto err; -+ if (STV090x_WRITE_DEMOD(state, PLROOT1, pls_code>>8) < 0) -+ goto err; -+ if (STV090x_WRITE_DEMOD(state, PLROOT0, pls_code) < 0) -+ goto err; -+ return 0; -+err: -+ dprintk(FE_ERROR, 1, "I/O error"); -+ return -1; -+} -+ - static int stv090x_set_mis(struct stv090x_state *state, int mis) - { - u32 reg; - -- if (mis < 0 || mis > 255) { -+ if (mis == NO_STREAM_ID_FILTER) { - dprintk(FE_DEBUG, 1, "Disable MIS filtering"); -+ stv090x_set_pls(state, 0, 0); - reg = STV090x_READ_DEMOD(state, PDELCTRL1); - STV090x_SETFIELD_Px(reg, FILTER_EN_FIELD, 0x00); - if (STV090x_WRITE_DEMOD(state, PDELCTRL1, reg) < 0) - goto err; - } else { - dprintk(FE_DEBUG, 1, "Enable MIS filtering - %d", mis); -+ stv090x_set_pls(state, (mis>>26) & 0x3, (mis>>8) & 0x3FFFF); - reg = STV090x_READ_DEMOD(state, PDELCTRL1); - STV090x_SETFIELD_Px(reg, FILTER_EN_FIELD, 0x01); - if (STV090x_WRITE_DEMOD(state, PDELCTRL1, reg) < 0) --- -2.1.4 - diff --git a/archive-patches/armbox/hd51/0001-STV-Add-SNR-Signal-report-parameters.patch b/archive-patches/armbox/hd51/0001-STV-Add-SNR-Signal-report-parameters.patch deleted file mode 100644 index 63a0757..0000000 --- a/archive-patches/armbox/hd51/0001-STV-Add-SNR-Signal-report-parameters.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 0d3b277d19137c4a0fdadfd1381f1c66515d1b0c Mon Sep 17 00:00:00 2001 -From: Athanasios Oikonomou -Date: Mon, 8 Feb 2016 22:14:31 +0200 -Subject: [PATCH] STV: Add SNR/Signal report parameters - - -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index 264c4b8..12fd3d0 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -41,6 +41,18 @@ - static unsigned int verbose; - module_param(verbose, int, 0644); - -+/* define how SNR measurement is reported */ -+static int esno; -+module_param(esno, int, 0644); -+MODULE_PARM_DESC(esno, "SNR is reported in 0:Percentage, "\ -+ "1:(EsNo dB)*10 (default:0)"); -+ -+/* define how signal measurement is reported */ -+static int dbm; -+module_param(dbm, int, 0644); -+MODULE_PARM_DESC(dbm, "Signal is reported in 0:Percentage, "\ -+ "1:-1*dBm (default:0)"); -+ - /* internal params node */ - struct stv090x_dev { - /* pointer for internal params, one for each pair of demods */ -@@ -3687,7 +3699,10 @@ static int stv090x_read_signal_strength(struct dvb_frontend *fe, u16 *strength) - str = 0; - else if (agc < stv090x_rf_tab[ARRAY_SIZE(stv090x_rf_tab) - 1].read) - str = -100; -- *strength = (str + 100) * 0xFFFF / 100; -+ if (dbm) -+ *strength = -str; -+ else -+ *strength = (str + 100) * 0xFFFF / 100; - - return 0; - } -@@ -3698,8 +3713,7 @@ static int stv090x_read_cnr(struct dvb_frontend *fe, u16 *cnr) - u32 reg_0, reg_1, reg, i; - s32 val_0, val_1, val = 0; - u8 lock_f; -- s32 div; -- u32 last; -+ s32 snr; - - switch (state->delsys) { - case STV090x_DVBS2: -@@ -3716,10 +3730,14 @@ static int stv090x_read_cnr(struct dvb_frontend *fe, u16 *cnr) - msleep(1); - } - val /= 16; -- last = ARRAY_SIZE(stv090x_s2cn_tab) - 1; -- div = stv090x_s2cn_tab[0].read - -- stv090x_s2cn_tab[last].read; -- *cnr = 0xFFFF - ((val * 0xFFFF) / div); -+ snr = stv090x_table_lookup(stv090x_s2cn_tab, -+ ARRAY_SIZE(stv090x_s2cn_tab) - 1, val); -+ if (snr < 0) snr = 0; -+ if (snr > 200) snr = 200; -+ if (esno) -+ *cnr = snr; -+ else -+ *cnr = snr * 0xFFFF / 200; - } - break; - -@@ -3738,10 +3756,14 @@ static int stv090x_read_cnr(struct dvb_frontend *fe, u16 *cnr) - msleep(1); - } - val /= 16; -- last = ARRAY_SIZE(stv090x_s1cn_tab) - 1; -- div = stv090x_s1cn_tab[0].read - -- stv090x_s1cn_tab[last].read; -- *cnr = 0xFFFF - ((val * 0xFFFF) / div); -+ snr = stv090x_table_lookup(stv090x_s1cn_tab, -+ ARRAY_SIZE(stv090x_s1cn_tab) - 1, val); -+ if (snr < 0) snr = 0; -+ if (snr > 200) snr = 200; -+ if (esno) -+ *cnr = snr; -+ else -+ *cnr = snr * 0xFFFF / 200; - } - break; - default: --- -2.1.4 - diff --git a/archive-patches/armbox/hd51/0001-Support-TBS-USB-drivers-for-4.6-kernel.patch b/archive-patches/armbox/hd51/0001-Support-TBS-USB-drivers-for-4.6-kernel.patch deleted file mode 100644 index b7acd60..0000000 --- a/archive-patches/armbox/hd51/0001-Support-TBS-USB-drivers-for-4.6-kernel.patch +++ /dev/null @@ -1,1334 +0,0 @@ -From 6f6cb195b8f7dbc2d0b4e31a2da4cd58bd69f6bf Mon Sep 17 00:00:00 2001 -From: Athanasios Oikonomou -Date: Sat, 5 Mar 2016 00:29:45 +0200 -Subject: [PATCH] Support TBS USB drivers - -This patch add supports for TBS USB drivers based on the following patches: - -https://patchwork.linuxtv.org/patch/23244/ -https://patchwork.linuxtv.org/patch/23243/ -https://patchwork.linuxtv.org/patch/23242/ - -diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h -index c117fb3..5e0735b 100644 ---- a/drivers/media/dvb-core/dvb-usb-ids.h -+++ b/drivers/media/dvb-core/dvb-usb-ids.h -@@ -78,6 +78,7 @@ - #define USB_VID_EVOLUTEPC 0x1e59 - #define USB_VID_AZUREWAVE 0x13d3 - #define USB_VID_TECHNISAT 0x14f7 -+#define USB_VID_TENOW 0x734c - - /* Product IDs */ - #define USB_PID_ADSTECH_USB2_COLD 0xa333 -@@ -413,4 +414,10 @@ - #define USB_PID_TURBOX_DTT_2000 0xd3a4 - #define USB_PID_EVOLVEO_XTRATV_STICK 0xa115 - #define USB_PID_WINTV_SOLOHD 0x0264 -+#define USB_PID_TENOW_TBS5910 0x5910 -+#define USB_PID_TENOW_TBS5920 0x5920 -+#define USB_PID_TENOW_TBS5921 0x5921 -+#define USB_PID_TENOW_TBS5925 0x5925 -+#define USB_PID_TENOW_TBS5928 0x5928 -+#define USB_PID_TENOW_TBS5980 0x5980 - #endif -diff --git a/drivers/media/dvb-frontends/cx24116.c b/drivers/media/dvb-frontends/cx24116.c -index 8814f36..5ccfeb3 100644 ---- a/drivers/media/dvb-frontends/cx24116.c -+++ b/drivers/media/dvb-frontends/cx24116.c -@@ -705,6 +705,9 @@ static int cx24116_read_status(struct dvb_frontend *fe, enum fe_status *status) - if (lock & CX24116_HAS_SYNCLOCK) - *status |= FE_HAS_SYNC | FE_HAS_LOCK; - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, *status & FE_HAS_LOCK); -+ - return 0; - } - -@@ -1113,6 +1116,10 @@ static void cx24116_release(struct dvb_frontend *fe) - { - struct cx24116_state *state = fe->demodulator_priv; - dprintk("%s\n", __func__); -+ -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - kfree(state); - } - -@@ -1198,6 +1205,9 @@ static int cx24116_sleep(struct dvb_frontend *fe) - - dprintk("%s()\n", __func__); - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - /* Firmware CMD 36: Power config */ - cmd.args[0x00] = CMD_TUNERSLEEP; - cmd.args[0x01] = 1; -diff --git a/drivers/media/dvb-frontends/cx24116.h b/drivers/media/dvb-frontends/cx24116.h -index f6dbabc..7cbb907 100644 ---- a/drivers/media/dvb-frontends/cx24116.h -+++ b/drivers/media/dvb-frontends/cx24116.h -@@ -38,6 +38,9 @@ struct cx24116_config { - - /* max bytes I2C provider can write at once */ - u16 i2c_wr_max; -+ -+ /* Hook for Lock LED */ -+ void (*set_lock_led)(struct dvb_frontend *fe, int offon); - }; - - #if IS_REACHABLE(CONFIG_DVB_CX24116) -diff --git a/drivers/media/dvb-frontends/stv0288.c b/drivers/media/dvb-frontends/stv0288.c -index c93d9a4..9dcd922 100644 ---- a/drivers/media/dvb-frontends/stv0288.c -+++ b/drivers/media/dvb-frontends/stv0288.c -@@ -382,6 +382,9 @@ static int stv0288_read_status(struct dvb_frontend *fe, enum fe_status *status) - dprintk("stv0288 has locked\n"); - } - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, *status & FE_HAS_LOCK); -+ - return 0; - } - -@@ -416,6 +419,9 @@ static int stv0288_sleep(struct dvb_frontend *fe) - { - struct stv0288_state *state = fe->demodulator_priv; - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - stv0288_writeregI(state, 0x41, 0x84); - state->initialised = 0; - -@@ -532,6 +538,10 @@ static int stv0288_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) - static void stv0288_release(struct dvb_frontend *fe) - { - struct stv0288_state *state = fe->demodulator_priv; -+ -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - kfree(state); - } - -diff --git a/drivers/media/dvb-frontends/stv0288.h b/drivers/media/dvb-frontends/stv0288.h -index b58603c..01d8481 100644 ---- a/drivers/media/dvb-frontends/stv0288.h -+++ b/drivers/media/dvb-frontends/stv0288.h -@@ -40,6 +40,9 @@ struct stv0288_config { - int min_delay_ms; - - int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured); -+ -+ /* Hook for Lock LED */ -+ void (*set_lock_led)(struct dvb_frontend *fe, int offon); - }; - - #if IS_REACHABLE(CONFIG_DVB_STV0288) -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index 25bdf6e..ce99b9d 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -3553,6 +3553,9 @@ static int stv090x_read_status(struct dvb_frontend *fe, enum fe_status *status) - break; - } - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, *status & FE_HAS_LOCK); -+ - return 0; - } - -@@ -3901,6 +3904,9 @@ static int stv090x_sleep(struct dvb_frontend *fe) - u32 reg; - u8 full_standby = 0; - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - if (stv090x_i2c_gate_ctrl(state, 1) < 0) - goto err; - -@@ -4132,6 +4138,9 @@ static void stv090x_release(struct dvb_frontend *fe) - { - struct stv090x_state *state = fe->demodulator_priv; - -+ if (state->config->set_lock_led) -+ state->config->set_lock_led(fe, 0); -+ - state->internal->num_used--; - if (state->internal->num_used <= 0) { - -diff --git a/drivers/media/dvb-frontends/stv090x.h b/drivers/media/dvb-frontends/stv090x.h -index 012e55e..545f43a 100644 ---- a/drivers/media/dvb-frontends/stv090x.h -+++ b/drivers/media/dvb-frontends/stv090x.h -@@ -89,6 +89,8 @@ struct stv090x_config { - - bool diseqc_envelope_mode; - -+ /* Hook for Lock LED */ -+ void (*set_lock_led) (struct dvb_frontend *fe, int offon); - int (*tuner_init)(struct dvb_frontend *fe); - int (*tuner_sleep)(struct dvb_frontend *fe); - int (*tuner_set_mode)(struct dvb_frontend *fe, enum tuner_mode mode); -diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h -index 8f18402..891e007 100644 ---- a/drivers/media/dvb-frontends/tda10071.h -+++ b/drivers/media/dvb-frontends/tda10071.h -@@ -49,6 +49,9 @@ struct tda10071_platform_data { - u8 pll_multiplier; - u8 tuner_i2c_addr; - -+ /* Hook for Lock LED */ -+ void (*set_lock_led)(struct dvb_frontend *fe, int offon); -+ - struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *); - }; - -diff --git a/drivers/media/usb/dvb-usb/Kconfig b/drivers/media/usb/dvb-usb/Kconfig -index 128eee6..49c34f9 100644 ---- a/drivers/media/usb/dvb-usb/Kconfig -+++ b/drivers/media/usb/dvb-usb/Kconfig -@@ -331,3 +331,23 @@ config DVB_USB_TECHNISAT_USB2 - select DVB_STV6110x if MEDIA_SUBDRV_AUTOSELECT - help - Say Y here to support the Technisat USB2 DVB-S/S2 device -+ -+config DVB_USB_TBS -+ tristate "TurboSight DVB-S/S2 USB2.0 support" -+ depends on DVB_USB -+ select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_STV090x if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_STB6100 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_CX24116 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_TDA10071 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_STV0299 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_STV0288 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_STB6000 if MEDIA_SUBDRV_AUTOSELECT -+ help -+ Say Y here to support TurboSight (TBS) DVB-S/S2 USB2.0 receivers. -+ Required firmware can be found at http://www.tbsdtv.com/download/ -+ The tda10071 (TBS5921) firmware can be downloaded by executing: -+ Documentation/dvb/get_dvb_firmware tda10071 -+ -+ Supported devices are: -+ TBS5980 TBS5928 TBS5925 TBS5921 TBS5920 TBS5910 -diff --git a/drivers/media/usb/dvb-usb/Makefile b/drivers/media/usb/dvb-usb/Makefile -index acdd1ef..cb00137 100644 ---- a/drivers/media/usb/dvb-usb/Makefile -+++ b/drivers/media/usb/dvb-usb/Makefile -@@ -79,6 +79,9 @@ obj-$(CONFIG_DVB_USB_AZ6027) += dvb-usb-az6027.o - dvb-usb-technisat-usb2-objs := technisat-usb2.o - obj-$(CONFIG_DVB_USB_TECHNISAT_USB2) += dvb-usb-technisat-usb2.o - -+dvb-usb-tbsusb-objs := tbs-usb.o -+obj-$(CONFIG_DVB_USB_TBS) += dvb-usb-tbsusb.o -+ - ccflags-y += -I$(srctree)/drivers/media/dvb-core - ccflags-y += -I$(srctree)/drivers/media/dvb-frontends/ - # due to tuner-xc3028 -diff --git a/drivers/media/usb/dvb-usb/tbs-usb.c b/drivers/media/usb/dvb-usb/tbs-usb.c -new file mode 100644 -index 0000000..f142be3 ---- /dev/null -+++ b/drivers/media/usb/dvb-usb/tbs-usb.c -@@ -0,0 +1,1075 @@ -+/* -+ * TBS 5980/5928/5925/5921/5920/5910 DVB-S/S2 driver -+ * -+ * Copyright (c) 2008 Bob Liu (Bob@Turbosight.com) -+ * Igor M. Liplianin (liplianin@me.by) -+ * Copyright (c) 2009 Konstantin Dimitrov -+ * Copyright (c) 2014 Andreas Steinmetz -+ * Lock LED and TBS5921 stuff shamelessly taken from -+ * CrazyCat's Bitbucket repository -+ * TBS5925 Open Source version shamelessly taken from -+ * UpdateLee's Bitbucket repository -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation, version 2. -+ * -+ */ -+ -+#include -+#include "tbs-usb.h" -+ -+#include "stv6110x.h" -+#include "stv090x.h" -+#include "stb6100.h" -+#include "stb6100_cfg.h" -+ -+#include "cx24116.h" -+ -+#include "stv0299.h" -+#include "stv0288.h" -+#include "stb6000.h" -+ -+#include "tda10071.h" -+ -+#include "dvb_ca_en50221.h" -+ -+struct tbsusbci_state { -+ u8 buf[20]; -+ struct dvb_ca_en50221 ca; -+ struct mutex ca_mutex; -+}; -+ -+struct tbsusb_state { -+ u8 buf[20]; -+}; -+ -+static int dvb_usb_tbsusb_debug; -+module_param_named(debug, dvb_usb_tbsusb_debug, int, 0644); -+MODULE_PARM_DESC(debug, "set debugging level (1=info 2=xfer (or-able))." -+ DVB_USB_DEBUG_STATUS); -+ -+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); -+ -+static struct rc_map_table tbsusb_rc_keys[] = { -+ { 0xff84, KEY_POWER2}, /* power */ -+ { 0xff94, KEY_MUTE}, /* mute */ -+ { 0xff87, KEY_1}, -+ { 0xff86, KEY_2}, -+ { 0xff85, KEY_3}, -+ { 0xff8b, KEY_4}, -+ { 0xff8a, KEY_5}, -+ { 0xff89, KEY_6}, -+ { 0xff8f, KEY_7}, -+ { 0xff8e, KEY_8}, -+ { 0xff8d, KEY_9}, -+ { 0xff92, KEY_0}, -+ { 0xff96, KEY_CHANNELUP}, /* ch+ */ -+ { 0xff91, KEY_CHANNELDOWN}, /* ch- */ -+ { 0xff93, KEY_VOLUMEUP}, /* vol+ */ -+ { 0xff8c, KEY_VOLUMEDOWN}, /* vol- */ -+ { 0xff83, KEY_RECORD}, /* rec */ -+ { 0xff98, KEY_PAUSE}, /* pause, yellow */ -+ { 0xff99, KEY_OK}, /* ok */ -+ { 0xff9a, KEY_CAMERA}, /* snapshot */ -+ { 0xff81, KEY_UP}, -+ { 0xff90, KEY_LEFT}, -+ { 0xff82, KEY_RIGHT}, -+ { 0xff88, KEY_DOWN}, -+ { 0xff95, KEY_FAVORITES}, /* blue */ -+ { 0xff97, KEY_SUBTITLE}, /* green */ -+ { 0xff9d, KEY_ZOOM}, -+ { 0xff9f, KEY_EXIT}, -+ { 0xff9e, KEY_MENU}, -+ { 0xff9c, KEY_EPG}, -+ { 0xff80, KEY_PREVIOUS}, /* red */ -+ { 0xff9b, KEY_MODE}, -+ { 0xffdd, KEY_TV }, -+ { 0xffde, KEY_PLAY }, -+ { 0xffdc, KEY_STOP }, -+ { 0xffdb, KEY_REWIND }, -+ { 0xffda, KEY_FASTFORWARD }, -+ { 0xffd9, KEY_PREVIOUS }, /* replay */ -+ { 0xffd8, KEY_NEXT }, /* skip */ -+ { 0xffd1, KEY_NUMERIC_STAR }, -+ { 0xffd2, KEY_NUMERIC_POUND }, -+ { 0xffd4, KEY_DELETE }, /* clear */ -+}; -+ -+static int tbsusb_op_r_unlocked(struct usb_device *dev, int num, u8 request, -+ u16 value, u16 index, u8 *data, int len) -+{ -+ int ret; -+ -+ ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request, -+ USB_TYPE_VENDOR | USB_DIR_IN, value, index, data, len, 2000); -+ -+ /* oh well, rc poll returns -EOVERFLOW but also the required data */ -+ if (ret == -EOVERFLOW && request == 0xb8) -+ ret = 0; -+ else if (ret < 0) { -+ warn("usb read 0x%02x/%d from adapter %d failed. (%d)", -+ request, len, num, ret); -+ ret = -EIO; -+ } else -+ ret = 0; -+ -+ deb_xfer("read: adap.: %d, req. %02x, val: %04x, ind: %04x, buffer: ", -+ num, request, value, index); -+ debug_dump(data, len, deb_xfer); -+ -+ return ret; -+} -+ -+static int tbsusb_op_w_unlocked(struct usb_device *dev, int num, u8 request, -+ u16 value, u16 index, u8 *data, int len) -+{ -+ int ret; -+ -+ deb_xfer("write: adap.: %d, req. %02x, val: %04x, ind: %04x, buffer: ", -+ num, request, value, index); -+ debug_dump(data, len, deb_xfer); -+ -+ ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), request, -+ USB_TYPE_VENDOR | USB_DIR_OUT, value, index, data, len, 2000); -+ -+ if (ret != len) { -+ warn("usb write 0x%02x/%d to adapter %d failed. (%d)", -+ request, len, num, ret); -+ ret = -EIO; -+ } else -+ ret = 0; -+ -+ return ret; -+} -+ -+static int tbsusb_load_firmware(struct usb_device *dev, -+ const struct firmware *frmwr) -+{ -+ u8 *b; -+ int ret, i, j; -+ -+ if (!dev || !frmwr) -+ return -ENODEV; -+ -+ b = kmalloc(0x40, GFP_KERNEL); -+ if (!b) -+ return -ENOMEM; -+ -+ /*stop the CPU*/ -+ b[0] = 1; -+ ret = tbsusb_op_w_unlocked(dev, -1, 0xa0, 0x7f92, 0, b, 1); -+ if (!ret) -+ ret = tbsusb_op_w_unlocked(dev, -1, 0xa0, 0xe600, 0, b, 1); -+ if (ret) { -+ err("could not stop the USB controller CPU."); -+ goto err; -+ } -+ -+ for (i = 0; i < frmwr->size; i += 0x40) { -+ j = i & 0x3f; -+ if (!j) -+ j = 0x40; -+ memcpy(b, (u8 *) frmwr->data + i, j); -+ ret = tbsusb_op_w_unlocked(dev, -1, 0xa0, i, 0, b, j); -+ if (ret) { -+ err("error while transferring firmware."); -+ goto err; -+ } -+ } -+ -+ /* restart the CPU */ -+ b[0] = 0; -+ ret = tbsusb_op_w_unlocked(dev, -1, 0xa0, 0x7f92, 0, b, 1); -+ if (!ret) -+ ret = tbsusb_op_w_unlocked(dev, -1, 0xa0, 0xe600, 0, b, 1); -+ if (ret) { -+ err("could not restart the USB controller CPU."); -+ goto err; -+ } -+ -+ msleep(100); -+ -+err: kfree(b); -+ return ret; -+} -+ -+/* without copying the data back and forth usb transfers randomly fail... */ -+ -+static int tbsusb_op_wwr(struct dvb_usb_device *d, u8 wrq, u8 wrrq, int wwait, -+ int wrwait, u8 *wdata, int wlen, u8 *wrdata, -+ int wrlen, int wrop) -+{ -+ struct tbsusb_state *s; -+ u8 *b; -+ int ret, len, num; -+ -+ if (d && d->udev && d->priv) -+ s = (struct tbsusb_state *)d->priv; -+ else -+ return -ENODEV; -+ -+ if (wrlen > wlen) -+ len = wrlen; -+ else -+ len = wlen; -+ -+ if (len > sizeof(s->buf)) { -+ b = kmalloc(len, GFP_KERNEL); -+ if (!b) -+ return -ENOMEM; -+ } else -+ b = s->buf; -+ -+ if (d->adapter[0].fe_adap[0].fe && d->adapter[0].fe_adap[0].fe->dvb) -+ num = d->adapter[0].fe_adap[0].fe->dvb->num; -+ else -+ num = -1; -+ -+ mutex_lock(&d->usb_mutex); -+ if (wdata) { -+ memcpy(b, wdata, wlen); -+ ret = tbsusb_op_w_unlocked(d->udev, num, wrq, 0, 0, b, wlen); -+ if (ret) -+ goto err; -+ if (wwait) -+ usleep_range(wwait, wwait+1000); -+ } -+ if (wrdata) { -+ if (wrop) { -+ memcpy(b, wrdata, wrlen); -+ ret = tbsusb_op_w_unlocked(d->udev, num, wrrq, 0, 0, b, -+ wrlen); -+ } else -+ ret = tbsusb_op_r_unlocked(d->udev, num, wrrq, 0, 0, b, -+ wrlen); -+ if (ret) -+ goto err; -+ if (!wrop) -+ memcpy(wrdata, b, wrlen); -+ if (wrwait) -+ usleep_range(wrwait, wrwait+1000); -+ } -+err: mutex_unlock(&d->usb_mutex); -+ -+ if (len > sizeof(s->buf)) -+ kfree(b); -+ -+ return ret; -+} -+ -+static int tbsusb_op_ww(struct dvb_usb_device *d, u8 wrq1, u8 wrq2, int wwait1, -+ int wwait2, u8 *wdata1, int wlen1, u8 *wdata2, -+ int wlen2) -+{ -+ return tbsusb_op_wwr(d, wrq1, wrq2, wwait1, wwait2, wdata1, wlen1, -+ wdata2, wlen2, 1); -+} -+ -+static int tbsusb_op_wr(struct dvb_usb_device *d, u8 wrq, u8 rrq, int wwait, -+ int rwait, u8 *wdata, int wlen, u8 *rdata, -+ int rlen) -+{ -+ return tbsusb_op_wwr(d, wrq, rrq, wwait, rwait, wdata, wlen, rdata, -+ rlen, 0); -+} -+ -+static int tbsusb_op_w(struct dvb_usb_device *d, u8 req, int uwait, -+ u8 *data, int len) -+{ -+ return tbsusb_op_wwr(d, req, 0x00, uwait, 0, data, len, NULL, 0, 0); -+} -+ -+static int tbsusb_op_r(struct dvb_usb_device *d, u8 req, int uwait, -+ u8 *data, int len) -+{ -+ return tbsusb_op_wwr(d, 0x00, req, 0, uwait, NULL, 0, data, len, 0); -+} -+ -+static int tbsusb_read_mac_address(struct dvb_usb_device *d, u8 mac[6]) -+{ -+ int i, ret; -+ u8 buf[3]; -+ -+ for (i = 0; i < 6; i++) { -+ buf[0] = 1; /* length */ -+ buf[1] = 0xa0; /* eeprom addr */ -+ buf[2] = i + 16; /* register (0-255) */ -+ ret = tbsusb_op_wr(d, 0x90, 0x91, 0, 0, buf, 3, &mac[i], 1); -+ if (ret) { -+ err("eeprom read failed."); -+ return ret; -+ } -+ } -+ return 0; -+}; -+ -+static int tbsusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) -+{ -+ int i; -+ u8 buf[4]; -+ -+ *state = REMOTE_NO_KEY_PRESSED; -+ -+ i = tbsusb_op_r(d, 0xb8, 3000, buf, 4); -+ if (i) -+ goto out; -+ -+ for (i = 0; i < ARRAY_SIZE(tbsusb_rc_keys); i++) { -+ if (rc5_data(&tbsusb_rc_keys[i]) == buf[3]) { -+ *state = REMOTE_KEY_PRESSED; -+ *event = tbsusb_rc_keys[i].keycode; -+ break; -+ } -+ } -+ -+out: return 0; -+} -+ -+static int tbsusb_set_pin(struct dvb_frontend *fe, u8 *what) -+{ -+ struct dvb_usb_device *d = NULL; -+ -+ if (fe && fe->dvb && fe->dvb->priv) -+ d = ((struct dvb_usb_adapter *)fe->dvb->priv)->dev; -+ if (!d) -+ return -ENODEV; -+ -+ return tbsusb_op_w(d, 0x8a, 0, what, 2); -+} -+ -+static int tbsusb_set_voltage(struct dvb_frontend *fe, -+ fe_sec_voltage_t voltage) -+{ -+ static u8 command_13v[2] = {0x03, 0x00}; -+ static u8 command_18v[2] = {0x03, 0x01}; -+ -+ return tbsusb_set_pin(fe, -+ voltage == SEC_VOLTAGE_18 ? command_18v : command_13v); -+} -+ -+static void tbsusb_led_ctrl(struct dvb_frontend *fe, int onoff) -+{ -+ static u8 led_off[2] = {0x05, 0x00}; -+ static u8 led_on[2] = {0x05, 0x01}; -+ -+ tbsusb_set_pin(fe, onoff ? led_on : led_off); -+} -+ -+static int tbsusb_i2c_transfer(struct i2c_adapter *adap, -+ struct i2c_msg msg[], int num) -+{ -+ struct dvb_usb_device *d = i2c_get_adapdata(adap); -+ int ret = -EINVAL, j = 3000, i; -+ u8 buf[20]; -+ -+ if (!d || !d->desc) -+ return -ENODEV; -+ -+ switch (num<<16 | d->desc->cold_ids[0]->idProduct) { -+ case 0x20000|USB_PID_TENOW_TBS5980: -+ case 0x20000|USB_PID_TENOW_TBS5925: -+ case 0x20000|USB_PID_TENOW_TBS5920: -+ buf[0] = msg[1].len; /* length */ -+ buf[1] = msg[0].addr<<1; /* demod addr */ -+ /* register */ -+ buf[2] = msg[0].buf[0]; -+ buf[3] = msg[0].buf[1]; -+ -+ ret = tbsusb_op_wr(d, 0x92, 0x91, 0, 0, buf, 4, msg[1].buf, -+ msg[1].len); -+ break; -+ case 0x20000|USB_PID_TENOW_TBS5928: -+ case 0x20000|USB_PID_TENOW_TBS5921: -+ /* read */ -+ buf[0] = msg[0].len; /* length */ -+ goto wrop; -+ case 0x20000|USB_PID_TENOW_TBS5910: -+ /* read */ -+ buf[0] = msg[1].len; /* length */ -+wrop: buf[1] = msg[0].addr<<1; /* demod addr */ -+ /* register */ -+ buf[2] = msg[0].buf[0]; -+ -+ ret = tbsusb_op_wr(d, 0x90, 0x91, 5000, 0, buf, 3, msg[1].buf, -+ msg[1].len); -+ break; -+ case 0x10000|USB_PID_TENOW_TBS5980: -+ case 0x10000|USB_PID_TENOW_TBS5925: -+ case 0x10000|USB_PID_TENOW_TBS5920: -+ switch (msg[0].addr) { -+ case 0x6a: -+ case 0x68: -+ case 0x61: -+ case 0x60: -+ if (!msg[0].flags) { -+ j = 0; -+ goto wraddr; -+ } else { -+ buf[0] = msg[0].len; /* length */ -+ buf[1] = msg[0].addr<<1; /* addr */ -+ buf[2] = 0x00; -+ ret = tbsusb_op_wr(d, 0x90, 0x91, 0, 0, buf, 3, -+ msg[0].buf, msg[0].len); -+ } -+ break; -+ } -+ break; -+ case 0x10000|USB_PID_TENOW_TBS5928: -+ switch (msg[0].addr) { -+ case 0x55: -+ if (msg[0].buf[0] == 0xf7) { -+ /* firmware */ -+ /* Write in small blocks */ -+ buf[2] = 0xf7; -+ goto wrfw; -+ } else { -+ /* write to register */ -+ j = 0; -+ goto wraddr; -+ } -+ break; -+ case 0x60: -+ /* write to register */ -+ goto wraddr; -+ } -+ break; -+ case 0x10000|USB_PID_TENOW_TBS5921: -+ switch (msg[0].addr) { -+ case 0x55: -+ if (msg[0].buf[0] == 0xfa) { -+ /* firmware */ -+ /* Write in small blocks */ -+ buf[2] = 0xfa; -+wrfw: buf[0] = 0x12; -+ buf[1] = 0xaa; -+ j = msg[0].len - 1; -+ i = 1; -+ do { -+ memcpy(buf + 3, msg[0].buf + i, -+ j > 16 ? 16 : j); -+ ret = tbsusb_op_w(d, 0x80, 0, buf, -+ j > 16 ? 19 : j+3); -+ i += 16; -+ j -= 16; -+ } while (!ret && j > 0); -+ } else { -+ /* write to register */ -+ j = 0; -+ goto wraddr; -+ } -+ break; -+ case 0x60: -+ /* write to register */ -+ goto wraddr; -+ break; -+ } -+ break; -+ case 0x10000|USB_PID_TENOW_TBS5910: -+ switch (msg[0].addr) { -+ case 0x61: -+ case 0x60: -+ if (!msg[0].flags) { -+ /* write to tuner pll */ -+ goto wraddr; -+ } -+ break; -+ case 0x68: -+ /* write to stv0299 register */ -+wraddr: if (msg[0].len+2 > sizeof(buf)) -+ break; -+ buf[0] = msg[0].len+1; /* length */ -+ buf[1] = msg[0].addr<<1; /* addr */ -+ /* register */ -+ memcpy(buf+2, msg[0].buf, msg[0].len); -+ ret = tbsusb_op_w(d, 0x80, j, buf, msg[0].len+2); -+ break; -+ } -+ break; -+ } -+ -+ if (ret) -+ return ret; -+ return num; -+} -+ -+static u32 tbsusb_i2c_func(struct i2c_adapter *adapter) -+{ -+ return I2C_FUNC_I2C; -+} -+ -+static struct i2c_algorithm tbsusb_i2c_algo = { -+ .master_xfer = tbsusb_i2c_transfer, -+ .functionality = tbsusb_i2c_func, -+}; -+ -+static int tbsusb_ci_setup(struct dvb_ca_en50221 *ca, struct dvb_usb_device **d, -+ struct tbsusbci_state **state, int slot) -+{ -+ if (slot) -+ return -EINVAL; -+ if (ca && ca->data) { -+ *d = (struct dvb_usb_device *)ca->data; -+ if (*d && (*d)->udev && (*d)->priv) { -+ *state = (struct tbsusbci_state *)(*d)->priv; -+ mutex_lock(&(*state)->ca_mutex); -+ return 0; -+ } -+ } -+ return -ENODEV; -+} -+ -+static void tbsusb_ci_finish(struct tbsusbci_state *state) -+{ -+ mutex_unlock(&state->ca_mutex); -+} -+ -+static int tbsusb_slot_reset(struct dvb_ca_en50221 *ca, int slot) -+{ -+ static u8 msg1[2] = {0x01, 0x00}; -+ static u8 msg2[2] = {0x01, 0x01}; -+ struct dvb_usb_device *d; -+ struct tbsusbci_state *state; -+ int ret; -+ -+ ret = tbsusb_ci_setup(ca, &d, &state, slot); -+ if (ret) -+ return ret; -+ -+ ret = tbsusb_op_ww(d, 0xa6, 0xa6, 5000, 0, msg1, 2, msg2, 2); -+ if (!ret) -+ msleep(1400); -+ -+ tbsusb_ci_finish(state); -+ -+ return ret; -+} -+ -+static int tbsusb_cam_read(struct dvb_ca_en50221 *ca, int slot, int address, -+ u8 where) -+{ -+ struct dvb_usb_device *d; -+ struct tbsusbci_state *state; -+ int ret; -+ u8 buf[4], rbuf[1]; -+ -+ buf[0] = 1; -+ buf[1] = where; -+ buf[2] = (address >> 8) & 0x0f; -+ buf[3] = address; -+ -+ ret = tbsusb_ci_setup(ca, &d, &state, slot); -+ if (ret) -+ return ret; -+ -+ ret = tbsusb_op_wr(d, 0xa4, 0xa5, 0, 0, buf, 4, rbuf, 1); -+ -+ tbsusb_ci_finish(state); -+ -+ if (ret) -+ return ret; -+ -+ return rbuf[0]; -+} -+ -+static int tbsusb_cam_write(struct dvb_ca_en50221 *ca, int slot, int address, -+ u8 value, u8 where) -+{ -+ struct dvb_usb_device *d; -+ struct tbsusbci_state *state; -+ int ret; -+ u8 buf[5]; -+ -+ buf[0] = 1; -+ buf[1] = where; -+ buf[2] = (address >> 8) & 0x0f; -+ buf[3] = address; -+ buf[4] = value; -+ -+ ret = tbsusb_ci_setup(ca, &d, &state, slot); -+ if (ret) -+ return ret; -+ -+ ret = tbsusb_op_w(d, 0xa2, 0, buf, 5); -+ -+ tbsusb_ci_finish(state); -+ -+ if (ret) -+ return ret; -+ -+ return 0; -+} -+ -+static int tbsusb_read_attribute_mem(struct dvb_ca_en50221 *ca, -+ int slot, int address) -+{ -+ return tbsusb_cam_read(ca, slot, address, 0); -+} -+ -+static int tbsusb_write_attribute_mem(struct dvb_ca_en50221 *ca, -+ int slot, int address, u8 value) -+{ -+ return tbsusb_cam_write(ca, slot, address, value, 0); -+} -+ -+static int tbsusb_read_cam_control(struct dvb_ca_en50221 *ca, int slot, -+ u8 address) -+{ -+ return tbsusb_cam_read(ca, slot, address, 1); -+} -+ -+static int tbsusb_write_cam_control(struct dvb_ca_en50221 *ca, int slot, -+ u8 address, u8 value) -+{ -+ return tbsusb_cam_write(ca, slot, address, value, 1); -+} -+ -+static int tbsusb_set_video_port(struct dvb_ca_en50221 *ca, -+ int slot, int enable) -+{ -+ struct dvb_usb_device *d; -+ struct tbsusbci_state *state; -+ int ret; -+ u8 buf[2]; -+ -+ buf[0] = 2; -+ buf[1] = enable; -+ -+ ret = tbsusb_ci_setup(ca, &d, &state, slot); -+ if (ret) -+ return ret; -+ -+ ret = tbsusb_op_w(d, 0xa6, 0, buf, 2); -+ -+ tbsusb_ci_finish(state); -+ -+ if (ret) { -+ err("CI not %sabled.", enable ? "en" : "dis"); -+ return ret; -+ } -+ -+ deb_info("CI %sabled.", enable ? "en" : "dis"); -+ return 0; -+} -+ -+static int tbsusb_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) -+{ -+ return tbsusb_set_video_port(ca, slot, 0); -+} -+ -+static int tbsusb_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) -+{ -+ return tbsusb_set_video_port(ca, slot, 1); -+} -+ -+static int tbsusb_poll_slot_status(struct dvb_ca_en50221 *ca, -+ int slot, int open) -+{ -+ struct dvb_usb_device *d; -+ struct tbsusbci_state *state; -+ int ret; -+ u8 buf[3]; -+ -+ ret = tbsusb_ci_setup(ca, &d, &state, slot); -+ if (ret) -+ return 0; -+ -+ ret = tbsusb_op_r(d, 0xa8, 0, buf, 3); -+ -+ tbsusb_ci_finish(state); -+ -+ if (ret || buf[0] != 0xa9 || buf[1] != 1 || buf[2] != 1) -+ return 0; -+ -+ return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; -+} -+ -+static void tbsusbci_uninit(struct dvb_usb_device *d) -+{ -+ struct tbsusbci_state *state; -+ -+ if (d && d->priv) -+ state = (struct tbsusbci_state *)d->priv; -+ else -+ return; -+ -+ if (!state || !state->ca.data) -+ return; -+ -+ dvb_ca_en50221_release(&state->ca); -+ memset(&state->ca, 0, sizeof(state->ca)); -+} -+ -+static int tbsusbci_init(struct dvb_usb_adapter *a) -+{ -+ struct tbsusbci_state *state; -+ int ret = -ENODEV; -+ -+ if (a && a->dev && a->dev->priv) -+ state = (struct tbsusbci_state *)a->dev->priv; -+ else -+ goto err; -+ -+ mutex_init(&state->ca_mutex); -+ -+ state->ca.owner = THIS_MODULE; -+ state->ca.read_attribute_mem = tbsusb_read_attribute_mem; -+ state->ca.write_attribute_mem = tbsusb_write_attribute_mem; -+ state->ca.read_cam_control = tbsusb_read_cam_control; -+ state->ca.write_cam_control = tbsusb_write_cam_control; -+ state->ca.slot_reset = tbsusb_slot_reset; -+ state->ca.slot_shutdown = tbsusb_slot_shutdown; -+ state->ca.slot_ts_enable = tbsusb_slot_ts_enable; -+ state->ca.poll_slot_status = tbsusb_poll_slot_status; -+ state->ca.data = a->dev; -+ -+ ret = dvb_ca_en50221_init(&a->dvb_adap, &state->ca, 0, 1); -+ if (ret) -+ goto err; -+ -+ ret = tbsusb_poll_slot_status(&state->ca, 0, 0); -+ if (!ret) -+ ret = tbsusb_set_video_port(&state->ca, 0, 0); -+ if (ret < 0) { -+ dvb_ca_en50221_release(&state->ca); -+ goto err; -+ } -+ if (ret) -+ deb_info("CI initialized."); -+ return 0; -+ -+err: err("Cannot initialize CI: Error %d.", ret); -+ memset(&state->ca, 0, sizeof(state->ca)); -+ return ret; -+} -+ -+static const struct stv090x_config stv0903_config = { -+ .device = STV0903, -+ .demod_mode = STV090x_SINGLE, -+ .clk_mode = STV090x_CLK_EXT, -+ -+ .xtal = 27000000, -+ .address = 0x6a, -+ -+ .ts1_mode = STV090x_TSMODE_DVBCI, -+ .ts2_mode = STV090x_TSMODE_SERIAL_CONTINUOUS, -+ -+ .repeater_level = STV090x_RPTLEVEL_16, -+ .adc1_range = STV090x_ADC_2Vpp, -+ -+ .tuner_get_frequency = stb6100_get_frequency, -+ .tuner_set_frequency = stb6100_set_frequency, -+ .tuner_set_bandwidth = stb6100_set_bandwidth, -+ .tuner_get_bandwidth = stb6100_get_bandwidth, -+ -+ .set_lock_led = tbsusb_led_ctrl, -+}; -+ -+static const struct stv090x_config stv0900_config = { -+ .device = STV0900, -+ .demod_mode = STV090x_SINGLE, -+ .clk_mode = STV090x_CLK_EXT, -+ -+ .xtal = 27000000, -+ .address = 0x68, -+ -+ .ts1_mode = STV090x_TSMODE_DVBCI, -+ .ts2_mode = STV090x_TSMODE_SERIAL_CONTINUOUS, -+ -+ .repeater_level = STV090x_RPTLEVEL_16, -+ .adc1_range = STV090x_ADC_2Vpp, -+ -+ .tuner_get_frequency = stb6100_get_frequency, -+ .tuner_set_frequency = stb6100_set_frequency, -+ .tuner_set_bandwidth = stb6100_set_bandwidth, -+ .tuner_get_bandwidth = stb6100_get_bandwidth, -+ -+ .set_lock_led = tbsusb_led_ctrl, -+}; -+ -+static const struct tda10071_config tda10071_config = { -+ .demod_i2c_addr = 0x55, /* (0xaa >> 1) */ -+ .tuner_i2c_addr = 0x14, -+ .i2c_wr_max = 64, -+ .ts_mode = TDA10071_TS_PARALLEL, -+ .spec_inv = 0, -+ .xtal = 40444000, /* 40.444 MHz */ -+ .pll_multiplier = 20, -+ .set_lock_led = tbsusb_led_ctrl, -+}; -+ -+static const struct cx24116_config cx24116_config = { -+ .demod_address = 0x55, -+ .mpg_clk_pos_pol = 0x01, -+ .set_lock_led = tbsusb_led_ctrl, -+}; -+ -+static const struct stv0288_config stv0288_config = { -+ .demod_address = 0x68, -+ .set_lock_led = tbsusb_led_ctrl, -+}; -+ -+static int tbsusb_frontend_attach(struct dvb_usb_adapter *d) -+{ -+ static u8 msg1[2] = {0x07, 0x01}; -+ static u8 msg2[2] = {0x01, 0x01}; -+ static u8 msg3[2] = {0x06, 0x01}; -+ u8 *txt; -+ int ret = -ENODEV; -+ -+ if (!d || !d->dev || !d->dev->desc) { -+ d->fe_adap[0].fe = NULL; -+ goto err; -+ } -+ -+ switch (d->dev->desc->cold_ids[0]->idProduct) { -+ case USB_PID_TENOW_TBS5980: -+ case USB_PID_TENOW_TBS5920: -+ d->fe_adap[0].fe = dvb_attach(stv090x_attach, &stv0903_config, -+ &d->dev->i2c_adap, STV090x_DEMODULATOR_0); -+ break; -+ case USB_PID_TENOW_TBS5925: -+ d->fe_adap[0].fe = dvb_attach(stv090x_attach, &stv0900_config, -+ &d->dev->i2c_adap, STV090x_DEMODULATOR_0); -+ break; -+ case USB_PID_TENOW_TBS5928: -+ d->fe_adap[0].fe = dvb_attach(cx24116_attach, &cx24116_config, -+ &d->dev->i2c_adap); -+ break; -+ case USB_PID_TENOW_TBS5910: -+ d->fe_adap[0].fe = dvb_attach(stv0288_attach, &stv0288_config, -+ &d->dev->i2c_adap); -+ break; -+ case USB_PID_TENOW_TBS5921: -+ d->fe_adap[0].fe = dvb_attach(tda10071_attach, &tda10071_config, -+ &d->dev->i2c_adap); -+ } -+ -+ if (!d->fe_adap[0].fe) -+ goto err; -+ -+ d->fe_adap[0].fe->ops.set_voltage = tbsusb_set_voltage; -+ -+ switch (d->dev->desc->cold_ids[0]->idProduct) { -+ case USB_PID_TENOW_TBS5980: -+ txt = "Attached stv0903!"; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg1, 2); -+ if (ret) -+ goto err; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg2, 2); -+ if (ret) -+ goto err; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg3, 2); -+ if (ret) -+ goto err; -+ ret = tbsusbci_init(d); -+ if (ret) -+ goto err; -+ break; -+ case USB_PID_TENOW_TBS5921: -+ txt = "Attached tda10071!"; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg1, 2); -+ if (ret) -+ goto err; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg2, 2); -+ if (ret) -+ goto err; -+ break; -+ case USB_PID_TENOW_TBS5925: -+ txt = "Attached stv0900!"; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg3, 2); -+ if (ret) -+ goto err; -+ ret = tbsusb_op_w(d->dev, 0x8a, 0, msg2, 2); -+ if (ret) -+ goto err; -+ goto wr0701; -+ case USB_PID_TENOW_TBS5920: -+ txt = "Attached stv0903!"; -+ goto wr0701; -+ case USB_PID_TENOW_TBS5928: -+ txt = "Attached cx24116!"; -+ goto wr0701; -+ case USB_PID_TENOW_TBS5910: -+ txt = "Attached stv0288!"; -+wr0701: ret = tbsusb_op_w(d->dev, 0x8a, 0, msg1, 2); -+ if (ret) -+ goto err; -+ break; -+ } -+ -+ deb_info(txt); -+ -+err: if (ret && d->fe_adap[0].fe) { -+ dvb_frontend_detach(d->fe_adap[0].fe); -+ d->fe_adap[0].fe = NULL; -+ } -+ -+ return ret; -+} -+ -+static struct stb6100_config stb6100_config = { -+ .tuner_address = 0x60, -+ .refclock = 27000000, -+}; -+ -+static int tbsusb_tuner_attach(struct dvb_usb_adapter *adap) -+{ -+ int ret = -EIO; -+ -+ if (!adap || !adap->dev || !adap->dev->desc || !adap->fe_adap[0].fe) -+ return -ENODEV; -+ -+ switch (adap->dev->desc->cold_ids[0]->idProduct) { -+ case USB_PID_TENOW_TBS5980: -+ case USB_PID_TENOW_TBS5925: -+ case USB_PID_TENOW_TBS5920: -+ if (!dvb_attach(stb6100_attach, adap->fe_adap[0].fe, -+ &stb6100_config, &adap->dev->i2c_adap)) -+ goto err; -+ else -+ ret = 0; -+ deb_info("Attached stb6100!"); -+ if (adap->dev->desc->cold_ids[0]->idProduct != -+ USB_PID_TENOW_TBS5925) -+ break; -+ /* call the init function once to initialize -+ tuner's clock output divider and demod's -+ master clock */ -+ if (adap->fe_adap[0].fe->ops.init) -+ adap->fe_adap[0].fe->ops.init(adap->fe_adap[0].fe); -+ break; -+ case USB_PID_TENOW_TBS5910: -+ if (!dvb_attach(stb6000_attach, adap->fe_adap[0].fe, 0x61, -+ &adap->dev->i2c_adap)) -+ goto err; -+ else -+ ret = 0; -+ deb_info("Attached stb6000!"); -+ break; -+ } -+ -+err: return ret; -+} -+ -+enum tbsusb_index { -+ TBS5980_INDEX = 0, -+ TBS5925_INDEX, -+ TBS5920_INDEX, -+ TBS5928_INDEX, -+ TBS5910_INDEX, -+ TBS5921_INDEX, -+ TBSMAX_INDEX -+}; -+ -+static struct usb_device_id tbsusb_table[] = { -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5980)}, -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5925)}, -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5920)}, -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5928)}, -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5910)}, -+ {USB_DEVICE(USB_VID_TENOW, USB_PID_TENOW_TBS5921)}, -+ { } -+}; -+ -+MODULE_DEVICE_TABLE(usb, tbsusb_table); -+ -+#define TBSUSB_DEVICE_PROPERTIES(priv, fw, intvl, tunerproc, devname, index) { \ -+ .caps = DVB_USB_IS_AN_I2C_ADAPTER, \ -+ .usb_ctrl = DEVICE_SPECIFIC, \ -+ .size_of_priv = sizeof(struct priv), \ -+ .firmware = fw, \ -+ .no_reconnect = 1, \ -+ .i2c_algo = &tbsusb_i2c_algo, \ -+ .rc.legacy = { \ -+ .rc_map_table = tbsusb_rc_keys, \ -+ .rc_map_size = ARRAY_SIZE(tbsusb_rc_keys), \ -+ .rc_interval = intvl, \ -+ .rc_query = tbsusb_rc_query, \ -+ }, \ -+ .generic_bulk_ctrl_endpoint = 0x81, \ -+ .num_adapters = 1, \ -+ .download_firmware = tbsusb_load_firmware, \ -+ .read_mac_address = tbsusb_read_mac_address, \ -+ .adapter = { { \ -+ .num_frontends = 1, \ -+ .fe = { { \ -+ .frontend_attach = tbsusb_frontend_attach, \ -+ .streaming_ctrl = NULL, \ -+ .tuner_attach = tunerproc, \ -+ .stream = { \ -+ .type = USB_BULK, \ -+ .count = 8, \ -+ .endpoint = 0x82, \ -+ .u = { \ -+ .bulk = { \ -+ .buffersize = 4096, \ -+ } \ -+ } \ -+ }, \ -+ } }, \ -+ } }, \ -+ .num_device_descs = 1, \ -+ .devices = { { \ -+ .name = devname, \ -+ .cold_ids = {&tbsusb_table[index], NULL}, \ -+ .warm_ids = {NULL}, \ -+ } } \ -+} -+ -+static struct dvb_usb_device_properties tbsusb_properties[] = { -+ TBSUSB_DEVICE_PROPERTIES(tbsusbci_state, "dvb-usb-tbsqbox-id5980.fw", -+ 450, tbsusb_tuner_attach, "TBS Qbox DVB-S2 CI USB2.0 (TBS5980)", -+ TBS5980_INDEX), -+ TBSUSB_DEVICE_PROPERTIES(tbsusb_state, "dvb-usb-tbsqbox-id5925.fw", -+ 250, tbsusb_tuner_attach, "TBS 5925 DVB-S2 USB2.0", -+ TBS5925_INDEX), -+ TBSUSB_DEVICE_PROPERTIES(tbsusb_state, "dvb-usb-tbsqbox-id5920.fw", -+ 150, tbsusb_tuner_attach, "TBS QBOX2 DVBS USB2.0 (TBS5920)", -+ TBS5920_INDEX), -+ TBSUSB_DEVICE_PROPERTIES(tbsusb_state, "dvb-usb-tbsqbox-id5928.fw", -+ 150, NULL, "TBS QBOXS2 DVBS2 USB2.0 (TBS5928)", -+ TBS5928_INDEX), -+ TBSUSB_DEVICE_PROPERTIES(tbsusb_state, "dvb-usb-tbsqbox-id5910.fw", -+ 150, tbsusb_tuner_attach, "TBS QBOX DVBS USB2.0 (TBS5910)", -+ TBS5910_INDEX), -+ TBSUSB_DEVICE_PROPERTIES(tbsusb_state, "dvb-usb-tbsqbox-id5921.fw", -+ 150, NULL, "TBS QBOXS3 DVBS2 USB2.0 (TBS5921)", -+ TBS5921_INDEX) -+}; -+ -+static int tbsusb_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ int i; -+ -+ for (i = 0; i < TBSMAX_INDEX; i++) -+ if (!dvb_usb_device_init(intf, &tbsusb_properties[i], -+ THIS_MODULE, NULL, adapter_nr)) -+ return 0; -+ return -ENODEV; -+} -+ -+static void tbsusb_usb_disconnect(struct usb_interface *dev) -+{ -+ struct dvb_usb_device *d = usb_get_intfdata(dev); -+ -+ if (d && d->desc && d->desc->cold_ids[0]->idProduct == -+ USB_PID_TENOW_TBS5980) -+ tbsusbci_uninit(d); -+ dvb_usb_device_exit(dev); -+} -+ -+static struct usb_driver tbsusb_driver = { -+ .name = "tbsusb", -+ .probe = tbsusb_probe, -+ .disconnect = tbsusb_usb_disconnect, -+ .id_table = tbsusb_table, -+}; -+ -+module_usb_driver(tbsusb_driver); -+ -+MODULE_AUTHOR("Various Authors"); -+MODULE_DESCRIPTION("TBS 5980/5928/5925/5921/5920/5910 USB2.0 DVB-S/S2 driver"); -+MODULE_VERSION("1.0"); -+MODULE_LICENSE("GPL"); -diff --git a/drivers/media/usb/dvb-usb/tbs-usb.h b/drivers/media/usb/dvb-usb/tbs-usb.h -new file mode 100644 -index 0000000..2a0a112 ---- /dev/null -+++ b/drivers/media/usb/dvb-usb/tbs-usb.h -@@ -0,0 +1,9 @@ -+#ifndef _DVB_USB_TBSUSB_H_ -+#define _DVB_USB_TBSUSB_H_ -+ -+#define DVB_USB_LOG_PREFIX "tbsusb" -+#include "dvb-usb.h" -+ -+#define deb_xfer(args...) dprintk(dvb_usb_tbsusb_debug, 0x02, args) -+#define deb_info(args...) dprintk(dvb_usb_tbsusb_debug, 0x01, args) -+#endif --- -2.1.4 - diff --git a/archive-patches/armbox/hd51/0001-TBS-fixes-for-4.6-kernel.patch b/archive-patches/armbox/hd51/0001-TBS-fixes-for-4.6-kernel.patch deleted file mode 100644 index d19e387..0000000 --- a/archive-patches/armbox/hd51/0001-TBS-fixes-for-4.6-kernel.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1553b610994b399f4d42772f4a9565a4ce2a1245 Mon Sep 17 00:00:00 2001 -From: Athanasios Oikonomou -Date: Sat, 5 Mar 2016 01:34:21 +0200 -Subject: [PATCH] TBS: fixes for 4.3 kernel - -Change fe_sec_voltage_t to enum fe_sec_voltage. - -Remove TBS5921 because it uses tda10071_config that is unavailable. -Driver should use I2C platform data now in order to load tda10071. -More info: https://patchwork.linuxtv.org/patch/30472/ - -diff --git a/drivers/media/usb/dvb-usb/tbs-usb.c b/drivers/media/usb/dvb-usb/tbs-usb.c -index f142be3..98347c9 100644 ---- a/drivers/media/usb/dvb-usb/tbs-usb.c -+++ b/drivers/media/usb/dvb-usb/tbs-usb.c -@@ -339,7 +339,7 @@ static int tbsusb_set_pin(struct dvb_frontend *fe, u8 *what) - } - - static int tbsusb_set_voltage(struct dvb_frontend *fe, -- fe_sec_voltage_t voltage) -+ enum fe_sec_voltage voltage) - { - static u8 command_13v[2] = {0x03, 0x00}; - static u8 command_18v[2] = {0x03, 0x01}; -@@ -787,17 +787,6 @@ static const struct stv090x_config stv0900_config = { - .set_lock_led = tbsusb_led_ctrl, - }; - --static const struct tda10071_config tda10071_config = { -- .demod_i2c_addr = 0x55, /* (0xaa >> 1) */ -- .tuner_i2c_addr = 0x14, -- .i2c_wr_max = 64, -- .ts_mode = TDA10071_TS_PARALLEL, -- .spec_inv = 0, -- .xtal = 40444000, /* 40.444 MHz */ -- .pll_multiplier = 20, -- .set_lock_led = tbsusb_led_ctrl, --}; -- - static const struct cx24116_config cx24116_config = { - .demod_address = 0x55, - .mpg_clk_pos_pol = 0x01, -@@ -840,9 +829,6 @@ static int tbsusb_frontend_attach(struct dvb_usb_adapter *d) - d->fe_adap[0].fe = dvb_attach(stv0288_attach, &stv0288_config, - &d->dev->i2c_adap); - break; -- case USB_PID_TENOW_TBS5921: -- d->fe_adap[0].fe = dvb_attach(tda10071_attach, &tda10071_config, -- &d->dev->i2c_adap); - } - - if (!d->fe_adap[0].fe) --- -2.1.4 - diff --git a/archive-patches/armbox/hd51/0001-stv090x-optimized-TS-sync-control.patch b/archive-patches/armbox/hd51/0001-stv090x-optimized-TS-sync-control.patch deleted file mode 100644 index 1ee3cee..0000000 --- a/archive-patches/armbox/hd51/0001-stv090x-optimized-TS-sync-control.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 8cc2e0072bc2dfc9a64b569e2b7bb804bf82bc55 Mon Sep 17 00:00:00 2001 -From: Athanasios Oikonomou -Date: Thu, 17 Mar 2016 06:53:34 +0200 -Subject: [PATCH] stv090x: optimized TS sync control - -Based on crazycat commits: -stv090x: Minimum latence TS FIFO mode for DVB-S2. -https://github.com/Taapat/driver/commit/b831c1a22b96ece05d0af1cc1e55d5e34d2ca13b -stv090x: optimized TS sync control. -https://github.com/Taapat/driver/commit/f2cacf05651efe48bb5abb02df94646a0d712362 - -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index 12fd3d0..396e0ab 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -3017,6 +3017,28 @@ static int stv090x_optimize_track(struct stv090x_state *state) - srate = stv090x_get_srate(state, state->internal->mclk); - srate += stv090x_get_tmgoffst(state, srate); - -+ if (state->delsys == STV090x_DVBS2 && srate > 10000000) { -+ reg = stv090x_read_reg(state, STV090x_P1_TSSTATEM); -+ STV090x_SETFIELD_Px(reg, TSOUT_NOSYNC, 1); -+ if (stv090x_write_reg(state, STV090x_P1_TSSTATEM, reg) < 0) -+ goto err; -+ -+ reg = stv090x_read_reg(state, STV090x_P1_TSSYNC); -+ STV090x_SETFIELD_Px(reg, TSFIFO_SYNCMODE, 2); -+ if (stv090x_write_reg(state, STV090x_P1_TSSYNC, reg) < 0) -+ goto err; -+ } else { -+ reg = stv090x_read_reg(state, STV090x_P1_TSSTATEM); -+ STV090x_SETFIELD_Px(reg, TSOUT_NOSYNC, 0); -+ if (stv090x_write_reg(state, STV090x_P1_TSSTATEM, reg) < 0) -+ goto err; -+ -+ reg = stv090x_read_reg(state, STV090x_P1_TSSYNC); -+ STV090x_SETFIELD_Px(reg, TSFIFO_SYNCMODE, 0); -+ if (stv090x_write_reg(state, STV090x_P1_TSSYNC, reg) < 0) -+ goto err; -+ } -+ - switch (state->delsys) { - case STV090x_DVBS1: - case STV090x_DSS: -@@ -4517,10 +4539,6 @@ static int stv0900_set_tspath(struct stv090x_state *state) - case STV090x_TSMODE_DVBCI: - if (stv090x_write_reg(state, STV090x_TSGENERAL, 0x06) < 0) /* Mux'd stream mode */ - goto err; -- reg = stv090x_read_reg(state, STV090x_P1_TSCFGM); -- STV090x_SETFIELD_Px(reg, TSFIFO_MANSPEED_FIELD, 3); -- if (stv090x_write_reg(state, STV090x_P1_TSCFGM, reg) < 0) -- goto err; - reg = stv090x_read_reg(state, STV090x_P2_TSCFGM); - STV090x_SETFIELD_Px(reg, TSFIFO_MANSPEED_FIELD, 3); - if (stv090x_write_reg(state, STV090x_P2_TSCFGM, reg) < 0) -diff --git a/drivers/media/dvb-frontends/stv090x_reg.h b/drivers/media/dvb-frontends/stv090x_reg.h -index 93741ee..c1dac9c 100644 ---- a/drivers/media/dvb-frontends/stv090x_reg.h -+++ b/drivers/media/dvb-frontends/stv090x_reg.h -@@ -2106,6 +2106,14 @@ - #define STV090x_WIDTH_Px_TSDIL_ON_FIELD 1 - #define STV090x_OFFST_Px_TSRS_ON_FIELD 5 - #define STV090x_WIDTH_Px_TSRS_ON_FIELD 1 -+#define STV090x_OFFST_Px_TSDESCRAMB_ON 4 -+#define STV090x_WIDTH_Px_TSDESCRAMB_ON 1 -+#define STV090x_OFFST_Px_TSFRAME_MODE 3 -+#define STV090x_WIDTH_Px_TSFRAME_MODE 1 -+#define STV090x_OFFST_Px_TS_DISABLE 2 -+#define STV090x_WIDTH_Px_TS_DISABLE 1 -+#define STV090x_OFFST_Px_TSOUT_NOSYNC 0 -+#define STV090x_WIDTH_Px_TSOUT_NOSYNC 1 - - #define STV090x_Px_TSCFGH(__x) (0xF572 - (__x - 1) * 0x200) - #define STV090x_P1_TSCFGH STV090x_Px_TSCFGH(1) -@@ -2149,6 +2157,14 @@ - #define STV090x_OFFST_Px_TSFIFO_DPUNACT_FIELD 1 - #define STV090x_WIDTH_Px_TSFIFO_DPUNACT_FIELD 1 - -+#define STV090x_Px_TSSYNC(__x) (0xF575 - (__x - 1) * 0x200) -+#define STV090x_P1_TSSYNC STV090x_Px_TSSYNC(1) -+#define STV090x_P2_TSSYNC STV090x_Px_TSSYNC(2) -+#define STV090x_OFFST_Px_TSFIFO_FISCR3B 5 -+#define STV090x_WIDTH_Px_TSFIFO_FISCR3B 2 -+#define STV090x_OFFST_Px_TSFIFO_SYNCMODE 3 -+#define STV090x_WIDTH_Px_TSFIFO_SYNCMODE 2 -+ - #define STV090x_Px_TSINSDELH(__x) (0xF576 - (__x - 1) * 0x200) - #define STV090x_P1_TSINSDELH STV090x_Px_TSINSDELH(1) - #define STV090x_P2_TSINSDELH STV090x_Px_TSINSDELH(2) --- -2.1.4 - diff --git a/archive-patches/armbox/hd51/TBS-fixes-for-4.10-kernel.patch b/archive-patches/armbox/hd51/TBS-fixes-for-4.10-kernel.patch deleted file mode 100644 index d96d50a..0000000 --- a/archive-patches/armbox/hd51/TBS-fixes-for-4.10-kernel.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h -index 779f4224b63e..ae6005436639 100644 ---- a/drivers/media/dvb-core/dvb-usb-ids.h -+++ b/drivers/media/dvb-core/dvb-usb-ids.h -@@ -411,6 +411,6 @@ - #define USB_PID_PCTV_2002E_SE 0x025d - #define USB_PID_SVEON_STV27 0xd3af - #define USB_PID_TURBOX_DTT_2000 0xd3a4 --#define USB_PID_WINTV_SOLOHD 0x0264 - #define USB_PID_EVOLVEO_XTRATV_STICK 0xa115 -+#define USB_PID_WINTV_SOLOHD 0x0264 - #endif -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index 7ef469c0c866..b586d2a49737 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -3692,12 +3692,9 @@ static int stv090x_read_cnr(struct dvb_frontend *fe, u16 *cnr) - } - val /= 16; - last = ARRAY_SIZE(stv090x_s2cn_tab) - 1; -- div = stv090x_s2cn_tab[last].real - -- stv090x_s2cn_tab[3].real; -- val = stv090x_table_lookup(stv090x_s2cn_tab, last, val); -- if (val < 0) -- val = 0; -- *cnr = val * 0xFFFF / div; -+ div = stv090x_s2cn_tab[0].read - -+ stv090x_s2cn_tab[last].read; -+ *cnr = 0xFFFF - ((val * 0xFFFF) / div); - } - break; - -@@ -3717,10 +3714,9 @@ static int stv090x_read_cnr(struct dvb_frontend *fe, u16 *cnr) - } - val /= 16; - last = ARRAY_SIZE(stv090x_s1cn_tab) - 1; -- div = stv090x_s1cn_tab[last].real - -- stv090x_s1cn_tab[0].real; -- val = stv090x_table_lookup(stv090x_s1cn_tab, last, val); -- *cnr = val * 0xFFFF / div; -+ div = stv090x_s1cn_tab[0].read - -+ stv090x_s1cn_tab[last].read; -+ *cnr = 0xFFFF - ((val * 0xFFFF) / div); - } - break; - default: diff --git a/archive-patches/armbox/hd51/add-more-devices-rtl8xxxu.patch b/archive-patches/armbox/hd51/add-more-devices-rtl8xxxu.patch deleted file mode 100644 index 45789b5..0000000 --- a/archive-patches/armbox/hd51/add-more-devices-rtl8xxxu.patch +++ /dev/null @@ -1,65 +0,0 @@ -Date: Sat, 22 Nov 2017 21:30:00 +0200 -Subject: [rtl8xxxu] Add more devices support - -rtl8xxxu: Mark 8192eu device 0x0bda:0x818b as tested -rtl8xxxu: Add another 8192eu device to the USB list -rtl8xxxu: Add USB ID for D-Link DWA-131 rev E1 (rtl8192eu) -rtl8xxxu: Add additional USB IDs for rtl8192eu devices -rtl8xxxu: Update author/maintainer contact info - -diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ---- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 2017-03-29 16:58:08 +0200 -+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 2017-05-22 21:04:21 +0200 -@@ -1,7 +1,7 @@ - /* - * RTL8XXXU mac80211 USB driver - * -- * Copyright (c) 2014 - 2016 Jes Sorensen -+ * Copyright (c) 2014 - 2017 Jes Sorensen - * - * Portions, notably calibration code: - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -@@ -48,7 +48,7 @@ - static int rtl8xxxu_dma_agg_timeout = -1; - static int rtl8xxxu_dma_agg_pages = -1; - --MODULE_AUTHOR("Jes Sorensen "); -+MODULE_AUTHOR("Jes Sorensen "); - MODULE_DESCRIPTION("RTL8XXXu USB mac80211 Wireless LAN Driver"); - MODULE_LICENSE("GPL"); - MODULE_FIRMWARE("rtlwifi/rtl8723aufw_A.bin"); -@@ -6000,6 +6000,7 @@ - case 0x8176: - case 0x8178: - case 0x817f: -+ case 0x818b: - untested = 0; - break; - } -@@ -6196,6 +6197,12 @@ - .driver_info = (unsigned long)&rtl8723au_fops}, - {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x818b, 0xff, 0xff, 0xff), - .driver_info = (unsigned long)&rtl8192eu_fops}, -+/* TP-Link TL-WN822N v4 */ -+{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0108, 0xff, 0xff, 0xff), -+ .driver_info = (unsigned long)&rtl8192eu_fops}, -+/* D-Link DWA-131 rev E1, tested by David Patiño */ -+{USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3319, 0xff, 0xff, 0xff), -+ .driver_info = (unsigned long)&rtl8192eu_fops}, - /* Tested by Myckel Habets */ - {USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0109, 0xff, 0xff, 0xff), - .driver_info = (unsigned long)&rtl8192eu_fops}, -@@ -6347,6 +6354,13 @@ - .driver_info = (unsigned long)&rtl8192cu_fops}, - {USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0x7822, 0xff, 0xff, 0xff), - .driver_info = (unsigned long)&rtl8192cu_fops}, -+/* found in rtl8192eu vendor driver */ -+{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0107, 0xff, 0xff, 0xff), -+ .driver_info = (unsigned long)&rtl8192eu_fops}, -+{USB_DEVICE_AND_INTERFACE_INFO(0x2019, 0xab33, 0xff, 0xff, 0xff), -+ .driver_info = (unsigned long)&rtl8192eu_fops}, -+{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x818c, 0xff, 0xff, 0xff), -+ .driver_info = (unsigned long)&rtl8192eu_fops}, - #endif - { } - }; diff --git a/archive-patches/armbox/hd51/blacklist_mmc0.patch b/archive-patches/armbox/hd51/blacklist_mmc0.patch deleted file mode 100644 index 5d1027a..0000000 --- a/archive-patches/armbox/hd51/blacklist_mmc0.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c -index 942b42b..b678310 100644 ---- a/drivers/mmc/host/sdhci-brcmstb.c -+++ b/drivers/mmc/host/sdhci-brcmstb.c -@@ -71,6 +71,10 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) - struct clk *clk; - int res; - -+ if (platform_get_resource(pdev, IORESOURCE_MEM, 0) && (unsigned int)platform_get_resource(pdev, IORESOURCE_MEM, 0)->start == 0xf03e0000) { -+ return -ENODEV; -+ } -+ - clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(clk)) { - dev_err(&pdev->dev, "Clock not found in Device Tree\n"); diff --git a/archive-patches/armbox/hd51/blindscan2.patch b/archive-patches/armbox/hd51/blindscan2.patch deleted file mode 100644 index c0c98f0..0000000 --- a/archive-patches/armbox/hd51/blindscan2.patch +++ /dev/null @@ -1,261 +0,0 @@ -diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c -index ce99b9d..0b59a1f 100644 ---- a/drivers/media/dvb-frontends/stv090x.c -+++ b/drivers/media/dvb-frontends/stv090x.c -@@ -1694,6 +1694,7 @@ static u32 stv090x_get_srate(struct stv090x_state *state, u32 clk) - ((int_1 * tmp_2) >> 16) + - ((int_2 * tmp_1) >> 16); - -+ state->srate = srate; - return srate; - } - -@@ -2606,6 +2607,94 @@ static int stv090x_get_viterbi(struct stv090x_state *state) - static enum stv090x_signal_state stv090x_get_sig_params(struct stv090x_state *state) - { - struct dvb_frontend *fe = &state->frontend; -+ struct dtv_frontend_properties *props = &fe->dtv_property_cache; -+ -+ int fe_stv0900_tracking_standard_return[] = { -+ SYS_UNDEFINED, -+ SYS_DVBS, -+ SYS_DVBS2, -+ SYS_DSS -+ }; -+ -+ int fe_stv0900_rolloff_return[] = { -+ ROLLOFF_35, -+ ROLLOFF_25, -+ ROLLOFF_20, -+ ROLLOFF_AUTO -+ }; -+ -+ int fe_stv0900_modulation_return[] = { -+ QPSK, -+ PSK_8, -+ APSK_16, -+ APSK_32 -+ }; -+ -+ int fe_stv0900_modcod_return_dvbs[] = { -+ FEC_NONE, -+ FEC_AUTO, -+ FEC_AUTO, -+ FEC_AUTO, -+ FEC_1_2, -+ FEC_3_5, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_6_7, -+ FEC_7_8, -+ FEC_3_5, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_AUTO -+ }; -+ -+ int fe_stv0900_modcod_return_dvbs2[] = { -+ FEC_NONE, -+ FEC_AUTO, -+ FEC_AUTO, -+ FEC_AUTO, -+ FEC_1_2, -+ FEC_3_5, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_3_5, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_2_3, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_3_4, -+ FEC_4_5, -+ FEC_5_6, -+ FEC_8_9, -+ FEC_9_10, -+ FEC_AUTO -+ }; - - u8 tmg; - u32 reg; -@@ -2645,10 +2734,71 @@ static enum stv090x_signal_state stv090x_get_sig_params(struct stv090x_state *st - state->modcod = STV090x_GETFIELD_Px(reg, DEMOD_MODCOD_FIELD); - state->pilots = STV090x_GETFIELD_Px(reg, DEMOD_TYPE_FIELD) & 0x01; - state->frame_len = STV090x_GETFIELD_Px(reg, DEMOD_TYPE_FIELD) >> 1; -- reg = STV090x_READ_DEMOD(state, TMGOBS); -- state->rolloff = STV090x_GETFIELD_Px(reg, ROLLOFF_STATUS_FIELD); -- reg = STV090x_READ_DEMOD(state, FECM); -- state->inversion = STV090x_GETFIELD_Px(reg, IQINV_FIELD); -+ reg = STV090x_READ_DEMOD(state, MATSTR1); -+ state->rolloff = STV090x_GETFIELD_Px(reg, MATYPE_ROLLOFF_FIELD); -+ -+ switch (state->delsys) { -+ case STV090x_DVBS2: -+ if (state->modcod <= STV090x_QPSK_910) -+ state->modulation = STV090x_QPSK; -+ else if (state->modcod <= STV090x_8PSK_910) -+ state->modulation = STV090x_8PSK; -+ else if (state->modcod <= STV090x_16APSK_910) -+ state->modulation = STV090x_16APSK; -+ else if (state->modcod <= STV090x_32APSK_910) -+ state->modulation = STV090x_32APSK; -+ else -+ state->modulation = STV090x_UNKNOWN; -+ reg = STV090x_READ_DEMOD(state, PLHMODCOD); -+ state->inversion = STV090x_GETFIELD_Px(reg, SPECINV_DEMOD_FIELD); -+ break; -+ case STV090x_DVBS1: -+ case STV090x_DSS: -+ switch(state->fec) { -+ case STV090x_PR12: -+ state->modcod = STV090x_QPSK_12; -+ break; -+ case STV090x_PR23: -+ state->modcod = STV090x_QPSK_23; -+ break; -+ case STV090x_PR34: -+ state->modcod = STV090x_QPSK_34; -+ break; -+ case STV090x_PR45: -+ state->modcod = STV090x_QPSK_45; -+ break; -+ case STV090x_PR56: -+ state->modcod = STV090x_QPSK_56; -+ break; -+ case STV090x_PR67: -+ state->modcod = STV090x_QPSK_89; -+ break; -+ case STV090x_PR78: -+ state->modcod = STV090x_QPSK_910; -+ break; -+ default: -+ state->modcod = STV090x_DUMMY_PLF; -+ break; -+ } -+ state->modulation = STV090x_QPSK; -+ reg = STV090x_READ_DEMOD(state, FECM); -+ state->inversion = STV090x_GETFIELD_Px(reg, IQINV_FIELD); -+ break; -+ default: -+ break; -+ } -+ -+ props->frequency = state->frequency; -+ props->symbol_rate = state->srate; -+ if (state->delsys == 2) -+ props->fec_inner = fe_stv0900_modcod_return_dvbs2[state->modcod]; -+ else -+ props->fec_inner = fe_stv0900_modcod_return_dvbs[state->modcod]; -+ props->pilot = state->pilots; -+ props->rolloff = fe_stv0900_rolloff_return[state->rolloff]; -+ props->modulation = fe_stv0900_modulation_return[state->modulation]; -+ props->inversion = state->inversion; -+ props->delivery_system = fe_stv0900_tracking_standard_return[state->delsys]; - - if ((state->algo == STV090x_BLIND_SEARCH) || (state->srate < 10000000)) { - -@@ -2858,6 +3008,7 @@ static int stv090x_optimize_track(struct stv090x_state *state) - { - struct dvb_frontend *fe = &state->frontend; - -+ enum stv090x_rolloff rolloff; - enum stv090x_modcod modcod; - - s32 srate, pilots, aclc, f_1, f_0, i = 0, blind_tune = 0; -@@ -2981,6 +3132,7 @@ static int stv090x_optimize_track(struct stv090x_state *state) - f_1 = STV090x_READ_DEMOD(state, CFR2); - f_0 = STV090x_READ_DEMOD(state, CFR1); - reg = STV090x_READ_DEMOD(state, TMGOBS); -+ rolloff = STV090x_GETFIELD_Px(reg, ROLLOFF_STATUS_FIELD); - - if (state->algo == STV090x_BLIND_SEARCH) { - STV090x_WRITE_DEMOD(state, SFRSTEP, 0x00); -@@ -3515,20 +3667,24 @@ static enum dvbfe_search stv090x_search(struct dvb_frontend *fe) - state->frequency = props->frequency; - state->srate = props->symbol_rate; - state->search_mode = STV090x_SEARCH_AUTO; -- state->algo = STV090x_COLD_SEARCH; -+ state->algo = STV090x_BLIND_SEARCH; - state->fec = STV090x_PRERR; -- if (state->srate > 10000000) { -- dprintk(FE_DEBUG, 1, "Search range: 10 MHz"); -- state->search_range = 10000000; -- } else { -- dprintk(FE_DEBUG, 1, "Search range: 5 MHz"); -- state->search_range = 5000000; -- } -+ state->search_range = 0; - - stv090x_set_mis(state, props->stream_id); - -+ dprintk(FE_DEBUG, 1, "Search started..."); - if (stv090x_algo(state) == STV090x_RANGEOK) { -+ stv090x_get_sig_params(state); - dprintk(FE_DEBUG, 1, "Search success!"); -+ dprintk(FE_DEBUG, 1, "frequency = %d", props->frequency); -+ dprintk(FE_DEBUG, 1, "symbol_rate = %d", props->symbol_rate); -+ dprintk(FE_DEBUG, 1, "fec_inner = %d, %d", props->fec_inner, state->modcod); -+ dprintk(FE_DEBUG, 1, "pilot = %d", props->pilot); -+ dprintk(FE_DEBUG, 1, "rolloff = %d", props->rolloff); -+ dprintk(FE_DEBUG, 1, "modulation = %d, %d", props->modulation, state->modulation); -+ dprintk(FE_DEBUG, 1, "inversion = %d", props->inversion); -+ dprintk(FE_DEBUG, 1, "delivery_system = %d, %d", props->delivery_system, state->delsys); - return DVBFE_ALGO_SEARCH_SUCCESS; - } else { - dprintk(FE_DEBUG, 1, "Search failed!"); -@@ -3571,6 +3727,7 @@ static int stv090x_read_status(struct dvb_frontend *fe, enum fe_status *status) - *status |= FE_HAS_SYNC | FE_HAS_LOCK; - } - } -+ stv090x_get_sig_params(state); - break; - - case 3: /* DVB-S1/legacy mode */ -@@ -3584,6 +3742,7 @@ static int stv090x_read_status(struct dvb_frontend *fe, enum fe_status *status) - *status |= FE_HAS_SYNC | FE_HAS_LOCK; - } - } -+ stv090x_get_sig_params(state); - break; - } - -diff --git a/drivers/media/dvb-frontends/stv090x_reg.h b/drivers/media/dvb-frontends/stv090x_reg.h -index 93741ee..ac6bc30 100644 ---- a/drivers/media/dvb-frontends/stv090x_reg.h -+++ b/drivers/media/dvb-frontends/stv090x_reg.h -@@ -1927,6 +1927,8 @@ - #define STV090x_P1_MATSTR1 STV090x_Px_MATSTRy(1, 1) - #define STV090x_P2_MATSTR0 STV090x_Px_MATSTRy(2, 0) - #define STV090x_P2_MATSTR1 STV090x_Px_MATSTRy(2, 1) -+#define STV090x_OFFST_Px_MATYPE_ROLLOFF_FIELD 0 -+#define STV090x_WIDTH_Px_MATYPE_ROLLOFF_FIELD 2 - #define STV090x_OFFST_Px_MATYPE_CURRENT_FIELD 0 - #define STV090x_WIDTH_Px_MATYPE_CURRENT_FIELD 8 - diff --git a/archive-patches/armbox/hd51/defconfig b/archive-patches/armbox/hd51/defconfig deleted file mode 100644 index 49f9c80..0000000 --- a/archive-patches/armbox/hd51/defconfig +++ /dev/null @@ -1,4407 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 4.10.12 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_GENERIC_BUG=y -CONFIG_PGTABLE_LEVELS=3 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="arm-linux-gnueabihf-" -# CONFIG_COMPILE_TEST is not set -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_KERNEL_GZIP=y -# CONFIG_KERNEL_LZMA is not set -# CONFIG_KERNEL_XZ is not set -# CONFIG_KERNEL_LZO is not set -# CONFIG_KERNEL_LZ4 is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y -CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_FHANDLE=y -CONFIG_USELIB=y -# CONFIG_AUDIT is not set -CONFIG_HAVE_ARCH_AUDITSYSCALL=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -CONFIG_HANDLE_DOMAIN_IRQ=y -# CONFIG_IRQ_DOMAIN_DEBUG is not set -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_SPARSE_IRQ=y -CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -# CONFIG_NO_HZ_FULL is not set -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set -CONFIG_IRQ_TIME_ACCOUNTING=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_RCU=y -# CONFIG_RCU_EXPERT is not set -CONFIG_SRCU=y -# CONFIG_TASKS_RCU is not set -CONFIG_RCU_STALL_COMMON=y -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_EXPEDITE_BOOT is not set -# CONFIG_BUILD_BIN2C is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_NMI_LOG_BUF_SHIFT=13 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_CGROUPS=y -CONFIG_PAGE_COUNTER=y -CONFIG_MEMCG=y -# CONFIG_MEMCG_SWAP is not set -# CONFIG_BLK_CGROUP is not set -# CONFIG_CGROUP_SCHED is not set -# CONFIG_CGROUP_PIDS is not set -# CONFIG_CGROUP_FREEZER is not set -CONFIG_CPUSETS=y -CONFIG_PROC_PID_CPUSET=y -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CGROUP_CPUACCT is not set -# CONFIG_CGROUP_PERF is not set -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_SOCK_CGROUP_DATA is not set -# CONFIG_CHECKPOINT_RESTORE is not set -# CONFIG_NAMESPACES is not set -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SYSFS_DEPRECATED is not set -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="initramfs-subdirboot.cpio.gz" -CONFIG_INITRAMFS_ROOT_UID=0 -CONFIG_INITRAMFS_ROOT_GID=0 -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set -# CONFIG_RD_LZ4 is not set -CONFIG_INITRAMFS_COMPRESSION=".gz" -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_BPF=y -CONFIG_EXPERT=y -CONFIG_UID16=y -CONFIG_MULTIUSER=y -# CONFIG_SGETMASK_SYSCALL is not set -CONFIG_SYSFS_SYSCALL=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_POSIX_TIMERS=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set -CONFIG_KALLSYMS_BASE_RELATIVE=y -CONFIG_PRINTK=y -CONFIG_PRINTK_NMI=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -# CONFIG_BPF_SYSCALL is not set -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_ADVISE_SYSCALLS=y -# CONFIG_USERFAULTFD is not set -CONFIG_PCI_QUIRKS=y -CONFIG_MEMBARRIER=y -CONFIG_EMBEDDED=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_COMPAT_BRK=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -# CONFIG_SLAB_FREELIST_RANDOM is not set -# CONFIG_SYSTEM_DATA_VERIFICATION is not set -# CONFIG_PROFILING is not set -CONFIG_KEXEC_CORE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_KPROBES is not set -# CONFIG_JUMP_LABEL is not set -# CONFIG_UPROBES is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_NMI=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_RCU_TABLE_FREE=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_GCC_PLUGINS=y -# CONFIG_GCC_PLUGINS is not set -CONFIG_HAVE_CC_STACKPROTECTOR=y -# CONFIG_CC_STACKPROTECTOR is not set -CONFIG_CC_STACKPROTECTOR_NONE=y -# CONFIG_CC_STACKPROTECTOR_REGULAR is not set -# CONFIG_CC_STACKPROTECTOR_STRONG is not set -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_HAVE_EXIT_THREAD=y -CONFIG_ARCH_MMAP_RND_BITS_MIN=8 -CONFIG_ARCH_MMAP_RND_BITS_MAX=16 -CONFIG_ARCH_MMAP_RND_BITS=8 -# CONFIG_HAVE_ARCH_HASH is not set -# CONFIG_ISA_BUS_API is not set -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y -# CONFIG_CPU_NO_EFFICIENT_FFS is not set -# CONFIG_HAVE_ARCH_VMAP_STACK is not set - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -# CONFIG_TRIM_UNUSED_KSYMS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_DEV_BSG=y -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set -# CONFIG_BLK_DEV_ZONED is not set -# CONFIG_BLK_CMDLINE_PARSER is not set -# CONFIG_BLK_WBT is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_AIX_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set -# CONFIG_CMDLINE_PARTITION is not set -CONFIG_BLK_MQ_PCI=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -CONFIG_ARCH_MULTIPLATFORM=y -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set - -# -# Multiple platform selection -# - -# -# CPU Core family selection -# -# CONFIG_ARCH_MULTI_V6 is not set -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_MULTI_V6_V7=y -# CONFIG_ARCH_MULTI_CPU_AUTO is not set -# CONFIG_ARCH_VIRT is not set -# CONFIG_ARCH_MVEBU is not set -# CONFIG_ARCH_ALPINE is not set -# CONFIG_ARCH_ARTPEC is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_AXXIA is not set -CONFIG_ARCH_BCM=y - -# -# IPROC architected SoCs -# -# CONFIG_ARCH_BCM_CYGNUS is not set -# CONFIG_ARCH_BCM_NSP is not set -# CONFIG_ARCH_BCM_5301X is not set - -# -# KONA architected SoCs -# -# CONFIG_ARCH_BCM_281XX is not set -# CONFIG_ARCH_BCM_21664 is not set -# CONFIG_ARCH_BCM_23550 is not set - -# -# Other Architectures -# -# CONFIG_ARCH_BCM2835 is not set -# CONFIG_ARCH_BCM_53573 is not set -# CONFIG_ARCH_BCM_63XX is not set -CONFIG_ARCH_BRCMSTB=y -# CONFIG_BCM3390A0 is not set -# CONFIG_BCM3390B0 is not set -# CONFIG_BCM7145B0 is not set -# CONFIG_BCM7250B0 is not set -# CONFIG_BCM7364A0 is not set -# CONFIG_BCM7366C0 is not set -# CONFIG_BCM74371A0 is not set -CONFIG_BCM7439B0=y -# CONFIG_BCM7445D0 is not set -CONFIG_BRCM_USB=y -CONFIG_BRCM_USB_OHCI=y -CONFIG_BRCM_USB_EHCI=y -# CONFIG_ARCH_BERLIN is not set -# CONFIG_ARCH_DIGICOLOR is not set -# CONFIG_ARCH_HIGHBANK is not set -# CONFIG_ARCH_HISI is not set -# CONFIG_ARCH_KEYSTONE is not set -# CONFIG_ARCH_MESON is not set -# CONFIG_ARCH_MXC is not set -# CONFIG_ARCH_MEDIATEK is not set - -# -# TI OMAP/AM/DM/DRA Family -# -# CONFIG_ARCH_OMAP3 is not set -# CONFIG_ARCH_OMAP4 is not set -# CONFIG_SOC_OMAP5 is not set -# CONFIG_SOC_AM33XX is not set -# CONFIG_SOC_AM43XX is not set -# CONFIG_SOC_DRA7XX is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_QCOM is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_ROCKCHIP is not set -# CONFIG_ARCH_SOCFPGA is not set -# CONFIG_PLAT_SPEAR is not set -# CONFIG_ARCH_STI is not set -# CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS is not set -# CONFIG_ARCH_RENESAS is not set -# CONFIG_ARCH_SUNXI is not set -# CONFIG_ARCH_SIRF is not set -# CONFIG_ARCH_TANGO is not set -# CONFIG_ARCH_TEGRA is not set -# CONFIG_ARCH_UNIPHIER is not set -# CONFIG_ARCH_U8500 is not set -# CONFIG_ARCH_VEXPRESS is not set -# CONFIG_ARCH_WM8850 is not set -# CONFIG_ARCH_ZX is not set -# CONFIG_ARCH_ZYNQ is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -CONFIG_ARM_LPAE=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -CONFIG_VDSO=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -# CONFIG_DEBUG_RODATA is not set -CONFIG_MULTI_IRQ_HANDLER=y -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -CONFIG_ARM_ERRATA_798181=y -# CONFIG_ARM_ERRATA_773022 is not set -# CONFIG_ARM_ERRATA_818325_852422 is not set -# CONFIG_ARM_ERRATA_821420 is not set -# CONFIG_ARM_ERRATA_825619 is not set -# CONFIG_ARM_ERRATA_852421 is not set -# CONFIG_ARM_ERRATA_852423 is not set - -# -# Bus support -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DOMAINS_GENERIC=y -CONFIG_PCI_SYSCALL=y -# CONFIG_PCIEPORTBUS is not set -CONFIG_PCI_BUS_ADDR_T_64BIT=y -CONFIG_PCI_MSI=y -CONFIG_PCI_MSI_IRQ_DOMAIN=y -# CONFIG_PCI_DEBUG is not set -# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set -# CONFIG_PCI_STUB is not set -# CONFIG_PCI_IOV is not set -# CONFIG_PCI_PRI is not set -# CONFIG_PCI_PASID is not set -# CONFIG_HOTPLUG_PCI is not set - -# -# PCI host controller drivers -# -# CONFIG_PCIE_DW_PLAT is not set -# CONFIG_PCI_HOST_GENERIC is not set -# CONFIG_PCI_LAYERSCAPE is not set -# CONFIG_PCIE_ALTERA is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -CONFIG_HAVE_ARM_ARCH_TIMER=y -# CONFIG_MCPM is not set -# CONFIG_BIG_LITTLE is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARM_PSCI=y -CONFIG_ARCH_NR_GPIO=1024 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_HZ_FIXED=0 -# CONFIG_HZ_100 is not set -# CONFIG_HZ_200 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_300 is not set -# CONFIG_HZ_500 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_ARM_PATCH_IDIV=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HAVE_GENERIC_RCU_GUP=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -# CONFIG_ARM_MODULE_PLTS is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_BOUNCE=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -# CONFIG_TRANSPARENT_HUGEPAGE is not set -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_CMA=y -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=3 -# CONFIG_ZPOOL is not set -# CONFIG_ZBUD is not set -# CONFIG_ZSMALLOC is not set -CONFIG_GENERIC_EARLY_IOREMAP=y -# CONFIG_IDLE_PAGE_TRACKING is not set -CONFIG_FRAME_VECTOR=y -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -# CONFIG_SECCOMP is not set -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_PARAVIRT is not set -# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set -# CONFIG_XEN is not set - -# -# Boot options -# -CONFIG_USE_OF=y -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set -CONFIG_CMDLINE="brcm_cma=440M@328M brcm_cma=192M@768M console=ttyS0,115200 consoleblank=0 vt.global_cursor_default=0" -# CONFIG_CMDLINE_FROM_BOOTLOADER is not set -CONFIG_CMDLINE_EXTEND=y -# CONFIG_CMDLINE_FORCE is not set -CONFIG_KEXEC=y -CONFIG_ATAGS_PROC=y -# CONFIG_CRASH_DUMP is not set -CONFIG_AUTO_ZRELADDR=y -# CONFIG_EFI is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_ATTR_SET=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -# CONFIG_CPU_FREQ_STAT_DETAILS is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set - -# -# CPU frequency scaling drivers -# -CONFIG_CPUFREQ_DT=y -CONFIG_CPUFREQ_DT_PLATDEV=y -# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set -CONFIG_ARM_BRCMSTB_AVS_CPUFREQ=y -# CONFIG_ARM_BRCMSTB_AVS_CPUFREQ_DEBUG is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_QORIQ_CPUFREQ is not set - -# -# CPU Idle -# -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_LADDER=y -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_DT_IDLE_STATES=y - -# -# ARM CPU Idle Drivers -# -CONFIG_ARM_CPUIDLE=y -# CONFIG_ARM_HIGHBANK_CPUIDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_NEON=y -CONFIG_KERNEL_MODE_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_ELFCORE=y -CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y -CONFIG_BINFMT_SCRIPT=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -# CONFIG_SUSPEND_SKIP_SYNC is not set -# CONFIG_HIBERNATION is not set -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -# CONFIG_PM_AUTOSLEEP is not set -# CONFIG_PM_WAKELOCKS is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -# CONFIG_APM_EMULATION is not set -CONFIG_PM_OPP=y -CONFIG_PM_CLK=y -# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set -CONFIG_CPU_PM=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_NET_INGRESS=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -CONFIG_XFRM_ALGO=m -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -CONFIG_XFRM_IPCOMP=m -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=m -# CONFIG_IP_MROUTE is not set -CONFIG_SYN_COOKIES=y -# CONFIG_NET_UDP_TUNNEL is not set -# CONFIG_NET_FOU is not set -# CONFIG_NET_FOU_IP_TUNNELS is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -CONFIG_INET_TUNNEL=m -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -CONFIG_INET_UDP_DIAG=m -# CONFIG_INET_RAW_DIAG is not set -# CONFIG_INET_DIAG_DESTROY is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m -CONFIG_IPV6_ROUTER_PREF=y -# CONFIG_IPV6_ROUTE_INFO is not set -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -# CONFIG_IPV6_ILA is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -# CONFIG_IPV6_VTI is not set -CONFIG_IPV6_SIT=m -# CONFIG_IPV6_SIT_6RD is not set -CONFIG_IPV6_NDISC_NODETYPE=y -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_FOU is not set -# CONFIG_IPV6_FOU_TUNNEL is not set -# CONFIG_IPV6_MULTIPLE_TABLES is not set -CONFIG_IPV6_MROUTE=y -# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set -CONFIG_IPV6_PIMSM_V2=y -# CONFIG_IPV6_SEG6_LWTUNNEL is not set -# CONFIG_IPV6_SEG6_HMAC is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NET_PTP_CLASSIFY=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=m - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_INGRESS=y -CONFIG_NETFILTER_NETLINK=m -# CONFIG_NETFILTER_NETLINK_ACCT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE is not set -# CONFIG_NETFILTER_NETLINK_LOG is not set -# CONFIG_NF_CONNTRACK is not set -# CONFIG_NF_LOG_NETDEV is not set -# CONFIG_NF_TABLES is not set -CONFIG_NETFILTER_XTABLES=m - -# -# Xtables combined modules -# -# CONFIG_NETFILTER_XT_MARK is not set -# CONFIG_NETFILTER_XT_SET is not set - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set -# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set -# CONFIG_NETFILTER_XT_MATCH_L2TP is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_MAC is not set -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set -# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_RECENT is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_TIME is not set -# CONFIG_NETFILTER_XT_MATCH_U32 is not set -CONFIG_IP_SET=m -CONFIG_IP_SET_MAX=256 -# CONFIG_IP_SET_BITMAP_IP is not set -# CONFIG_IP_SET_BITMAP_IPMAC is not set -# CONFIG_IP_SET_BITMAP_PORT is not set -# CONFIG_IP_SET_HASH_IP is not set -# CONFIG_IP_SET_HASH_IPMARK is not set -# CONFIG_IP_SET_HASH_IPPORT is not set -# CONFIG_IP_SET_HASH_IPPORTIP is not set -# CONFIG_IP_SET_HASH_IPPORTNET is not set -# CONFIG_IP_SET_HASH_IPMAC is not set -# CONFIG_IP_SET_HASH_MAC is not set -# CONFIG_IP_SET_HASH_NETPORTNET is not set -# CONFIG_IP_SET_HASH_NET is not set -# CONFIG_IP_SET_HASH_NETNET is not set -# CONFIG_IP_SET_HASH_NETPORT is not set -# CONFIG_IP_SET_HASH_NETIFACE is not set -# CONFIG_IP_SET_LIST_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV4 is not set -# CONFIG_NF_SOCKET_IPV4 is not set -# CONFIG_NF_DUP_IPV4 is not set -# CONFIG_NF_LOG_ARP is not set -# CONFIG_NF_LOG_IPV4 is not set -CONFIG_NF_REJECT_IPV4=m -CONFIG_IP_NF_IPTABLES=m -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV6 is not set -# CONFIG_NF_SOCKET_IPV6 is not set -# CONFIG_NF_DUP_IPV6 is not set -CONFIG_NF_REJECT_IPV6=m -# CONFIG_NF_LOG_IPV6 is not set -CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RT is not set -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -# CONFIG_IP6_NF_MANGLE is not set -# CONFIG_IP6_NF_RAW is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=m -CONFIG_BRIDGE=m -CONFIG_BRIDGE_IGMP_SNOOPING=y -CONFIG_HAVE_NET_DSA=y -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -CONFIG_LLC=m -CONFIG_LLC2=m -# CONFIG_IPX is not set -CONFIG_ATALK=m -# CONFIG_DEV_APPLETALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_6LOWPAN is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set -CONFIG_DNS_RESOLVER=y -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_DIAG is not set -# CONFIG_MPLS is not set -# CONFIG_HSR is not set -# CONFIG_NET_SWITCHDEV is not set -# CONFIG_NET_L3_MASTER_DEV is not set -# CONFIG_NET_NCSI is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_CGROUP_NET_PRIO is not set -# CONFIG_CGROUP_NET_CLASSID is not set -CONFIG_NET_RX_BUSY_POLL=y -CONFIG_BQL=y -# CONFIG_BPF_JIT is not set -CONFIG_NET_FLOW_LIMIT=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_BREDR=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HS=y -CONFIG_BT_LE=y -# CONFIG_BT_LEDS is not set -# CONFIG_BT_SELFTEST is not set -CONFIG_BT_DEBUGFS=y - -# -# Bluetooth device drivers -# -CONFIG_BT_INTEL=m -CONFIG_BT_BCM=m -CONFIG_BT_RTL=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTUSB_BCM=y -CONFIG_BT_HCIBTUSB_RTL=y -# CONFIG_BT_HCIBTSDIO is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -# CONFIG_BT_HCIUART_BCSP is not set -# CONFIG_BT_HCIUART_ATH3K is not set -# CONFIG_BT_HCIUART_LL is not set -CONFIG_BT_HCIUART_3WIRE=y -# CONFIG_BT_HCIUART_INTEL is not set -CONFIG_BT_HCIUART_BCM=y -# CONFIG_BT_HCIUART_QCA is not set -# CONFIG_BT_HCIUART_AG6XX is not set -# CONFIG_BT_HCIUART_MRVL is not set -CONFIG_BT_HCIBCM203X=m -# CONFIG_BT_HCIBPA10X is not set -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -CONFIG_BT_ATH3K=m -# CONFIG_AF_RXRPC is not set -# CONFIG_AF_KCM is not set -# CONFIG_STREAM_PARSER is not set -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_SPY=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=m -# CONFIG_NL80211_TESTMODE is not set -# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set -# CONFIG_CFG80211_CERTIFICATION_ONUS is not set -# CONFIG_CFG80211_DEFAULT_PS is not set -# CONFIG_CFG80211_DEBUGFS is not set -# CONFIG_CFG80211_INTERNAL_REGDB is not set -CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_CFG80211_WEXT=y -CONFIG_LIB80211=m -CONFIG_LIB80211_CRYPT_WEP=m -CONFIG_LIB80211_CRYPT_CCMP=m -CONFIG_LIB80211_CRYPT_TKIP=m -# CONFIG_LIB80211_DEBUG is not set -CONFIG_MAC80211=m -CONFIG_MAC80211_HAS_RC=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_MAC80211_RC_MINSTREL_HT=y -CONFIG_MAC80211_RC_MINSTREL_VHT=y -CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y -CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" -CONFIG_MAC80211_MESH=y -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_MESSAGE_TRACING is not set -# CONFIG_MAC80211_DEBUG_MENU is not set -CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -# CONFIG_WIMAX is not set -CONFIG_RFKILL=m -CONFIG_RFKILL_LEDS=y -CONFIG_RFKILL_INPUT=y -# CONFIG_RFKILL_REGULATOR is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_LWTUNNEL is not set -CONFIG_DST_CACHE=y -# CONFIG_NET_DEVLINK is not set -CONFIG_MAY_USE_DEVLINK=y -CONFIG_HAVE_CBPF_JIT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_WANT_DEV_COREDUMP=y -CONFIG_ALLOW_DEV_COREDUMP=y -CONFIG_DEV_COREDUMP=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set -# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_SOC_BUS=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_REGMAP_MMIO=y -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_DMA_FENCE_TRACE is not set -CONFIG_DMA_CMA=y - -# -# Default contiguous memory area size: -# -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_ALIGNMENT=8 - -# -# Bus devices -# -# CONFIG_ARM_CCI400_PMU is not set -# CONFIG_ARM_CCI5xx_PMU is not set -# CONFIG_ARM_CCN is not set -CONFIG_BRCMSTB_GISB_ARB=y -# CONFIG_VEXPRESS_CONFIG is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_TESTS is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set -# CONFIG_MTD_PARTITIONED_MASTER is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -CONFIG_MTD_ROM=y -CONFIG_MTD_ABSENT=y - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -CONFIG_MTD_PHYSMAP_OF=y -# CONFIG_MTD_PHYSMAP_OF_VERSATILE is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_INTEL_VR_NOR is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI_PCI is not set -# CONFIG_MTD_NAND_DENALI_DT is not set -# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND_RICOH is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_NANDSIM is not set -# CONFIG_MTD_NAND_BRCMNAND is not set -# CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_NAND_OXNAS is not set -# CONFIG_MTD_NAND_HISI504 is not set -# CONFIG_MTD_NAND_MTK is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR & LPDDR2 PCM memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_LPDDR2_NVM is not set -# CONFIG_MTD_SPI_NOR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_FASTMAP is not set -CONFIG_MTD_UBI_GLUEBI=y -# CONFIG_MTD_UBI_BLOCK is not set -CONFIG_DTC=y -CONFIG_OF=y -# CONFIG_OF_UNITTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_IRQ=y -CONFIG_OF_NET=y -CONFIG_OF_MDIO=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_NULL_BLK is not set -# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_BLK_DEV_RBD is not set -# CONFIG_BLK_DEV_RSXX is not set -# CONFIG_BLK_DEV_NVME is not set -# CONFIG_NVME_FC is not set - -# -# Misc devices -# -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_PHANTOM is not set -# CONFIG_SGI_IOC4 is not set -# CONFIG_TIFM_CORE is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_HP_ILO is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -CONFIG_EEPROM_93CX6=y -# CONFIG_EEPROM_93XX46 is not set -# CONFIG_CB710_CORE is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set - -# -# Intel MIC Bus Driver -# - -# -# SCIF Bus Driver -# - -# -# VOP Bus Driver -# - -# -# Intel MIC Host Driver -# - -# -# Intel MIC Card Driver -# - -# -# SCIF Driver -# - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# - -# -# VOP Driver -# -# CONFIG_ECHO is not set -# CONFIG_CXL_BASE is not set -# CONFIG_CXL_AFU_DRIVER_OPS is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_MQ_DEFAULT is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=y -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_ISCSI_BOOT_SYSFS is not set -# CONFIG_SCSI_CXGB3_ISCSI is not set -# CONFIG_SCSI_CXGB4_ISCSI is not set -# CONFIG_SCSI_BNX2_ISCSI is not set -# CONFIG_BE2ISCSI is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_HPSA is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_3W_SAS is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC94XX is not set -# CONFIG_SCSI_MVSAS is not set -# CONFIG_SCSI_MVUMI is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_ARCMSR is not set -# CONFIG_SCSI_ESAS2R is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_MPT3SAS is not set -# CONFIG_SCSI_MPT2SAS is not set -# CONFIG_SCSI_SMARTPQI is not set -# CONFIG_SCSI_UFSHCD is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_SNIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_STEX is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_ISCSI is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_WD719X is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_PMCRAID is not set -# CONFIG_SCSI_PM8001 is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -CONFIG_ATA=y -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_VERBOSE_ERROR=y -CONFIG_SATA_PMP=y - -# -# Controllers with non-SFF native interface -# -# CONFIG_SATA_AHCI is not set -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_BRCM=y -# CONFIG_AHCI_CEVA is not set -# CONFIG_AHCI_QORIQ is not set -# CONFIG_SATA_INIC162X is not set -# CONFIG_SATA_ACARD_AHCI is not set -# CONFIG_SATA_SIL24 is not set -CONFIG_ATA_SFF=y - -# -# SFF controllers with custom DMA interface -# -# CONFIG_PDC_ADMA is not set -# CONFIG_SATA_QSTOR is not set -# CONFIG_SATA_SX4 is not set -CONFIG_ATA_BMDMA=y - -# -# SATA SFF controllers with BMDMA -# -# CONFIG_ATA_PIIX is not set -# CONFIG_SATA_MV is not set -# CONFIG_SATA_NV is not set -# CONFIG_SATA_PROMISE is not set -# CONFIG_SATA_SIL is not set -# CONFIG_SATA_SIS is not set -# CONFIG_SATA_SVW is not set -# CONFIG_SATA_ULI is not set -# CONFIG_SATA_VIA is not set -# CONFIG_SATA_VITESSE is not set - -# -# PATA SFF controllers with BMDMA -# -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_ATP867X is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_MARVELL is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NINJA32 is not set -# CONFIG_PATA_NS87415 is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PDC2027X is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RDC is not set -# CONFIG_PATA_SCH is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_SIL680 is not set -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_TOSHIBA is not set -# CONFIG_PATA_TRIFLEX is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# PIO-only SFF controllers -# -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_PLATFORM is not set -# CONFIG_PATA_RZ1000 is not set - -# -# Generic fallback / legacy drivers -# -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_LEGACY is not set -# CONFIG_MD is not set -# CONFIG_TARGET_CORE is not set -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_FIREWIRE is not set -# CONFIG_FIREWIRE_NOSY is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_NET_FC is not set -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_MACSEC is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m -# CONFIG_TUN_VNET_CROSS_LE is not set -# CONFIG_VETH is not set -# CONFIG_NLMON is not set -# CONFIG_ARCNET is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -CONFIG_ETHERNET=y -CONFIG_NET_VENDOR_3COM=y -# CONFIG_VORTEX is not set -# CONFIG_TYPHOON is not set -# CONFIG_NET_VENDOR_ADAPTEC is not set -CONFIG_NET_VENDOR_AGERE=y -# CONFIG_ET131X is not set -CONFIG_NET_VENDOR_ALACRITECH=y -# CONFIG_SLICOSS is not set -# CONFIG_NET_VENDOR_ALTEON is not set -# CONFIG_ALTERA_TSE is not set -# CONFIG_NET_VENDOR_AMAZON is not set -# CONFIG_NET_VENDOR_AMD is not set -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_ATHEROS is not set -# CONFIG_NET_VENDOR_AURORA is not set -# CONFIG_NET_CADENCE is not set -CONFIG_NET_VENDOR_BROADCOM=y -# CONFIG_B44 is not set -CONFIG_BCMGENET=y -# CONFIG_BNX2 is not set -# CONFIG_CNIC is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2X is not set -CONFIG_SYSTEMPORT=y -# CONFIG_BNXT is not set -# CONFIG_NET_VENDOR_BROCADE is not set -CONFIG_NET_VENDOR_CAVIUM=y -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_CISCO is not set -# CONFIG_DM9000 is not set -# CONFIG_DNET is not set -# CONFIG_NET_VENDOR_DEC is not set -# CONFIG_NET_VENDOR_DLINK is not set -# CONFIG_NET_VENDOR_EMULEX is not set -CONFIG_NET_VENDOR_EZCHIP=y -# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set -# CONFIG_NET_VENDOR_EXAR is not set -# CONFIG_NET_VENDOR_FARADAY is not set -CONFIG_NET_VENDOR_HISILICON=y -# CONFIG_HIX5HD2_GMAC is not set -# CONFIG_HISI_FEMAC is not set -# CONFIG_HIP04_ETH is not set -# CONFIG_HNS is not set -# CONFIG_HNS_DSAF is not set -# CONFIG_HNS_ENET is not set -# CONFIG_NET_VENDOR_HP is not set -CONFIG_NET_VENDOR_INTEL=y -# CONFIG_E100 is not set -# CONFIG_E1000 is not set -CONFIG_E1000E=y -# CONFIG_IGB is not set -# CONFIG_IGBVF is not set -# CONFIG_IXGB is not set -# CONFIG_IXGBE is not set -# CONFIG_IXGBEVF is not set -# CONFIG_I40E is not set -# CONFIG_I40EVF is not set -# CONFIG_FM10K is not set -CONFIG_NET_VENDOR_I825XX=y -# CONFIG_JME is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MELLANOX is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_MYRI is not set -# CONFIG_FEALNX is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_NET_VENDOR_NETRONOME=y -# CONFIG_NFP_NETVF is not set -# CONFIG_NET_VENDOR_NVIDIA is not set -# CONFIG_NET_VENDOR_OKI is not set -# CONFIG_ETHOC is not set -# CONFIG_NET_PACKET_ENGINE is not set -# CONFIG_NET_VENDOR_QLOGIC is not set -CONFIG_NET_VENDOR_QUALCOMM=y -# CONFIG_QCA7000 is not set -# CONFIG_QCOM_EMAC is not set -# CONFIG_NET_VENDOR_REALTEK is not set -CONFIG_NET_VENDOR_RENESAS=y -# CONFIG_NET_VENDOR_RDC is not set -CONFIG_NET_VENDOR_ROCKER=y -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SILAN is not set -# CONFIG_NET_VENDOR_SIS is not set -# CONFIG_NET_VENDOR_SOLARFLARE is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_SUN is not set -# CONFIG_NET_VENDOR_SYNOPSYS is not set -# CONFIG_NET_VENDOR_TEHUTI is not set -# CONFIG_NET_VENDOR_TI is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PHYLIB=y -CONFIG_SWPHY=y -# CONFIG_LED_TRIGGER_PHY is not set - -# -# MDIO bus device drivers -# -# CONFIG_MDIO_BCM_UNIMAC is not set -# CONFIG_MDIO_BITBANG is not set -# CONFIG_MDIO_BUS_MUX_MMIOREG is not set -# CONFIG_MDIO_HISI_FEMAC is not set - -# -# MII PHY device drivers -# -# CONFIG_AMD_PHY is not set -# CONFIG_AQUANTIA_PHY is not set -# CONFIG_AT803X_PHY is not set -CONFIG_BCM7XXX_PHY=y -# CONFIG_BCM87XX_PHY is not set -CONFIG_BCM_NET_PHYLIB=y -# CONFIG_BROADCOM_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_DP83848_PHY is not set -# CONFIG_DP83867_PHY is not set -CONFIG_FIXED_PHY=y -# CONFIG_ICPLUS_PHY is not set -# CONFIG_INTEL_XWAY_PHY is not set -# CONFIG_LSI_ET1011C_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_MARVELL_PHY is not set -# CONFIG_MICREL_PHY is not set -# CONFIG_MICROCHIP_PHY is not set -# CONFIG_MICROSEMI_PHY is not set -# CONFIG_NATIONAL_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_REALTEK_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_STE10XP is not set -# CONFIG_TERANETICS_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_XILINX_GMII2RGMII is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_USB_NET_DRIVERS is not set -CONFIG_WLAN=y -# CONFIG_WIRELESS_WDS is not set -CONFIG_WLAN_VENDOR_ADMTEK=y -# CONFIG_ADM8211 is not set -CONFIG_ATH_COMMON=m -CONFIG_WLAN_VENDOR_ATH=y -# CONFIG_ATH_DEBUG is not set -# CONFIG_ATH5K is not set -# CONFIG_ATH5K_PCI is not set -CONFIG_ATH9K_HW=m -CONFIG_ATH9K_COMMON=m -CONFIG_ATH9K_BTCOEX_SUPPORT=y -CONFIG_ATH9K=m -CONFIG_ATH9K_PCI=y -# CONFIG_ATH9K_AHB is not set -# CONFIG_ATH9K_DEBUGFS is not set -# CONFIG_ATH9K_DYNACK is not set -# CONFIG_ATH9K_WOW is not set -CONFIG_ATH9K_RFKILL=y -# CONFIG_ATH9K_CHANNEL_CONTEXT is not set -CONFIG_ATH9K_PCOEM=y -CONFIG_ATH9K_HTC=m -# CONFIG_ATH9K_HTC_DEBUGFS is not set -CONFIG_ATH9K_HWRNG=y -CONFIG_CARL9170=m -CONFIG_CARL9170_LEDS=y -CONFIG_CARL9170_WPC=y -# CONFIG_CARL9170_HWRNG is not set -CONFIG_ATH6KL=m -# CONFIG_ATH6KL_SDIO is not set -CONFIG_ATH6KL_USB=m -# CONFIG_ATH6KL_DEBUG is not set -CONFIG_AR5523=m -# CONFIG_WIL6210 is not set -CONFIG_ATH10K=m -# CONFIG_ATH10K_PCI is not set -# CONFIG_ATH10K_DEBUG is not set -# CONFIG_ATH10K_DEBUGFS is not set -# CONFIG_WCN36XX is not set -CONFIG_WLAN_VENDOR_ATMEL=y -# CONFIG_ATMEL is not set -CONFIG_AT76C50X_USB=m -CONFIG_WLAN_VENDOR_BROADCOM=y -# CONFIG_B43 is not set -# CONFIG_B43LEGACY is not set -CONFIG_BRCMUTIL=m -# CONFIG_BRCMSMAC is not set -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_PROTO_BCDC=y -CONFIG_BRCMFMAC_SDIO=y -# CONFIG_BRCMFMAC_USB is not set -# CONFIG_BRCMFMAC_PCIE is not set -# CONFIG_BRCM_TRACING is not set -# CONFIG_BRCMDBG is not set -CONFIG_WLAN_VENDOR_CISCO=y -CONFIG_WLAN_VENDOR_INTEL=y -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_IWL4965 is not set -# CONFIG_IWL3945 is not set -# CONFIG_IWLWIFI is not set -CONFIG_WLAN_VENDOR_INTERSIL=y -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set -# CONFIG_HOSTAP_PLX is not set -# CONFIG_HOSTAP_PCI is not set -# CONFIG_HERMES is not set -CONFIG_P54_COMMON=m -# CONFIG_P54_USB is not set -# CONFIG_P54_PCI is not set -# CONFIG_P54_SPI is not set -CONFIG_P54_LEDS=y -# CONFIG_PRISM54 is not set -CONFIG_WLAN_VENDOR_MARVELL=y -CONFIG_LIBERTAS=m -# CONFIG_LIBERTAS_USB is not set -# CONFIG_LIBERTAS_SDIO is not set -# CONFIG_LIBERTAS_SPI is not set -# CONFIG_LIBERTAS_DEBUG is not set -# CONFIG_LIBERTAS_MESH is not set -CONFIG_LIBERTAS_THINFIRM=m -# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set -CONFIG_LIBERTAS_THINFIRM_USB=m -CONFIG_MWIFIEX=m -# CONFIG_MWIFIEX_SDIO is not set -# CONFIG_MWIFIEX_PCIE is not set -CONFIG_MWIFIEX_USB=m -# CONFIG_MWL8K is not set -CONFIG_WLAN_VENDOR_MEDIATEK=y -CONFIG_MT7601U=m -CONFIG_WLAN_VENDOR_RALINK=y -CONFIG_RT2X00=m -# CONFIG_RT2400PCI is not set -# CONFIG_RT2500PCI is not set -# CONFIG_RT61PCI is not set -# CONFIG_RT2800PCI is not set -CONFIG_RT2500USB=m -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 -CONFIG_RT2X00_LIB=m -CONFIG_RT2X00_LIB_FIRMWARE=y -CONFIG_RT2X00_LIB_CRYPTO=y -CONFIG_RT2X00_LIB_LEDS=y -# CONFIG_RT2X00_DEBUG is not set -CONFIG_WLAN_VENDOR_REALTEK=y -# CONFIG_RTL8180 is not set -CONFIG_RTL8187=m -CONFIG_RTL8187_LEDS=y -CONFIG_RTL_CARDS=m -# CONFIG_RTL8192CE is not set -# CONFIG_RTL8192SE is not set -# CONFIG_RTL8192DE is not set -# CONFIG_RTL8723AE is not set -# CONFIG_RTL8723BE is not set -# CONFIG_RTL8188EE is not set -# CONFIG_RTL8192EE is not set -# CONFIG_RTL8821AE is not set -CONFIG_RTL8192CU=m -CONFIG_RTLWIFI=m -CONFIG_RTLWIFI_USB=m -CONFIG_RTLWIFI_DEBUG=y -CONFIG_RTL8192C_COMMON=m -CONFIG_RTL8XXXU=m -CONFIG_RTL8XXXU_UNTESTED=y -CONFIG_WLAN_VENDOR_RSI=y -CONFIG_RSI_91X=m -CONFIG_RSI_DEBUGFS=y -# CONFIG_RSI_SDIO is not set -CONFIG_RSI_USB=m -CONFIG_WLAN_VENDOR_ST=y -CONFIG_CW1200=m -# CONFIG_CW1200_WLAN_SDIO is not set -# CONFIG_CW1200_WLAN_SPI is not set -CONFIG_WLAN_VENDOR_TI=y -CONFIG_WL1251=m -# CONFIG_WL1251_SPI is not set -# CONFIG_WL1251_SDIO is not set -CONFIG_WL12XX=m -CONFIG_WL18XX=m -CONFIG_WLCORE=m -# CONFIG_WLCORE_SPI is not set -# CONFIG_WLCORE_SDIO is not set -CONFIG_WLAN_VENDOR_ZYDAS=y -CONFIG_USB_ZD1201=m -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -# CONFIG_MAC80211_HWSIM is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -# CONFIG_VMXNET3 is not set -# CONFIG_ISDN is not set -# CONFIG_NVM is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_LEDS=m -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set -# CONFIG_INPUT_SPARSEKMAP is not set -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_OMAP4 is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_CAP11XX is not set -# CONFIG_KEYBOARD_BCM is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_BYD=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_CYPRESS=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -CONFIG_MOUSE_PS2_ELANTECH=y -# CONFIG_MOUSE_PS2_SENTELIC is not set -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_FOCALTECH is not set -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_ELAN_I2C is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_ATMEL_CAPTOUCH is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_E3X0_BUTTON is not set -# CONFIG_INPUT_MMA8450 is not set -CONFIG_INPUT_MPU3050=y -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -# CONFIG_INPUT_REGULATOR_HAPTIC is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set -# CONFIG_INPUT_DRV2665_HAPTICS is not set -# CONFIG_INPUT_DRV2667_HAPTICS is not set -# CONFIG_RMI4_CORE is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_SERIO_ALTERA_PS2 is not set -# CONFIG_SERIO_PS2MULT is not set -# CONFIG_SERIO_ARC_PS2 is not set -# CONFIG_SERIO_APBPS2 is not set -# CONFIG_USERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_NOZOMI is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -CONFIG_SERIAL_EARLYCON=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y -# CONFIG_SERIAL_8250_FINTEK is not set -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_DW=y -# CONFIG_SERIAL_8250_EM is not set -# CONFIG_SERIAL_8250_RT288X is not set -# CONFIG_SERIAL_8250_MOXA is not set -CONFIG_SERIAL_OF_PLATFORM=y - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -# CONFIG_SERIAL_UARTLITE is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_SC16IS7XX is not set -# CONFIG_SERIAL_BCM63XX is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_SERIAL_RP2 is not set -# CONFIG_SERIAL_FSL_LPUART is not set -# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set -# CONFIG_SERIAL_ST_ASC is not set -# CONFIG_TTY_PRINTK is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=y -# CONFIG_HW_RANDOM_TIMERIOMEM is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_DEVPORT=y -# CONFIG_XILLYBUS is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y - -# -# Multiplexer I2C Chip support -# -# CONFIG_I2C_MUX_PCA9541 is not set -# CONFIG_I2C_MUX_REG is not set -# CONFIG_I2C_MUX_MLXCPLD is not set -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_ALGOBIT=m - -# -# I2C Hardware Bus support -# - -# -# PC SMBus host controller drivers -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_ISCH is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -CONFIG_I2C_BRCMSTB=y -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_DESIGNWARE_PCI is not set -# CONFIG_I2C_EMEV2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_RK3X is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_ROBOTFUZZ_OSIF is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_SLAVE is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_AXI_SPI_ENGINE is not set -# CONFIG_SPI_BCM_QSPI is not set -CONFIG_SPI_BITBANG=y -# CONFIG_SPI_CADENCE is not set -# CONFIG_SPI_DESIGNWARE is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_PXA2XX is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_ROCKCHIP is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_ZYNQMP_GQSPI is not set - -# -# SPI Protocol Masters -# -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_LOOPBACK_TEST is not set -# CONFIG_SPI_TLE62X0 is not set -# CONFIG_SPMI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -CONFIG_PPS=y -# CONFIG_PPS_DEBUG is not set - -# -# PPS clients support -# -# CONFIG_PPS_CLIENT_KTIMER is not set -# CONFIG_PPS_CLIENT_LDISC is not set -# CONFIG_PPS_CLIENT_GPIO is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -CONFIG_PTP_1588_CLOCK=y - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -# CONFIG_GPIOLIB is not set -# CONFIG_W1 is not set -# CONFIG_POWER_AVS is not set -CONFIG_POWER_RESET=y -# CONFIG_POWER_RESET_BRCMKONA is not set -CONFIG_POWER_RESET_BRCMSTB=y -# CONFIG_POWER_RESET_RESTART is not set -# CONFIG_POWER_RESET_VERSATILE is not set -# CONFIG_POWER_RESET_SYSCON is not set -# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set -# CONFIG_SYSCON_REBOOT_MODE is not set -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_BATTERY_BQ27XXX is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_MANAGER is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GAUGE_LTC2941 is not set -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_OF=y -# CONFIG_THERMAL_WRITABLE_TRIPS is not set -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -CONFIG_THERMAL_GOV_STEP_WISE=y -# CONFIG_THERMAL_GOV_BANG_BANG is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set -CONFIG_CPU_THERMAL=y -# CONFIG_CLOCK_THERMAL is not set -# CONFIG_THERMAL_EMULATION is not set -# CONFIG_QORIQ_THERMAL is not set - -# -# ACPI INT340X thermal drivers -# -# CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_CORE=m -# CONFIG_MFD_ACT8945A is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_MFD_AS3722 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_ATMEL_FLEXCOM is not set -# CONFIG_MFD_ATMEL_HLCDC is not set -# CONFIG_MFD_BCM590XX is not set -# CONFIG_MFD_AXP20X_I2C is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_DA9062 is not set -# CONFIG_MFD_DA9063 is not set -# CONFIG_MFD_DA9150 is not set -# CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_MFD_HI6421_PMIC is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_LPC_ICH is not set -# CONFIG_LPC_SCH is not set -# CONFIG_MFD_JANZ_CMODIO is not set -# CONFIG_MFD_KEMPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX14577 is not set -# CONFIG_MFD_MAX77620 is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX77843 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_MFD_MT6397 is not set -# CONFIG_MFD_MENF21BMC is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_PM8XXX is not set -# CONFIG_MFD_RDC321X is not set -# CONFIG_MFD_RTSX_PCI is not set -# CONFIG_MFD_RT5033 is not set -# CONFIG_MFD_RTSX_USB is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_RK808 is not set -# CONFIG_MFD_RN5T618 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SKY81452 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -CONFIG_MFD_SYSCON=y -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP3943 is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65086 is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TI_LP873X is not set -# CONFIG_MFD_TPS65218 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -CONFIG_MFD_WL1273_CORE=m -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set -# CONFIG_MFD_TC6393XB is not set -# CONFIG_MFD_VX855 is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -CONFIG_REGULATOR=y -# CONFIG_REGULATOR_DEBUG is not set -# CONFIG_REGULATOR_FIXED_VOLTAGE is not set -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set -# CONFIG_REGULATOR_ACT8865 is not set -# CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_ANATOP is not set -# CONFIG_REGULATOR_DA9210 is not set -# CONFIG_REGULATOR_DA9211 is not set -# CONFIG_REGULATOR_FAN53555 is not set -# CONFIG_REGULATOR_ISL9305 is not set -# CONFIG_REGULATOR_ISL6271A is not set -# CONFIG_REGULATOR_LP3971 is not set -# CONFIG_REGULATOR_LP3972 is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_LP8755 is not set -# CONFIG_REGULATOR_LTC3589 is not set -# CONFIG_REGULATOR_LTC3676 is not set -# CONFIG_REGULATOR_MAX1586 is not set -# CONFIG_REGULATOR_MAX8649 is not set -# CONFIG_REGULATOR_MAX8660 is not set -# CONFIG_REGULATOR_MAX8952 is not set -# CONFIG_REGULATOR_MAX8973 is not set -# CONFIG_REGULATOR_MT6311 is not set -# CONFIG_REGULATOR_PFUZE100 is not set -# CONFIG_REGULATOR_PV88060 is not set -# CONFIG_REGULATOR_PV88080 is not set -# CONFIG_REGULATOR_PV88090 is not set -# CONFIG_REGULATOR_TPS51632 is not set -# CONFIG_REGULATOR_TPS62360 is not set -# CONFIG_REGULATOR_TPS65023 is not set -# CONFIG_REGULATOR_TPS6507X is not set -# CONFIG_REGULATOR_TPS6524X is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -# CONFIG_MEDIA_SDR_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_MEDIA_CEC_SUPPORT=y -CONFIG_MEDIA_CEC_DEBUG=y -CONFIG_MEDIA_CEC_EDID=y -# CONFIG_MEDIA_CONTROLLER is not set -CONFIG_VIDEO_DEV=y -CONFIG_VIDEO_V4L2=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEOBUF_GEN=m -CONFIG_VIDEOBUF_VMALLOC=m -CONFIG_VIDEOBUF_DVB=m -CONFIG_VIDEOBUF2_CORE=m -CONFIG_VIDEOBUF2_MEMOPS=m -CONFIG_VIDEOBUF2_VMALLOC=m -CONFIG_DVB_CORE=y -CONFIG_DVB_NET=y -CONFIG_TTPCI_EEPROM=m -CONFIG_DVB_MAX_ADAPTERS=8 -CONFIG_DVB_DYNAMIC_MINORS=y -# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -# CONFIG_LIRC is not set -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_SHARP_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -CONFIG_IR_XMP_DECODER=y -# CONFIG_RC_DEVICES is not set -CONFIG_MEDIA_USB_SUPPORT=y - -# -# Webcam devices -# -CONFIG_USB_VIDEO_CLASS=m -CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y -CONFIG_USB_GSPCA=m -CONFIG_USB_M5602=m -CONFIG_USB_STV06XX=m -CONFIG_USB_GL860=m -CONFIG_USB_GSPCA_BENQ=m -CONFIG_USB_GSPCA_CONEX=m -CONFIG_USB_GSPCA_CPIA1=m -# CONFIG_USB_GSPCA_DTCS033 is not set -CONFIG_USB_GSPCA_ETOMS=m -CONFIG_USB_GSPCA_FINEPIX=m -CONFIG_USB_GSPCA_JEILINJ=m -CONFIG_USB_GSPCA_JL2005BCD=m -CONFIG_USB_GSPCA_KINECT=m -CONFIG_USB_GSPCA_KONICA=m -CONFIG_USB_GSPCA_MARS=m -CONFIG_USB_GSPCA_MR97310A=m -CONFIG_USB_GSPCA_NW80X=m -CONFIG_USB_GSPCA_OV519=m -CONFIG_USB_GSPCA_OV534=m -CONFIG_USB_GSPCA_OV534_9=m -CONFIG_USB_GSPCA_PAC207=m -CONFIG_USB_GSPCA_PAC7302=m -CONFIG_USB_GSPCA_PAC7311=m -CONFIG_USB_GSPCA_SE401=m -CONFIG_USB_GSPCA_SN9C2028=m -CONFIG_USB_GSPCA_SN9C20X=m -CONFIG_USB_GSPCA_SONIXB=m -CONFIG_USB_GSPCA_SONIXJ=m -CONFIG_USB_GSPCA_SPCA500=m -CONFIG_USB_GSPCA_SPCA501=m -CONFIG_USB_GSPCA_SPCA505=m -CONFIG_USB_GSPCA_SPCA506=m -CONFIG_USB_GSPCA_SPCA508=m -CONFIG_USB_GSPCA_SPCA561=m -CONFIG_USB_GSPCA_SPCA1528=m -CONFIG_USB_GSPCA_SQ905=m -CONFIG_USB_GSPCA_SQ905C=m -CONFIG_USB_GSPCA_SQ930X=m -CONFIG_USB_GSPCA_STK014=m -# CONFIG_USB_GSPCA_STK1135 is not set -CONFIG_USB_GSPCA_STV0680=m -CONFIG_USB_GSPCA_SUNPLUS=m -CONFIG_USB_GSPCA_T613=m -CONFIG_USB_GSPCA_TOPRO=m -# CONFIG_USB_GSPCA_TOUPTEK is not set -CONFIG_USB_GSPCA_TV8532=m -CONFIG_USB_GSPCA_VC032X=m -CONFIG_USB_GSPCA_VICAM=m -CONFIG_USB_GSPCA_XIRLINK_CIT=m -CONFIG_USB_GSPCA_ZC3XX=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_PWC_INPUT_EVDEV=y -CONFIG_VIDEO_CPIA2=m -CONFIG_USB_ZR364XX=m -CONFIG_USB_STKWEBCAM=m -CONFIG_USB_S2255=m -# CONFIG_VIDEO_USBTV is not set - -# -# Analog TV USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_SYSFS=y -CONFIG_VIDEO_PVRUSB2_DVB=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_USBVISION=m -# CONFIG_VIDEO_STK1160_COMMON is not set -# CONFIG_VIDEO_GO7007 is not set - -# -# Analog/digital TV USB devices -# -CONFIG_VIDEO_AU0828=m -# CONFIG_VIDEO_AU0828_V4L2 is not set -# CONFIG_VIDEO_AU0828_RC is not set -CONFIG_VIDEO_CX231XX=m -# CONFIG_VIDEO_CX231XX_RC is not set -CONFIG_VIDEO_CX231XX_ALSA=m -CONFIG_VIDEO_CX231XX_DVB=m -CONFIG_VIDEO_TM6000=m -CONFIG_VIDEO_TM6000_ALSA=m -CONFIG_VIDEO_TM6000_DVB=m - -# -# Digital TV USB devices -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_DIB3000MC=m -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_USB_AF9005=m -# CONFIG_DVB_USB_AF9005_REMOTE is not set -CONFIG_DVB_USB_PCTV452E=m -CONFIG_DVB_USB_DW2102=m -CONFIG_DVB_USB_CINERGY_T2=m -CONFIG_DVB_USB_DTV5100=m -CONFIG_DVB_USB_FRIIO=m -CONFIG_DVB_USB_AZ6027=m -CONFIG_DVB_USB_TECHNISAT_USB2=m -CONFIG_DVB_USB_TBS=m -CONFIG_DVB_USB_V2=m -CONFIG_DVB_USB_AF9015=m -CONFIG_DVB_USB_AF9035=m -CONFIG_DVB_USB_ANYSEE=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_AZ6007=m -CONFIG_DVB_USB_CE6230=m -CONFIG_DVB_USB_EC168=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_LME2510=m -CONFIG_DVB_USB_MXL111SF=m -CONFIG_DVB_USB_RTL28XXU=m -CONFIG_DVB_USB_DVBSKY=m -# CONFIG_DVB_TTUSB_BUDGET is not set -# CONFIG_DVB_TTUSB_DEC is not set -CONFIG_SMS_USB_DRV=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set -CONFIG_DVB_AS102=m - -# -# Webcam, TV (analog/digital) USB devices -# -CONFIG_VIDEO_EM28XX=m -# CONFIG_VIDEO_EM28XX_V4L2 is not set -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_EM28XX_DVB=m -CONFIG_VIDEO_EM28XX_RC=m - -# -# USB HDMI CEC adapters -# -# CONFIG_USB_PULSE8_CEC is not set -# CONFIG_MEDIA_PCI_SUPPORT is not set -CONFIG_V4L_PLATFORM_DRIVERS=y -# CONFIG_VIDEO_CAFE_CCIC is not set -# CONFIG_SOC_CAMERA is not set -# CONFIG_V4L_MEM2MEM_DRIVERS is not set -# CONFIG_V4L_TEST_DRIVERS is not set -# CONFIG_DVB_PLATFORM_DRIVERS is not set - -# -# Supported MMC/SDIO adapters -# -CONFIG_SMS_SDIO_DRV=y -CONFIG_RADIO_ADAPTERS=y -CONFIG_RADIO_SI470X=y -CONFIG_USB_SI470X=m -CONFIG_I2C_SI470X=m -CONFIG_RADIO_SI4713=m -# CONFIG_USB_SI4713 is not set -# CONFIG_PLATFORM_SI4713 is not set -CONFIG_I2C_SI4713=m -CONFIG_USB_MR800=m -CONFIG_USB_DSBR=m -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_SHARK is not set -# CONFIG_RADIO_SHARK2 is not set -CONFIG_USB_KEENE=m -# CONFIG_USB_RAREMONO is not set -CONFIG_USB_MA901=m -CONFIG_RADIO_TEA5764=m -CONFIG_RADIO_SAA7706H=m -CONFIG_RADIO_TEF6862=m -CONFIG_RADIO_WL1273=m - -# -# Texas Instruments WL128x FM driver (ST based) -# -CONFIG_MEDIA_COMMON_OPTIONS=y - -# -# common driver options -# -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_CYPRESS_FIRMWARE=m -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_SMS_SIANO_MDTV=y -# CONFIG_SMS_SIANO_RC is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) -# -CONFIG_MEDIA_SUBDRV_AUTOSELECT=y -CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=y - -# -# Audio decoders, processors and mixers -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_WM8775=m - -# -# RDS decoders -# - -# -# Video decoders -# -CONFIG_VIDEO_SAA711X=m - -# -# Video and audio decoders -# -CONFIG_VIDEO_CX25840=m - -# -# Video encoders -# - -# -# Camera sensor devices -# - -# -# Flash devices -# - -# -# Video improvement chips -# - -# -# Audio/Video compression chips -# - -# -# Miscellaneous helper chips -# - -# -# Sensors used on soc_camera driver -# -CONFIG_MEDIA_TUNER=y -CONFIG_MEDIA_TUNER_SIMPLE=y -CONFIG_MEDIA_TUNER_TDA8290=y -CONFIG_MEDIA_TUNER_TDA827X=y -CONFIG_MEDIA_TUNER_TDA18271=y -CONFIG_MEDIA_TUNER_TDA9887=y -CONFIG_MEDIA_TUNER_TEA5761=y -CONFIG_MEDIA_TUNER_TEA5767=y -CONFIG_MEDIA_TUNER_MT20XX=y -CONFIG_MEDIA_TUNER_MT2060=m -CONFIG_MEDIA_TUNER_MT2063=m -CONFIG_MEDIA_TUNER_MT2266=m -CONFIG_MEDIA_TUNER_QT1010=m -CONFIG_MEDIA_TUNER_XC2028=y -CONFIG_MEDIA_TUNER_XC5000=y -CONFIG_MEDIA_TUNER_XC4000=y -CONFIG_MEDIA_TUNER_MXL5005S=m -CONFIG_MEDIA_TUNER_MXL5007T=m -CONFIG_MEDIA_TUNER_MC44S803=y -CONFIG_MEDIA_TUNER_MAX2165=m -CONFIG_MEDIA_TUNER_TDA18218=m -CONFIG_MEDIA_TUNER_FC0011=m -CONFIG_MEDIA_TUNER_FC0012=m -CONFIG_MEDIA_TUNER_FC0013=m -CONFIG_MEDIA_TUNER_TDA18212=m -CONFIG_MEDIA_TUNER_E4000=m -CONFIG_MEDIA_TUNER_FC2580=m -CONFIG_MEDIA_TUNER_TUA9001=m -CONFIG_MEDIA_TUNER_SI2157=m -CONFIG_MEDIA_TUNER_IT913X=m -CONFIG_MEDIA_TUNER_R820T=m -CONFIG_MEDIA_TUNER_QM1D1C0042=m - -# -# Multistandard (satellite) frontends -# -CONFIG_DVB_STB0899=m -CONFIG_DVB_STB6100=m -CONFIG_DVB_STV090x=m -CONFIG_DVB_STV6110x=m -CONFIG_DVB_M88DS3103=m - -# -# Multistandard (cable + terrestrial) frontends -# -CONFIG_DVB_DRXK=m -CONFIG_DVB_TDA18271C2DD=m -CONFIG_DVB_SI2165=m -CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_CX24123=m -CONFIG_DVB_MT312=m -CONFIG_DVB_ZL10039=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_STV0288=m -CONFIG_DVB_STB6000=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_STV6110=m -CONFIG_DVB_STV0900=m -CONFIG_DVB_TDA10086=m -CONFIG_DVB_TUNER_ITD1000=m -CONFIG_DVB_TUNER_CX24113=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_CX24116=m -CONFIG_DVB_CX24120=m -CONFIG_DVB_SI21XX=m -CONFIG_DVB_TS2020=m -CONFIG_DVB_DS3000=m -CONFIG_DVB_TDA10071=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_CX22702=m -CONFIG_DVB_DRXD=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m -CONFIG_DVB_TDA10048=m -CONFIG_DVB_AF9013=m -CONFIG_DVB_EC100=m -CONFIG_DVB_CXD2820R=m -CONFIG_DVB_RTL2830=m -CONFIG_DVB_RTL2832=m -CONFIG_DVB_SI2168=m -CONFIG_DVB_AS102_FE=m -CONFIG_DVB_GP8PSK_FE=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_DVB_LGDT3305=m -CONFIG_DVB_LGDT3306A=m -CONFIG_DVB_LG2160=m -CONFIG_DVB_S5H1409=m -CONFIG_DVB_AU8522=m -CONFIG_DVB_AU8522_DTV=m -CONFIG_DVB_S5H1411=m - -# -# ISDB-T (terrestrial) frontends -# -CONFIG_DVB_S921=m -CONFIG_DVB_DIB8000=m -CONFIG_DVB_MB86A20S=m - -# -# ISDB-S (satellite) & ISDB-T (terrestrial) frontends -# -CONFIG_DVB_TC90522=m - -# -# Digital terrestrial only tuners/PLL -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TUNER_DIB0070=m -CONFIG_DVB_TUNER_DIB0090=m - -# -# SEC control devices for DVB-S -# -CONFIG_DVB_DRX39XYJ=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_LNBP22=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_ISL6423=m -CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m -CONFIG_DVB_LGS8GXX=m -CONFIG_DVB_ATBM8830=m -CONFIG_DVB_IX2505V=m -CONFIG_DVB_M88RS2000=m -CONFIG_DVB_AF9033=m - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -# CONFIG_VGA_ARB is not set -# CONFIG_IMX_IPUV3_CORE is not set -# CONFIG_DRM is not set - -# -# ACP (Audio CoProcessor) Configuration -# - -# -# Frame buffer Devices -# -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_CMDLINE=y -CONFIG_FB_NOTIFY=y -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_OPENCORES is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I740 is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_S3 is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_VT8623 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_ARK is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_CARMINE is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_IBM_GXT4500 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_FB_SM712 is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# CONFIG_VGASTATE is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_LOGO is not set -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_JACK=y -CONFIG_SND_JACK_INPUT_DEV=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_PCM_TIMER=y -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_PROC_FS=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_PCI=y -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AW2 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_OXYGEN is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CTXFI is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set -# CONFIG_SND_INDIGOIOX is not set -# CONFIG_SND_INDIGODJX is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_LOLA is not set -# CONFIG_SND_LX6464ES is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SE6X is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VIRTUOSO is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# HD-Audio -# -# CONFIG_SND_HDA_INTEL is not set -CONFIG_SND_HDA_PREALLOC_SIZE=64 -CONFIG_SND_ARM=y -CONFIG_SND_SPI=y -CONFIG_SND_USB=y -# CONFIG_SND_USB_AUDIO is not set -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -# CONFIG_SND_USB_HIFACE is not set -# CONFIG_SND_BCD2000 is not set -# CONFIG_SND_USB_POD is not set -# CONFIG_SND_USB_PODHD is not set -# CONFIG_SND_USB_TONEPORT is not set -# CONFIG_SND_USB_VARIAX is not set -CONFIG_SND_SOC=y -# CONFIG_SND_SOC_AMD_ACP is not set -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set - -# -# SoC Audio for Freescale CPUs -# - -# -# Common SoC Audio options for Freescale CPUs: -# -# CONFIG_SND_SOC_FSL_ASRC is not set -# CONFIG_SND_SOC_FSL_SAI is not set -# CONFIG_SND_SOC_FSL_SSI is not set -# CONFIG_SND_SOC_FSL_SPDIF is not set -# CONFIG_SND_SOC_FSL_ESAI is not set -# CONFIG_SND_SOC_IMX_AUDMUX is not set -# CONFIG_SND_SOC_IMG is not set -# CONFIG_SND_SOC_XTFPGA_I2S is not set -CONFIG_SND_SOC_I2C_AND_SPI=y - -# -# CODEC drivers -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_ADAU1701 is not set -# CONFIG_SND_SOC_ADAU7002 is not set -# CONFIG_SND_SOC_AK4104 is not set -# CONFIG_SND_SOC_AK4554 is not set -# CONFIG_SND_SOC_AK4613 is not set -# CONFIG_SND_SOC_AK4642 is not set -# CONFIG_SND_SOC_AK5386 is not set -# CONFIG_SND_SOC_ALC5623 is not set -# CONFIG_SND_SOC_BT_SCO is not set -# CONFIG_SND_SOC_CS35L32 is not set -# CONFIG_SND_SOC_CS35L33 is not set -# CONFIG_SND_SOC_CS35L34 is not set -# CONFIG_SND_SOC_CS42L42 is not set -# CONFIG_SND_SOC_CS42L51_I2C is not set -# CONFIG_SND_SOC_CS42L52 is not set -# CONFIG_SND_SOC_CS42L56 is not set -# CONFIG_SND_SOC_CS42L73 is not set -# CONFIG_SND_SOC_CS4265 is not set -# CONFIG_SND_SOC_CS4270 is not set -# CONFIG_SND_SOC_CS4271_I2C is not set -# CONFIG_SND_SOC_CS4271_SPI is not set -# CONFIG_SND_SOC_CS42XX8_I2C is not set -# CONFIG_SND_SOC_CS4349 is not set -# CONFIG_SND_SOC_CS53L30 is not set -# CONFIG_SND_SOC_ES8328 is not set -# CONFIG_SND_SOC_GTM601 is not set -# CONFIG_SND_SOC_INNO_RK3036 is not set -# CONFIG_SND_SOC_MAX98504 is not set -# CONFIG_SND_SOC_MAX9860 is not set -# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set -# CONFIG_SND_SOC_PCM1681 is not set -# CONFIG_SND_SOC_PCM179X_I2C is not set -# CONFIG_SND_SOC_PCM179X_SPI is not set -# CONFIG_SND_SOC_PCM3168A_I2C is not set -# CONFIG_SND_SOC_PCM3168A_SPI is not set -# CONFIG_SND_SOC_PCM512x_I2C is not set -# CONFIG_SND_SOC_PCM512x_SPI is not set -# CONFIG_SND_SOC_RT5616 is not set -# CONFIG_SND_SOC_RT5631 is not set -# CONFIG_SND_SOC_RT5677_SPI is not set -# CONFIG_SND_SOC_SGTL5000 is not set -# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set -# CONFIG_SND_SOC_SPDIF is not set -# CONFIG_SND_SOC_SSM2602_SPI is not set -# CONFIG_SND_SOC_SSM2602_I2C is not set -# CONFIG_SND_SOC_SSM4567 is not set -# CONFIG_SND_SOC_STA32X is not set -# CONFIG_SND_SOC_STA350 is not set -# CONFIG_SND_SOC_STI_SAS is not set -# CONFIG_SND_SOC_TAS2552 is not set -# CONFIG_SND_SOC_TAS5086 is not set -# CONFIG_SND_SOC_TAS571X is not set -# CONFIG_SND_SOC_TAS5720 is not set -# CONFIG_SND_SOC_TFA9879 is not set -# CONFIG_SND_SOC_TLV320AIC23_I2C is not set -# CONFIG_SND_SOC_TLV320AIC23_SPI is not set -# CONFIG_SND_SOC_TLV320AIC31XX is not set -# CONFIG_SND_SOC_TLV320AIC3X is not set -# CONFIG_SND_SOC_TS3A227E is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8523 is not set -# CONFIG_SND_SOC_WM8580 is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8728 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8737 is not set -# CONFIG_SND_SOC_WM8741 is not set -# CONFIG_SND_SOC_WM8750 is not set -# CONFIG_SND_SOC_WM8753 is not set -# CONFIG_SND_SOC_WM8770 is not set -# CONFIG_SND_SOC_WM8776 is not set -# CONFIG_SND_SOC_WM8804_I2C is not set -# CONFIG_SND_SOC_WM8804_SPI is not set -# CONFIG_SND_SOC_WM8903 is not set -# CONFIG_SND_SOC_WM8960 is not set -# CONFIG_SND_SOC_WM8962 is not set -# CONFIG_SND_SOC_WM8974 is not set -# CONFIG_SND_SOC_WM8978 is not set -# CONFIG_SND_SOC_WM8985 is not set -# CONFIG_SND_SOC_NAU8810 is not set -# CONFIG_SND_SOC_TPA6130A2 is not set -# CONFIG_SND_SIMPLE_CARD is not set -# CONFIG_SND_SIMPLE_SCU_CARD is not set -CONFIG_SOUND_PRIME=y - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -CONFIG_HIDRAW=y -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -# CONFIG_HID_A4TECH is not set -# CONFIG_HID_ACRUX is not set -# CONFIG_HID_APPLE is not set -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -# CONFIG_HID_BELKIN is not set -# CONFIG_HID_BETOP_FF is not set -# CONFIG_HID_CHERRY is not set -# CONFIG_HID_CHICONY is not set -# CONFIG_HID_CORSAIR is not set -# CONFIG_HID_PRODIKEYS is not set -# CONFIG_HID_CMEDIA is not set -# CONFIG_HID_CYPRESS is not set -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -# CONFIG_HID_ELO is not set -# CONFIG_HID_EZKEY is not set -# CONFIG_HID_GEMBIRD is not set -# CONFIG_HID_GFRM is not set -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_GT683R is not set -# CONFIG_HID_KEYTOUCH is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_ICADE is not set -# CONFIG_HID_TWINHAN is not set -# CONFIG_HID_KENSINGTON is not set -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LED is not set -# CONFIG_HID_LENOVO is not set -CONFIG_HID_LOGITECH=y -CONFIG_HID_LOGITECH_DJ=y -CONFIG_HID_LOGITECH_HIDPP=y -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -# CONFIG_HID_MAYFLASH is not set -# CONFIG_HID_MICROSOFT is not set -# CONFIG_HID_MONTEREY is not set -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PENMOUNT is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PLANTRONICS is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_RMI is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TIVO is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THINGM is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_UDRAW_PS3 is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -# CONFIG_HID_XINMO is not set -# CONFIG_HID_ZEROPLUS is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set -# CONFIG_HID_ALPS is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -CONFIG_USB_HIDDEV=y - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_PCI=y -CONFIG_USB_XHCI_PLATFORM=y -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_EHCI_PCI=y -# CONFIG_USB_EHCI_HCD_PLATFORM is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_FOTG210_HCD is not set -# CONFIG_USB_MAX3421_HCD is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PCI=y -# CONFIG_USB_OHCI_HCD_PLATFORM is not set -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HCD_TEST_MODE is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_STORAGE_ENE_UB6250 is not set -CONFIG_USB_UAS=y - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USBIP_CORE is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_DWC2 is not set -# CONFIG_USB_CHIPIDEA is not set -# CONFIG_USB_ISP1760 is not set - -# -# USB port drivers -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_SIMPLE is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_CH341=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -CONFIG_USB_SERIAL_CP210X=m -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -CONFIG_USB_SERIAL_F81232=m -# CONFIG_USB_SERIAL_F8153X is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_IUU is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MXUPORT is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=m -CONFIG_USB_SERIAL_OPTION=m -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_XSENS_MT is not set -# CONFIG_USB_SERIAL_WISHBONE is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_QT2 is not set -# CONFIG_USB_SERIAL_DEBUG is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_EHSET_TEST_FIXTURE is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -CONFIG_USB_EZUSB_FX2=m -# CONFIG_USB_HSIC_USB3503 is not set -# CONFIG_USB_HSIC_USB4604 is not set -# CONFIG_USB_LINK_LAYER_TEST is not set -# CONFIG_USB_CHAOSKEY is not set - -# -# USB Physical Layer drivers -# -# CONFIG_USB_PHY is not set -# CONFIG_NOP_USB_XCEIV is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_ULPI is not set -# CONFIG_USB_GADGET is not set -# CONFIG_USB_LED_TRIG is not set -# CONFIG_USB_ULPI_BUS is not set -# CONFIG_UWB is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_PWRSEQ_EMMC=y -CONFIG_PWRSEQ_SIMPLE=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=16 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -CONFIG_MMC_SDHCI=y -# CONFIG_MMC_SDHCI_PCI is not set -CONFIG_MMC_SDHCI_PLTFM=y -# CONFIG_MMC_SDHCI_OF_ARASAN is not set -# CONFIG_MMC_SDHCI_OF_AT91 is not set -# CONFIG_MMC_SDHCI_CADENCE is not set -# CONFIG_MMC_SDHCI_F_SDH30 is not set -# CONFIG_MMC_TIFM_SD is not set -# CONFIG_MMC_CB710 is not set -# CONFIG_MMC_VIA_SDMMC is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MMC_USDHI6ROL0 is not set -# CONFIG_MMC_TOSHIBA_PCI is not set -# CONFIG_MMC_MTK is not set -CONFIG_MMC_SDHCI_BRCMSTB=y -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m -# CONFIG_LEDS_CLASS_FLASH is not set - -# -# LED drivers -# -# CONFIG_LEDS_BCM6328 is not set -# CONFIG_LEDS_BCM6358 is not set -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_LP8501 is not set -# CONFIG_LEDS_LP8860 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA963X is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_REGULATOR is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_TLC591XX is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_IS31FL319X is not set -# CONFIG_LEDS_IS31FL32XX is not set - -# -# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) -# -# CONFIG_LEDS_BLINKM is not set -# CONFIG_LEDS_USER is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -# CONFIG_LEDS_TRIGGER_TIMER is not set -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_DISK is not set -# CONFIG_LEDS_TRIGGER_MTD is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -# CONFIG_LEDS_TRIGGER_PANIC is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_INFINIBAND is not set -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set -# CONFIG_DMADEVICES is not set - -# -# DMABUF options -# -# CONFIG_SYNC_FILE is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -CONFIG_PRISM2_USB=m -# CONFIG_COMEDI is not set -CONFIG_RTL8192U=m -CONFIG_RTLLIB=m -CONFIG_RTLLIB_CRYPTO_CCMP=m -CONFIG_RTLLIB_CRYPTO_TKIP=m -CONFIG_RTLLIB_CRYPTO_WEP=m -CONFIG_RTL8192E=m -CONFIG_R8712U=m -CONFIG_R8188EU=m -# CONFIG_88EU_AP_MODE is not set -# CONFIG_RTS5208 is not set -# CONFIG_VT6655 is not set -# CONFIG_VT6656 is not set -# CONFIG_FB_SM750 is not set -# CONFIG_FB_XGI is not set - -# -# Speakup console speech -# -# CONFIG_SPEAKUP is not set -CONFIG_STAGING_MEDIA=y -# CONFIG_I2C_BCM2048 is not set -# CONFIG_DVB_CXD2099 is not set - -# -# Android -# -# CONFIG_STAGING_BOARD is not set -# CONFIG_LTE_GDM724X is not set -# CONFIG_MTD_SPINAND_MT29F is not set -# CONFIG_LNET is not set -# CONFIG_DGNC is not set -# CONFIG_GS_FPGABOOT is not set -# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set -# CONFIG_WILC1000_SDIO is not set -# CONFIG_WILC1000_SPI is not set -# CONFIG_MOST is not set -# CONFIG_KS7010 is not set -# CONFIG_GREYBUS is not set -# CONFIG_GOLDFISH is not set -# CONFIG_CHROME_PLATFORMS is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_SI5351 is not set -# CONFIG_COMMON_CLK_SI514 is not set -# CONFIG_COMMON_CLK_SI570 is not set -# CONFIG_COMMON_CLK_CDCE706 is not set -# CONFIG_COMMON_CLK_CDCE925 is not set -# CONFIG_COMMON_CLK_CS2000_CP is not set -# CONFIG_CLK_QORIQ is not set -# CONFIG_COMMON_CLK_NXP is not set -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_PIC32 is not set -# CONFIG_COMMON_CLK_MT2701 is not set -# CONFIG_COMMON_CLK_MT2701_MMSYS is not set -# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set -# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set -# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set -# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set -# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set - -# -# Hardware Spinlock drivers -# - -# -# Clock Source drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -# CONFIG_ARM_TIMER_SP804 is not set -# CONFIG_ATMEL_PIT is not set -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set -# CONFIG_MAILBOX is not set -# CONFIG_IOMMU_SUPPORT is not set - -# -# Remoteproc drivers -# -# CONFIG_REMOTEPROC is not set - -# -# Rpmsg drivers -# - -# -# SOC (System On Chip) specific Drivers -# - -# -# Broadcom SoC drivers -# -CONFIG_SOC_BRCMSTB=y -CONFIG_BRCMSTB_CMA=y -CONFIG_BRCMSTB_MEMORY_API=y -CONFIG_BRCMSTB_PM=y -# CONFIG_SUNXI_SRAM is not set -# CONFIG_SOC_TI is not set -# CONFIG_PM_DEVFREQ is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_NTB is not set -# CONFIG_VME_BUS is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_ARM_GIC_MAX_NR=1 -CONFIG_BCM7120_L2_IRQ=y -CONFIG_BRCMSTB_L2_IRQ=y -# CONFIG_IPACK_BUS is not set -CONFIG_RESET_CONTROLLER=y -# CONFIG_RESET_ATH79 is not set -# CONFIG_RESET_BERLIN is not set -# CONFIG_RESET_LPC18XX is not set -# CONFIG_RESET_MESON is not set -# CONFIG_RESET_PISTACHIO is not set -# CONFIG_RESET_SOCFPGA is not set -# CONFIG_RESET_STM32 is not set -# CONFIG_RESET_SUNXI is not set -# CONFIG_TI_SYSCON_RESET is not set -# CONFIG_RESET_ZYNQ is not set -# CONFIG_RESET_TEGRA_BPMP is not set -# CONFIG_FMC is not set - -# -# PHY Subsystem -# -CONFIG_GENERIC_PHY=y -# CONFIG_PHY_PXA_28NM_HSIC is not set -# CONFIG_PHY_PXA_28NM_USB2 is not set -# CONFIG_BCM_KONA_USB2_PHY is not set -CONFIG_PHY_BRCM_SATA=y -# CONFIG_POWERCAP is not set -# CONFIG_MCB is not set - -# -# Performance monitor support -# -CONFIG_ARM_PMU=y -# CONFIG_RAS is not set - -# -# Android -# -# CONFIG_ANDROID is not set -# CONFIG_LIBNVDIMM is not set -# CONFIG_NVMEM is not set -# CONFIG_STM is not set -# CONFIG_INTEL_TH is not set - -# -# FPGA Configuration Support -# -# CONFIG_FPGA is not set - -# -# Firmware Drivers -# -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_PSCI_CHECKER is not set -# CONFIG_FIRMWARE_MEMMAP is not set -# CONFIG_FW_CFG_SYSFS is not set -CONFIG_HAVE_ARM_SMCCC=y - -# -# Tegra firmware driver -# - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_FS_IOMAP=y -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -# CONFIG_EXT4_FS_SECURITY is not set -# CONFIG_EXT4_ENCRYPTION is not set -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_XFS_FS=m -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_POSIX_ACL is not set -CONFIG_XFS_RT=y -# CONFIG_XFS_WARN is not set -# CONFIG_XFS_DEBUG is not set -# CONFIG_GFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_F2FS_FS=m -CONFIG_F2FS_STAT_FS=y -CONFIG_F2FS_FS_XATTR=y -CONFIG_F2FS_FS_POSIX_ACL=y -# CONFIG_F2FS_FS_SECURITY is not set -# CONFIG_F2FS_CHECK_FS is not set -# CONFIG_F2FS_FS_ENCRYPTION is not set -# CONFIG_F2FS_FAULT_INJECTION is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=y -# CONFIG_EXPORTFS_BLOCK_OPS is not set -CONFIG_FILE_LOCKING=y -CONFIG_MANDATORY_FILE_LOCKING=y -CONFIG_FS_ENCRYPTION=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_FANOTIFY=y -# CONFIG_QUOTA is not set -# CONFIG_QUOTACTL is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -# CONFIG_OVERLAY_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=y -# CONFIG_FSCACHE_STATS is not set -# CONFIG_FSCACHE_HISTOGRAM is not set -# CONFIG_FSCACHE_DEBUG is not set -# CONFIG_FSCACHE_OBJECT_LIST is not set -# CONFIG_CACHEFILES is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=y -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_FAT_DEFAULT_UTF8 is not set -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -# CONFIG_PROC_CHILDREN is not set -CONFIG_KERNFS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set -# CONFIG_CONFIGFS_FS is not set -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ORANGEFS_FS is not set -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_ECRYPT_FS is not set -CONFIG_HFS_FS=y -CONFIG_HFSPLUS_FS=y -# CONFIG_HFSPLUS_FS_POSIX_ACL is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RTIME=y -CONFIG_JFFS2_RUBIN=y -# CONFIG_JFFS2_CMODE_NONE is not set -# CONFIG_JFFS2_CMODE_PRIORITY is not set -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_JFFS2_CMODE_FAVOURLZO=y -CONFIG_UBIFS_FS=y -# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_ATIME_SUPPORT is not set -CONFIG_UBIFS_FS_ENCRYPTION=y -# CONFIG_CRAMFS is not set -CONFIG_SQUASHFS=m -CONFIG_SQUASHFS_FILE_CACHE=y -# CONFIG_SQUASHFS_FILE_DIRECT is not set -CONFIG_SQUASHFS_DECOMP_SINGLE=y -# CONFIG_SQUASHFS_DECOMP_MULTI is not set -# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set -# CONFIG_SQUASHFS_XATTR is not set -CONFIG_SQUASHFS_ZLIB=y -# CONFIG_SQUASHFS_LZ4 is not set -# CONFIG_SQUASHFS_LZO is not set -# CONFIG_SQUASHFS_XZ is not set -# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V2=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -CONFIG_NFS_SWAP=y -CONFIG_NFS_V4_1=y -CONFIG_NFS_V4_2=y -CONFIG_PNFS_FILE_LAYOUT=y -CONFIG_PNFS_FLEXFILE_LAYOUT=m -CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" -# CONFIG_NFS_V4_1_MIGRATION is not set -CONFIG_ROOT_NFS=y -# CONFIG_NFS_FSCACHE is not set -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_USE_KERNEL_DNS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_GRACE_PERIOD=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_SUNRPC_BACKCHANNEL=y -CONFIG_SUNRPC_SWAP=y -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_SUNRPC_DEBUG is not set -# CONFIG_CEPH_FS is not set -CONFIG_CIFS=y -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_UPCALL is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG is not set -# CONFIG_CIFS_DFS_UPCALL is not set -CONFIG_CIFS_SMB2=y -# CONFIG_CIFS_SMB311 is not set -# CONFIG_CIFS_FSCACHE is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-15" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y - -# -# Kernel hacking -# - -# -# printk and dmesg options -# -CONFIG_PRINTK_TIME=y -CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_BOOT_PRINTK_DELAY is not set -CONFIG_DYNAMIC_DEBUG=y - -# -# Compile-time checks and compiler options -# -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_REDUCED=y -# CONFIG_DEBUG_INFO_SPLIT is not set -# CONFIG_DEBUG_INFO_DWARF4 is not set -# CONFIG_GDB_SCRIPTS is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1024 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_PAGE_OWNER is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -CONFIG_DEBUG_KERNEL=y - -# -# Memory Debugging -# -# CONFIG_PAGE_EXTENSION is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_PAGE_POISONING is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_SHIRQ is not set - -# -# Debug Lockups and Hangs -# -CONFIG_LOCKUP_DETECTOR=y -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 -# CONFIG_DETECT_HUNG_TASK is not set -# CONFIG_WQ_WATCHDOG is not set -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -# CONFIG_SCHED_DEBUG is not set -# CONFIG_SCHED_INFO is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_SCHED_STACK_END_CHECK is not set -# CONFIG_DEBUG_TIMEKEEPING is not set -# CONFIG_TIMER_STATS is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_LOCK_TORTURE_TEST is not set -# CONFIG_STACKTRACE is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_PI_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_TORTURE_TEST is not set -# CONFIG_RCU_PERF_TEST is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -# CONFIG_RCU_TRACE is not set -# CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_LATENCYTOP is not set -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set - -# -# Runtime Testing -# -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_RBTREE_TEST is not set -# CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_PERCPU_TEST is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_TEST_HEXDUMP is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_BITMAP is not set -# CONFIG_TEST_UUID is not set -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_TEST_HASH is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_TEST_FIRMWARE is not set -# CONFIG_TEST_UDELAY is not set -# CONFIG_MEMTEST is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_BUG_ON_DATA_CORRUPTION is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set -# CONFIG_UBSAN is not set -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_PTDUMP is not set -CONFIG_ARM_UNWIND=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_DEBUG_BRCMSTB_UART=y -# CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_SEMIHOSTING is not set -# CONFIG_DEBUG_LL_UART_8250 is not set -# CONFIG_DEBUG_LL_UART_PL01X is not set -CONFIG_DEBUG_LL_INCLUDE="debug/brcmstb.S" -# CONFIG_DEBUG_UART_8250 is not set -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_EARLY_PRINTK=y -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_DEBUG_SET_MODULE_RONX is not set -# CONFIG_CORESIGHT is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_PERSISTENT_KEYRINGS is not set -# CONFIG_BIG_KEYS is not set -# CONFIG_ENCRYPTED_KEYS is not set -# CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set -CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y -CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y -# CONFIG_HARDENED_USERCOPY is not set -CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_SECURITY="" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_AKCIPHER2=y -CONFIG_CRYPTO_KPP2=y -CONFIG_CRYPTO_ACOMP2=y -# CONFIG_CRYPTO_RSA is not set -# CONFIG_CRYPTO_DH is not set -# CONFIG_CRYPTO_ECDH is not set -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -# CONFIG_CRYPTO_MCRYPTD is not set -CONFIG_CRYPTO_AUTHENC=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIMD=m - -# -# Authenticated Encryption with Associated Data -# -CONFIG_CRYPTO_CCM=y -CONFIG_CRYPTO_GCM=m -# CONFIG_CRYPTO_CHACHA20POLY1305 is not set -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_ECHAINIV=m - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTR=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -CONFIG_CRYPTO_XTS=y -# CONFIG_CRYPTO_KEYWRAP is not set - -# -# Hash modes -# -CONFIG_CRYPTO_CMAC=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRC32=m -# CONFIG_CRYPTO_CRCT10DIF is not set -CONFIG_CRYPTO_GHASH=m -# CONFIG_CRYPTO_POLY1305 is not set -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_SHA3 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_CHACHA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_842 is not set -# CONFIG_CRYPTO_LZ4 is not set -# CONFIG_CRYPTO_LZ4HC is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_DRBG_HMAC=y -# CONFIG_CRYPTO_DRBG_HASH is not set -# CONFIG_CRYPTO_DRBG_CTR is not set -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_JITTERENTROPY=y -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_USER_API_RNG is not set -# CONFIG_CRYPTO_USER_API_AEAD is not set -CONFIG_CRYPTO_HW=y -# CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set -# CONFIG_ASYMMETRIC_KEY_TYPE is not set - -# -# Certificates for signature checking -# -CONFIG_ARM_CRYPTO=y -CONFIG_CRYPTO_SHA1_ARM=m -CONFIG_CRYPTO_SHA1_ARM_NEON=m -CONFIG_CRYPTO_SHA1_ARM_CE=m -CONFIG_CRYPTO_SHA2_ARM_CE=m -CONFIG_CRYPTO_SHA256_ARM=m -CONFIG_CRYPTO_SHA512_ARM=m -CONFIG_CRYPTO_AES_ARM=m -CONFIG_CRYPTO_AES_ARM_BS=m -CONFIG_CRYPTO_AES_ARM_CE=m -CONFIG_CRYPTO_GHASH_ARM_CE=m -CONFIG_CRYPTO_CRC32_ARM_CE=m -# CONFIG_BINARY_PRINTF is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_RATIONAL=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_NET_UTILS=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -# CONFIG_CRC8 is not set -# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set -# CONFIG_RANDOM32_SELFTEST is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_GLOB=y -# CONFIG_GLOB_SELFTEST is not set -CONFIG_NLATTR=y -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_IRQ_POLL is not set -CONFIG_LIBFDT=y -CONFIG_OID_REGISTRY=y -CONFIG_FONT_SUPPORT=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -# CONFIG_SG_SPLIT is not set -CONFIG_SG_POOL=y -CONFIG_ARCH_HAS_SG_CHAIN=y -CONFIG_SBITMAP=y -# CONFIG_VIRTUALIZATION is not set diff --git a/archive-patches/armbox/hd51/dvbs2x.patch b/archive-patches/armbox/hd51/dvbs2x.patch deleted file mode 100644 index 6c9d303..0000000 --- a/archive-patches/armbox/hd51/dvbs2x.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c -index 3ab8747..78c1b24 100644 ---- a/drivers/media/dvb-core/dvb_frontend.c -+++ b/drivers/media/dvb-core/dvb_frontend.c -@@ -202,6 +202,7 @@ - return DVBV3_QAM; - case SYS_DVBS: - case SYS_DVBS2: -+ case SYS_DVBS2X: - case SYS_TURBO: - case SYS_ISDBS: - case SYS_DSS: -@@ -907,6 +908,7 @@ - switch (c->delivery_system) { - case SYS_DVBS: - case SYS_DVBS2: -+ case SYS_DVBS2X: - case SYS_TURBO: - case SYS_DVBC_ANNEX_A: - case SYS_DVBC_ANNEX_C: -@@ -973,6 +975,7 @@ - switch (c->delivery_system) { - case SYS_DVBS: - case SYS_DVBS2: -+ case SYS_DVBS2X: - case SYS_TURBO: - c->modulation = QPSK; /* implied for DVB-S in legacy API */ - c->rolloff = ROLLOFF_35;/* implied for DVB-S */ -@@ -2091,6 +2094,7 @@ - rolloff = 135; - break; - case SYS_DVBS2: -+ case SYS_DVBS2X: - switch (c->rolloff) { - case ROLLOFF_20: - rolloff = 120; -@@ -2131,6 +2135,7 @@ - switch (c->delivery_system) { - case SYS_DVBS: - case SYS_DVBS2: -+ case SYS_DVBS2X: - case SYS_ISDBS: - case SYS_TURBO: - case SYS_DVBC_ANNEX_A: -diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h -index c56d77c..5aebaa9 100644 ---- a/include/uapi/linux/dvb/frontend.h -+++ b/include/uapi/linux/dvb/frontend.h -@@ -156,6 +156,24 @@ - FEC_3_5, - FEC_9_10, - FEC_2_5, -+ FEC_13_45=13, -+ FEC_9_20=14, -+ FEC_11_20=15, -+ FEC_23_36=16, -+ FEC_25_36=17, -+ FEC_13_18=18, -+ FEC_26_45=19, -+ FEC_28_45=20, -+ FEC_7_9=21, -+ FEC_77_90=22, -+ FEC_32_45=23, -+ FEC_11_15=24, -+ FEC_1_2_L=25, -+ FEC_8_15_L=26, -+ FEC_3_5_L=27, -+ FEC_2_3_L=28, -+ FEC_5_9_L=29, -+ FEC_26_45_L=30 - }; - - enum fe_modulation { -@@ -173,6 +191,7 @@ - APSK_32, - DQPSK, - QAM_4_NR, -+ APSK_8, - }; - - enum fe_transmit_mode { -@@ -342,6 +361,7 @@ - SYS_DVBT2, - SYS_TURBO, - SYS_DVBC_ANNEX_C, -+ SYS_DVBS2X = 21, - }; - - /* backward compatibility */ diff --git a/archive-patches/armbox/hd51/export_pmpoweroffprepare.patch b/archive-patches/armbox/hd51/export_pmpoweroffprepare.patch deleted file mode 100644 index f832e8f..0000000 --- a/archive-patches/armbox/hd51/export_pmpoweroffprepare.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/kernel/reboot.c b/kernel/reboot.c -index bd30a97..a6903bf 100644 ---- a/kernel/reboot.c -+++ b/kernel/reboot.c -@@ -49,6 +49,7 @@ - */ - - void (*pm_power_off_prepare)(void); -+EXPORT_SYMBOL(pm_power_off_prepare); - - /** - * emergency_restart - reboot the system diff --git a/archive-patches/armbox/hd51/reserve_dvb_adapter_0.patch b/archive-patches/armbox/hd51/reserve_dvb_adapter_0.patch deleted file mode 100644 index d42fd86..0000000 --- a/archive-patches/armbox/hd51/reserve_dvb_adapter_0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c -index 560450a..eb1a212 100644 ---- a/drivers/media/dvb-core/dvbdev.c -+++ b/drivers/media/dvb-core/dvbdev.c -@@ -789,7 +789,7 @@ static int dvbdev_check_free_adapter_num(int num) - - static int dvbdev_get_free_adapter_num (void) - { -- int num = 0; -+ int num = 1; - - while (num < DVB_MAX_ADAPTERS) { - if (dvbdev_check_free_adapter_num(num)) diff --git a/archive-patches/armbox/hd51/t230c2.patch b/archive-patches/armbox/hd51/t230c2.patch deleted file mode 100644 index 9e2df40..0000000 --- a/archive-patches/armbox/hd51/t230c2.patch +++ /dev/null @@ -1,323 +0,0 @@ ---- a/drivers/media/usb/dvb-usb/cxusb.c -+++ b/drivers/media/usb/dvb-usb/cxusb.c -@@ -1239,6 +1239,76 @@ static int cxusb_mygica_t230_frontend_attach(struct dvb_usb_adapter *adap) - return 0; - } - -+static int cxusb_mygica_t230c_frontend_attach(struct dvb_usb_adapter *adap) -+{ -+ struct dvb_usb_device *d = adap->dev; -+ struct cxusb_state *st = d->priv; -+ struct i2c_adapter *adapter; -+ struct i2c_client *client_demod; -+ struct i2c_client *client_tuner; -+ struct i2c_board_info info; -+ struct si2168_config si2168_config; -+ struct si2157_config si2157_config; -+ -+ /* Select required USB configuration */ -+ if (usb_set_interface(d->udev, 0, 0) < 0) -+ err("set interface failed"); -+ -+ /* Unblock all USB pipes */ -+ usb_clear_halt(d->udev, -+ usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); -+ usb_clear_halt(d->udev, -+ usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); -+ usb_clear_halt(d->udev, -+ usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); -+ -+ /* attach frontend */ -+ memset(&si2168_config, 0, sizeof(si2168_config)); -+ si2168_config.i2c_adapter = &adapter; -+ si2168_config.fe = &adap->fe_adap[0].fe; -+ si2168_config.ts_mode = SI2168_TS_PARALLEL; -+ si2168_config.ts_clock_inv = 1; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2168", I2C_NAME_SIZE); -+ info.addr = 0x64; -+ info.platform_data = &si2168_config; -+ request_module(info.type); -+ client_demod = i2c_new_device(&d->i2c_adap, &info); -+ if (client_demod == NULL || client_demod->dev.driver == NULL) -+ return -ENODEV; -+ -+ if (!try_module_get(client_demod->dev.driver->owner)) { -+ i2c_unregister_device(client_demod); -+ return -ENODEV; -+ } -+ -+ /* attach tuner */ -+ memset(&si2157_config, 0, sizeof(si2157_config)); -+ si2157_config.fe = adap->fe_adap[0].fe; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2141", I2C_NAME_SIZE); -+ info.addr = 0x60; -+ info.platform_data = &si2157_config; -+ request_module("si2157"); -+ client_tuner = i2c_new_device(adapter, &info); -+ if (client_tuner == NULL || client_tuner->dev.driver == NULL) { -+ module_put(client_demod->dev.driver->owner); -+ i2c_unregister_device(client_demod); -+ return -ENODEV; -+ } -+ if (!try_module_get(client_tuner->dev.driver->owner)) { -+ i2c_unregister_device(client_tuner); -+ module_put(client_demod->dev.driver->owner); -+ i2c_unregister_device(client_demod); -+ return -ENODEV; -+ } -+ -+ st->i2c_client_demod = client_demod; -+ st->i2c_client_tuner = client_tuner; -+ -+ return 0; -+} -+ - /* - * DViCO has shipped two devices with the same USB ID, but only one of them - * needs a firmware download. Check the device class details to see if they -@@ -1321,6 +1397,7 @@ static struct dvb_usb_device_properties cxusb_aver_a868r_properties; - static struct dvb_usb_device_properties cxusb_d680_dmb_properties; - static struct dvb_usb_device_properties cxusb_mygica_d689_properties; - static struct dvb_usb_device_properties cxusb_mygica_t230_properties; -+static struct dvb_usb_device_properties cxusb_mygica_t230c_properties; - - static int cxusb_probe(struct usb_interface *intf, - const struct usb_device_id *id) -@@ -1353,6 +1430,8 @@ static int cxusb_probe(struct usb_interface *intf, - THIS_MODULE, NULL, adapter_nr) || - 0 == dvb_usb_device_init(intf, &cxusb_mygica_t230_properties, - THIS_MODULE, NULL, adapter_nr) || -+ 0 == dvb_usb_device_init(intf, &cxusb_mygica_t230c_properties, -+ THIS_MODULE, NULL, adapter_nr) || - 0) - return 0; - -@@ -1538,6 +1611,8 @@ - CONEXANT_D680_DMB, - MYGICA_D689, - MYGICA_T230, -+ MYGICA_T230C, -+ MYGICA_T230C2, - NR__cxusb_table_index - }; - -@@ -1605,6 +1679,12 @@ - [MYGICA_T230] = { - USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230) - }, -+ [MYGICA_T230C] = { -+ USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230+1) -+ }, -+ [MYGICA_T230C2] = { -+ USB_DEVICE(0x0572, 0xc68a) -+ }, - {} /* Terminating entry */ - }; - MODULE_DEVICE_TABLE (usb, cxusb_table); -@@ -2181,6 +2264,66 @@ static struct dvb_usb_device_properties cxusb_mygica_t230_properties = { - } - }; - -+static struct dvb_usb_device_properties cxusb_mygica_t230c_properties = { -+ .caps = DVB_USB_IS_AN_I2C_ADAPTER, -+ -+ .usb_ctrl = CYPRESS_FX2, -+ -+ .size_of_priv = sizeof(struct cxusb_state), -+ -+ .num_adapters = 1, -+ .adapter = { -+ { -+ .num_frontends = 1, -+ .fe = {{ -+ .streaming_ctrl = cxusb_streaming_ctrl, -+ .frontend_attach = cxusb_mygica_t230c_frontend_attach, -+ -+ /* parameter for the MPEG2-data transfer */ -+ .stream = { -+ .type = USB_BULK, -+ .count = 5, -+ .endpoint = 0x02, -+ .u = { -+ .bulk = { -+ .buffersize = 8192, -+ } -+ } -+ }, -+ } }, -+ }, -+ }, -+ -+ .power_ctrl = cxusb_d680_dmb_power_ctrl, -+ -+ .i2c_algo = &cxusb_i2c_algo, -+ -+ .generic_bulk_ctrl_endpoint = 0x01, -+ -+#if 0 /* FIXME: crash dump kernel - dvb_usb_nec_rc_key_to_event */ -+ .rc.legacy = { -+ .rc_interval = 100, -+ .rc_map_table = rc_map_d680_dmb_table, -+ .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), -+ .rc_query = cxusb_d680_dmb_rc_query, -+ }, -+#endif -+ -+ .num_device_descs = 2, -+ .devices = { -+ { -+ "Mygica T230C DVB-T/T2/C", -+ { NULL }, -+ { &cxusb_table[MYGICA_T230C], NULL }, -+ }, -+ { -+ "Mygica T230C2 DVB-T/T2/C", -+ { NULL }, -+ { &cxusb_table[MYGICA_T230C2], NULL }, -+ }, -+ } -+}; -+ - static struct usb_driver cxusb_driver = { - .name = "dvb_usb_cxusb", - .probe = cxusb_probe, -diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c -index 57b250847cd3..e35b1faf0ddc 100644 ---- a/drivers/media/tuners/si2157.c -+++ b/drivers/media/tuners/si2157.c -@@ -106,6 +106,9 @@ static int si2157_init(struct dvb_frontend *fe) - if (dev->chiptype == SI2157_CHIPTYPE_SI2146) { - memcpy(cmd.args, "\xc0\x05\x01\x00\x00\x0b\x00\x00\x01", 9); - cmd.wlen = 9; -+ } else if (dev->chiptype == SI2157_CHIPTYPE_SI2141) { -+ memcpy(cmd.args, "\xc0\x00\x0d\x0e\x00\x01\x01\x01\x01\x03", 10); -+ cmd.wlen = 10; - } else { - memcpy(cmd.args, "\xc0\x00\x0c\x00\x00\x01\x01\x01\x01\x01\x01\x02\x00\x00\x01", 15); - cmd.wlen = 15; -@@ -115,6 +118,15 @@ static int si2157_init(struct dvb_frontend *fe) - if (ret) - goto err; - -+ /* Si2141 needs a second command before it answers the revision query */ -+ if (dev->chiptype == SI2157_CHIPTYPE_SI2141) { -+ memcpy(cmd.args, "\xc0\x08\x01\x02\x00\x00\x01", 7); -+ cmd.wlen = 7; -+ ret = si2157_cmd_execute(client, &cmd); -+ if (ret) -+ goto err; -+ } -+ - /* query chip revision */ - memcpy(cmd.args, "\x02", 1); - cmd.wlen = 1; -@@ -131,12 +143,16 @@ static int si2157_init(struct dvb_frontend *fe) - #define SI2157_A30 ('A' << 24 | 57 << 16 | '3' << 8 | '0' << 0) - #define SI2147_A30 ('A' << 24 | 47 << 16 | '3' << 8 | '0' << 0) - #define SI2146_A10 ('A' << 24 | 46 << 16 | '1' << 8 | '0' << 0) -+ #define SI2141_A10 ('A' << 24 | 41 << 16 | '1' << 8 | '0' << 0) - - switch (chip_id) { - case SI2158_A20: - case SI2148_A20: - fw_name = SI2158_A20_FIRMWARE; - break; -+ case SI2141_A10: -+ fw_name = SI2141_A10_FIRMWARE; -+ break; - case SI2157_A30: - case SI2147_A30: - case SI2146_A10: -@@ -371,7 +387,7 @@ static int si2157_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) - - static const struct dvb_tuner_ops si2157_ops = { - .info = { -- .name = "Silicon Labs Si2146/2147/2148/2157/2158", -+ .name = "Silicon Labs Si2141/Si2146/2147/2148/2157/2158", - .frequency_min = 42000000, - .frequency_max = 870000000, - }, -@@ -471,6 +487,7 @@ static int si2157_probe(struct i2c_client *client, - #endif - - dev_info(&client->dev, "Silicon Labs %s successfully attached\n", -+ dev->chiptype == SI2157_CHIPTYPE_SI2141 ? "Si2141" : - dev->chiptype == SI2157_CHIPTYPE_SI2146 ? - "Si2146" : "Si2147/2148/2157/2158"); - -@@ -508,6 +525,7 @@ static int si2157_remove(struct i2c_client *client) - static const struct i2c_device_id si2157_id_table[] = { - {"si2157", SI2157_CHIPTYPE_SI2157}, - {"si2146", SI2157_CHIPTYPE_SI2146}, -+ {"si2141", SI2157_CHIPTYPE_SI2141}, - {} - }; - MODULE_DEVICE_TABLE(i2c, si2157_id_table); -@@ -524,7 +542,8 @@ static struct i2c_driver si2157_driver = { - - module_i2c_driver(si2157_driver); - --MODULE_DESCRIPTION("Silicon Labs Si2146/2147/2148/2157/2158 silicon tuner driver"); -+MODULE_DESCRIPTION("Silicon Labs Si2141/Si2146/2147/2148/2157/2158 silicon tuner driver"); - MODULE_AUTHOR("Antti Palosaari "); - MODULE_LICENSE("GPL"); - MODULE_FIRMWARE(SI2158_A20_FIRMWARE); -+MODULE_FIRMWARE(SI2141_A10_FIRMWARE); -diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h -index d6b2c7b44053..e6436f74abaa 100644 ---- a/drivers/media/tuners/si2157_priv.h -+++ b/drivers/media/tuners/si2157_priv.h -@@ -42,6 +42,7 @@ struct si2157_dev { - - #define SI2157_CHIPTYPE_SI2157 0 - #define SI2157_CHIPTYPE_SI2146 1 -+#define SI2157_CHIPTYPE_SI2141 2 - - /* firmware command struct */ - #define SI2157_ARGLEN 30 -@@ -52,5 +53,6 @@ struct si2157_cmd { - }; - - #define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-01.fw" -+#define SI2141_A10_FIRMWARE "dvb-tuner-si2141-a10-01.fw" - - #endif ---- a/drivers/media/dvb-frontends/si2168.c -+++ b/drivers/media/dvb-frontends/si2168.c -@@ -674,6 +674,9 @@ static int si2168_probe(struct i2c_client *client, - case SI2168_CHIP_ID_B40: - dev->firmware_name = SI2168_B40_FIRMWARE; - break; -+ case SI2168_CHIP_ID_D60: -+ dev->firmware_name = SI2168_D60_FIRMWARE; -+ break; - default: - dev_dbg(&client->dev, "unknown chip version Si21%d-%c%c%c\n", - cmd.args[2], cmd.args[1], cmd.args[3], cmd.args[4]); -@@ -761,3 +764,4 @@ MODULE_LICENSE("GPL"); - MODULE_FIRMWARE(SI2168_A20_FIRMWARE); - MODULE_FIRMWARE(SI2168_A30_FIRMWARE); - MODULE_FIRMWARE(SI2168_B40_FIRMWARE); -+MODULE_FIRMWARE(SI2168_D60_FIRMWARE); -diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h -index 7843ccb448a0..4baa95b7d648 100644 ---- a/drivers/media/dvb-frontends/si2168_priv.h -+++ b/drivers/media/dvb-frontends/si2168_priv.h -@@ -25,6 +25,7 @@ - #define SI2168_A20_FIRMWARE "dvb-demod-si2168-a20-01.fw" - #define SI2168_A30_FIRMWARE "dvb-demod-si2168-a30-01.fw" - #define SI2168_B40_FIRMWARE "dvb-demod-si2168-b40-01.fw" -+#define SI2168_D60_FIRMWARE "dvb-demod-si2168-d60-01.fw" - #define SI2168_B40_FIRMWARE_FALLBACK "dvb-demod-si2168-02.fw" - - /* state struct */ -@@ -37,6 +38,7 @@ struct si2168_dev { - #define SI2168_CHIP_ID_A20 ('A' << 24 | 68 << 16 | '2' << 8 | '0' << 0) - #define SI2168_CHIP_ID_A30 ('A' << 24 | 68 << 16 | '3' << 8 | '0' << 0) - #define SI2168_CHIP_ID_B40 ('B' << 24 | 68 << 16 | '4' << 8 | '0' << 0) -+ #define SI2168_CHIP_ID_D60 ('D' << 24 | 68 << 16 | '6' << 8 | '0' << 0) - unsigned int chip_id; - unsigned int version; - const char *firmware_name; diff --git a/archive-patches/armbox/hd60/0001-remote.patch b/archive-patches/armbox/hd60/0001-remote.patch deleted file mode 100644 index f4b587c..0000000 --- a/archive-patches/armbox/hd60/0001-remote.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - drivers/hisilicon/ir/Kconfig | 29 ----------------------------- - 1 file changed, 29 deletions(-) - -diff --git a/drivers/hisilicon/ir/Kconfig b/drivers/hisilicon/ir/Kconfig -index 57e1fe52..45976f03 100644 ---- a/drivers/hisilicon/ir/Kconfig -+++ b/drivers/hisilicon/ir/Kconfig -@@ -12,35 +12,6 @@ config HISI_IR - ---help--- - Say Y here if you want to use hisilicon remote control. - --if RC_DECODERS --config IR_NEC_2HDR_40BIT_DECODER -- tristate "Enable IR raw decoder for the NEC 2 head 40bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --config IR_NEC_FULL_40BIT_DECODER -- tristate "Enable IR raw decoder for the NEC full 40bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --config IR_NEC_FULL_48BIT_DECODER -- tristate "Enable IR raw decoder for the NEC full 48bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --endif #RC_DECODERS - - if HISI_IR - menu "Hisilicon IR key map driver" --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/0002-log2-give-up-on-gcc-constant-optimizations.patch b/archive-patches/armbox/hd60/0002-log2-give-up-on-gcc-constant-optimizations.patch deleted file mode 100644 index f6b7b52..0000000 --- a/archive-patches/armbox/hd60/0002-log2-give-up-on-gcc-constant-optimizations.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 05a1328f10d503e2b3156226cef36b0d0c4df7b2 Mon Sep 17 00:00:00 2001 -From: Nicker -Date: Mon, 23 Jul 2018 14:53:12 +0200 -Subject: [PATCH 2/2] log2 give up on gcc constant optimizations - - -diff --git a/include/linux/log2.h b/include/linux/log2.h -index fd7ff3d9..f38fae23 100644 ---- a/include/linux/log2.h -+++ b/include/linux/log2.h -@@ -15,12 +15,6 @@ - #include - #include - --/* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- - /* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented -@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ -diff --git a/tools/include/linux/log2.h b/tools/include/linux/log2.h -index 41446668..d5677d39 100644 ---- a/tools/include/linux/log2.h -+++ b/tools/include/linux/log2.h -@@ -12,12 +12,6 @@ - #ifndef _TOOLS_LINUX_LOG2_H - #define _TOOLS_LINUX_LOG2_H - --/* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- - /* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented -@@ -78,7 +72,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -141,10 +135,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/0003-dont-mark-register-as-const.patch b/archive-patches/armbox/hd60/0003-dont-mark-register-as-const.patch deleted file mode 100644 index 64398f5..0000000 --- a/archive-patches/armbox/hd60/0003-dont-mark-register-as-const.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 94991ba321b4b112656998e586b46107afaa50d6 Mon Sep 17 00:00:00 2001 -From: Nicker -Date: Mon, 23 Jul 2018 15:25:12 +0200 -Subject: [PATCH 3/3] dont mark register as const - - -diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 7fb59199..7665bd2f 100644 ---- a/arch/arm/include/asm/uaccess.h -+++ b/arch/arm/include/asm/uaccess.h -@@ -251,7 +251,7 @@ extern int __put_user_8(void *, unsigned long long); - ({ \ - unsigned long __limit = current_thread_info()->addr_limit - 1; \ - const typeof(*(p)) __user *__tmp_p = (p); \ -- register const typeof(*(p)) __r2 asm("r2") = (x); \ -+ register typeof(*(p)) __r2 asm("r2") = (x); \ - register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \ - register unsigned long __l asm("r1") = __limit; \ - register int __e asm("r0"); \ --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/0004-linux-fix-buffer-size-warning-error.patch b/archive-patches/armbox/hd60/0004-linux-fix-buffer-size-warning-error.patch deleted file mode 100644 index ba38a35..0000000 --- a/archive-patches/armbox/hd60/0004-linux-fix-buffer-size-warning-error.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drivers/hisilicon/atags/tag-chiptrim.c -+++ b/drivers/hisilicon/atags/tag-chiptrim.c -@@ -59,7 +59,7 @@ static int __init parse_chiptrim(const struct tag *tag, void *fdt) - int ix; - int ret; - int node; -- char buf[12]; -+ char buf[20]; - - if (tag->hdr.size <= (sizeof(struct tag_header) >> 2)) { - pr_err("%s: bad tag format.\n", __func__); ---- a/drivers/hisilicon/atags/tag-net.c 2020-03-25 11:27:19.138225245 +0000 -+++ b/drivers/hisilicon/atags/tag-net.c 2020-03-25 11:27:02.498266476 +0000 -@@ -91,7 +91,7 @@ - { - int err; - int node, index = 0; -- char path[16]; -+ char path[20]; - char phy_intf[16]; - char *str, *nxt; - int count; --- -2.17.1 diff --git a/archive-patches/armbox/hd60/0005-xbox-one-tuner-4.4.patch b/archive-patches/armbox/hd60/0005-xbox-one-tuner-4.4.patch deleted file mode 100644 index 253f0d5..0000000 --- a/archive-patches/armbox/hd60/0005-xbox-one-tuner-4.4.patch +++ /dev/null @@ -1,238 +0,0 @@ ---- - drivers/media/dvb-core/dvb-usb-ids.h | 2 + - drivers/media/usb/dvb-usb/Kconfig | 2 + - drivers/media/usb/dvb-usb/dib0700.h | 2 + - drivers/media/usb/dvb-usb/dib0700_core.c | 25 ++++- - drivers/media/usb/dvb-usb/dib0700_devices.c | 105 ++++++++++++++++++++ - 5 files changed, 135 insertions(+), 1 deletion(-) - -diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h -index 0a46580b..512275c7 100644 ---- a/drivers/media/dvb-core/dvb-usb-ids.h -+++ b/drivers/media/dvb-core/dvb-usb-ids.h -@@ -70,6 +70,7 @@ - #define USB_VID_EVOLUTEPC 0x1e59 - #define USB_VID_AZUREWAVE 0x13d3 - #define USB_VID_TECHNISAT 0x14f7 -+#define USB_VID_MICROSOFT 0x045e - - /* Product IDs */ - #define USB_PID_ADSTECH_USB2_COLD 0xa333 -@@ -389,4 +390,5 @@ - #define USB_PID_PCTV_2002E_SE 0x025d - #define USB_PID_SVEON_STV27 0xd3af - #define USB_PID_TURBOX_DTT_2000 0xd3a4 -+#define USB_PID_XBOX_ONE_TUNER 0x02d5 - #endif -diff --git a/drivers/media/usb/dvb-usb/Kconfig b/drivers/media/usb/dvb-usb/Kconfig -index 128eee61..d8e3106d 100644 ---- a/drivers/media/usb/dvb-usb/Kconfig -+++ b/drivers/media/usb/dvb-usb/Kconfig -@@ -75,6 +75,7 @@ config DVB_USB_DIB0700 - select DVB_DIB3000MC if MEDIA_SUBDRV_AUTOSELECT - select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT - select DVB_LGDT3305 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_MN88472 if MEDIA_SUBDRV_AUTOSELECT - select DVB_TUNER_DIB0070 if MEDIA_SUBDRV_AUTOSELECT - select DVB_TUNER_DIB0090 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT -@@ -83,6 +84,7 @@ config DVB_USB_DIB0700 - select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_XC4000 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT -+ select MEDIA_TUNER_TDA18250 if MEDIA_SUBDRV_AUTOSELECT - help - Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The - USB bridge is also present in devices having the DiB7700 DVB-T-USB -diff --git a/drivers/media/usb/dvb-usb/dib0700.h b/drivers/media/usb/dvb-usb/dib0700.h -index 8fd8f5b4..5f291284 100644 ---- a/drivers/media/usb/dvb-usb/dib0700.h -+++ b/drivers/media/usb/dvb-usb/dib0700.h -@@ -51,6 +51,8 @@ struct dib0700_state { - int (*read_status)(struct dvb_frontend *, enum fe_status *); - int (*sleep)(struct dvb_frontend* fe); - u8 buf[255]; -+ struct i2c_client *i2c_client_demod; -+ struct i2c_client *i2c_client_tuner; - }; - - extern int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion, -diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c -index 49dd3ea2..e4f3793a 100644 ---- a/drivers/media/usb/dvb-usb/dib0700_core.c -+++ b/drivers/media/usb/dvb-usb/dib0700_core.c -@@ -875,10 +875,33 @@ static int dib0700_probe(struct usb_interface *intf, - return -ENODEV; - } - -+static void dib0700_disconnect(struct usb_interface *intf) -+{ -+ struct dvb_usb_device *d = usb_get_intfdata(intf); -+ struct dib0700_state *st = d->priv; -+ struct i2c_client *client; -+ -+ /* remove I2C client for tuner */ -+ client = st->i2c_client_tuner; -+ if (client) { -+ module_put(client->dev.driver->owner); -+ i2c_unregister_device(client); -+ } -+ -+ /* remove I2C client for demodulator */ -+ client = st->i2c_client_demod; -+ if (client) { -+ module_put(client->dev.driver->owner); -+ i2c_unregister_device(client); -+ } -+ -+ dvb_usb_device_exit(intf); -+} -+ - static struct usb_driver dib0700_driver = { - .name = "dvb_usb_dib0700", - .probe = dib0700_probe, -- .disconnect = dvb_usb_device_exit, -+ .disconnect = dib0700_disconnect, - .id_table = dib0700_usb_id_table, - }; - -diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c -index e1316c7b..2b6c9d3c 100644 ---- a/drivers/media/usb/dvb-usb/dib0700_devices.c -+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c -@@ -23,6 +23,8 @@ - #include "dib0090.h" - #include "lgdt3305.h" - #include "mxl5007t.h" -+#include "mn88472.h" -+#include "tda18250.h" - - static int force_lna_activation; - module_param(force_lna_activation, int, 0644); -@@ -3714,6 +3716,89 @@ static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) - &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; - } - -+static int xbox_one_attach(struct dvb_usb_adapter *adap) -+{ -+ struct dib0700_state *st = adap->dev->priv; -+ struct i2c_client *client_demod, *client_tuner; -+ struct dvb_usb_device *d = adap->dev; -+ struct mn88472_config mn88472_config = { }; -+ struct tda18250_config tda18250_config; -+ struct i2c_board_info info; -+ -+ st->fw_use_new_i2c_api = 1; -+ st->disable_streaming_master_mode = 1; -+ -+ /* fe power enable */ -+ dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); -+ msleep(30); -+ -+ /* demod reset */ -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); -+ msleep(30); -+ -+ /* attach demod */ -+ mn88472_config.fe = &adap->fe_adap[0].fe; -+ mn88472_config.i2c_wr_max = 22; -+ mn88472_config.xtal = 20500000; -+ mn88472_config.ts_mode = PARALLEL_TS_MODE; -+ mn88472_config.ts_clock = FIXED_TS_CLOCK; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "mn88472", I2C_NAME_SIZE); -+ info.addr = 0x18; -+ info.platform_data = &mn88472_config; -+ request_module(info.type); -+ client_demod = i2c_new_device(&d->i2c_adap, &info); -+ if (client_demod == NULL || client_demod->dev.driver == NULL) -+ goto fail_demod_device; -+ if (!try_module_get(client_demod->dev.driver->owner)) -+ goto fail_demod_module; -+ -+ st->i2c_client_demod = client_demod; -+ -+ adap->fe_adap[0].fe = mn88472_config.get_dvb_frontend(client_demod); -+ -+ /* attach tuner */ -+ memset(&tda18250_config, 0, sizeof(tda18250_config)); -+ tda18250_config.if_dvbt_6 = 3950; -+ tda18250_config.if_dvbt_7 = 4450; -+ tda18250_config.if_dvbt_8 = 4950; -+ tda18250_config.if_dvbc_6 = 4950; -+ tda18250_config.if_dvbc_8 = 4950; -+ tda18250_config.if_atsc = 4079; -+ tda18250_config.loopthrough = true; -+ tda18250_config.xtal_freq = TDA18250_XTAL_FREQ_27MHZ; -+ tda18250_config.fe = adap->fe_adap[0].fe; -+ -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "tda18250", I2C_NAME_SIZE); -+ info.addr = 0x60; -+ info.platform_data = &tda18250_config; -+ -+ request_module(info.type); -+ client_tuner = i2c_new_device(&adap->dev->i2c_adap, &info); -+ if (client_tuner == NULL || client_tuner->dev.driver == NULL) -+ goto fail_tuner_device; -+ if (!try_module_get(client_tuner->dev.driver->owner)) -+ goto fail_tuner_module; -+ -+ st->i2c_client_tuner = client_tuner; -+ return 0; -+ -+fail_tuner_module: -+ i2c_unregister_device(client_tuner); -+fail_tuner_device: -+ module_put(client_demod->dev.driver->owner); -+fail_demod_module: -+ i2c_unregister_device(client_demod); -+fail_demod_device: -+ return -ENODEV; -+} - - /* DVB-USB and USB stuff follows */ - struct usb_device_id dib0700_usb_id_table[] = { -@@ -3803,6 +3888,7 @@ struct usb_device_id dib0700_usb_id_table[] = { - /* 80 */{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT_2) }, - { USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_2002E) }, - { USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_2002E_SE) }, -+ { USB_DEVICE(USB_VID_MICROSOFT, USB_PID_XBOX_ONE_TUNER) }, - { 0 } /* Terminating entry */ - }; - MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); -@@ -4968,6 +5054,25 @@ struct dvb_usb_device_properties dib0700_devices[] = { - RC_BIT_NEC, - .change_protocol = dib0700_change_protocol, - }, -+ }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, -+ .num_adapters = 1, -+ .adapter = { -+ { -+ .num_frontends = 1, -+ .fe = {{ -+ .frontend_attach = xbox_one_attach, -+ -+ DIB0700_DEFAULT_STREAMING_CONFIG(0x82), -+ } }, -+ }, -+ }, -+ .num_device_descs = 1, -+ .devices = { -+ { "Microsoft Xbox One Digital TV Tuner", -+ { &dib0700_usb_id_table[83], NULL }, -+ { NULL }, -+ }, -+ }, - }, - }; - --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch b/archive-patches/armbox/hd60/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch deleted file mode 100644 index 9ac432c..0000000 --- a/archive-patches/armbox/hd60/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch +++ /dev/null @@ -1,1192 +0,0 @@ -From f724afe58782ccbcb2f0aaea9cca204b35859904 Mon Sep 17 00:00:00 2001 -From: Olli Salonen -Date: Thu, 23 Nov 2017 03:24:45 -0500 -Subject: [PATCH 2/4] media: tda18250: support for new silicon tuner - -NXP TDA18250 silicon tuner driver. - -Version 4 includes some checkpatch fixes. - -Signed-off-by: Olli Salonen -Signed-off-by: Mauro Carvalho Chehab ---- - MAINTAINERS | 9 + - drivers/media/tuners/Kconfig | 7 + - drivers/media/tuners/Makefile | 1 + - drivers/media/tuners/tda18250.c | 902 +++++++++++++++++++++++++++ - drivers/media/tuners/tda18250.h | 51 ++ - drivers/media/tuners/tda18250_priv.h | 145 +++++ - 6 files changed, 1115 insertions(+) - create mode 100644 drivers/media/tuners/tda18250.c - create mode 100644 drivers/media/tuners/tda18250.h - create mode 100644 drivers/media/tuners/tda18250_priv.h - -diff --git a/MAINTAINERS b/MAINTAINERS -index 4764180d..9a0a8f15 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -10450,6 +10450,15 @@ T: git git://linuxtv.org/anttip/media_tree.git - S: Maintained - F: drivers/media/tuners/tda18218* - -+TDA18250 MEDIA DRIVER -+M: Olli Salonen -+L: linux-media@vger.kernel.org -+W: https://linuxtv.org -+Q: http://patchwork.linuxtv.org/project/linux-media/list/ -+T: git git://linuxtv.org/media_tree.git -+S: Maintained -+F: drivers/media/tuners/tda18250* -+ - TDA18271 MEDIA DRIVER - M: Michael Krufky - L: linux-media@vger.kernel.org -diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig -index 05998f02..6687514d 100644 ---- a/drivers/media/tuners/Kconfig -+++ b/drivers/media/tuners/Kconfig -@@ -26,6 +26,13 @@ config MEDIA_TUNER_SIMPLE - help - Say Y here to include support for various simple tuners. - -+config MEDIA_TUNER_TDA18250 -+ tristate "NXP TDA18250 silicon tuner" -+ depends on MEDIA_SUPPORT && I2C -+ default m if !MEDIA_SUBDRV_AUTOSELECT -+ help -+ Say Y here to include support for TDA18250 tuner. -+ - config MEDIA_TUNER_TDA8290 - tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo" - depends on MEDIA_SUPPORT && I2C -diff --git a/drivers/media/tuners/Makefile b/drivers/media/tuners/Makefile -index 06a9ab65..4b9444be 100644 ---- a/drivers/media/tuners/Makefile -+++ b/drivers/media/tuners/Makefile -@@ -41,6 +41,7 @@ obj-$(CONFIG_MEDIA_TUNER_R820T) += r820t.o - obj-$(CONFIG_MEDIA_TUNER_MXL301RF) += mxl301rf.o - obj-$(CONFIG_MEDIA_TUNER_QM1D1C0042) += qm1d1c0042.o - obj-$(CONFIG_MEDIA_TUNER_M88RS6000T) += m88rs6000t.o -+obj-$(CONFIG_MEDIA_TUNER_TDA18250) += tda18250.o - - ccflags-y += -I$(srctree)/drivers/media/dvb-core - ccflags-y += -I$(srctree)/drivers/media/dvb-frontends -diff --git a/drivers/media/tuners/tda18250.c b/drivers/media/tuners/tda18250.c -new file mode 100644 -index 00000000..20d12b06 ---- /dev/null -+++ b/drivers/media/tuners/tda18250.c -@@ -0,0 +1,902 @@ -+/* -+ * NXP TDA18250 silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#include "tda18250_priv.h" -+#include -+ -+static const struct dvb_tuner_ops tda18250_ops; -+ -+static int tda18250_power_control(struct dvb_frontend *fe, -+ unsigned int power_state) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ unsigned int utmp; -+ -+ dev_dbg(&client->dev, "power state: %d", power_state); -+ -+ switch (power_state) { -+ case TDA18250_POWER_NORMAL: -+ ret = regmap_write_bits(dev->regmap, R06_POWER2, 0x07, 0x00); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R25_REF, 0xc0, 0xc0); -+ if (ret) -+ goto err; -+ break; -+ case TDA18250_POWER_STANDBY: -+ if (dev->loopthrough) { -+ ret = regmap_write_bits(dev->regmap, -+ R25_REF, 0xc0, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R06_POWER2, 0x07, 0x02); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R10_LT1, 0x80, 0x00); -+ if (ret) -+ goto err; -+ } else { -+ ret = regmap_write_bits(dev->regmap, -+ R25_REF, 0xc0, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R06_POWER2, 0x07, 0x01); -+ if (ret) -+ goto err; -+ ret = regmap_read(dev->regmap, -+ R0D_AGC12, &utmp); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R0D_AGC12, 0x03, 0x03); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R10_LT1, 0x80, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R0D_AGC12, 0x03, utmp & 0x03); -+ if (ret) -+ goto err; -+ } -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_wait_for_irq(struct dvb_frontend *fe, -+ int maxwait, int step, u8 irq) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ unsigned long timeout; -+ bool triggered; -+ unsigned int utmp; -+ -+ triggered = false; -+ timeout = jiffies + msecs_to_jiffies(maxwait); -+ while (!time_after(jiffies, timeout)) { -+ // check for the IRQ -+ ret = regmap_read(dev->regmap, R08_IRQ1, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & irq) == irq) { -+ triggered = true; -+ break; -+ } -+ msleep(step); -+ } -+ -+ dev_dbg(&client->dev, "waited IRQ (0x%02x) %d ms, triggered: %s", irq, -+ jiffies_to_msecs(jiffies) - -+ (jiffies_to_msecs(timeout) - maxwait), -+ triggered ? "true" : "false"); -+ -+ if (!triggered) -+ return -ETIMEDOUT; -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_init(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret, i; -+ -+ /* default values for various regs */ -+ static const u8 init_regs[][2] = { -+ { R0C_AGC11, 0xc7 }, -+ { R0D_AGC12, 0x5d }, -+ { R0E_AGC13, 0x40 }, -+ { R0F_AGC14, 0x0e }, -+ { R10_LT1, 0x47 }, -+ { R11_LT2, 0x4e }, -+ { R12_AGC21, 0x26 }, -+ { R13_AGC22, 0x60 }, -+ { R18_AGC32, 0x37 }, -+ { R19_AGC33, 0x09 }, -+ { R1A_AGCK, 0x00 }, -+ { R1E_WI_FI, 0x29 }, -+ { R1F_RF_BPF, 0x06 }, -+ { R20_IR_MIX, 0xc6 }, -+ { R21_IF_AGC, 0x00 }, -+ { R2C_PS1, 0x75 }, -+ { R2D_PS2, 0x06 }, -+ { R2E_PS3, 0x07 }, -+ { R30_RSSI2, 0x0e }, -+ { R31_IRQ_CTRL, 0x00 }, -+ { R39_SD5, 0x00 }, -+ { R3B_REGU, 0x55 }, -+ { R3C_RCCAL1, 0xa7 }, -+ { R3F_IRCAL2, 0x85 }, -+ { R40_IRCAL3, 0x87 }, -+ { R41_IRCAL4, 0xc0 }, -+ { R43_PD1, 0x40 }, -+ { R44_PD2, 0xc0 }, -+ { R46_CPUMP, 0x0c }, -+ { R47_LNAPOL, 0x64 }, -+ { R4B_XTALOSC1, 0x30 }, -+ { R59_AGC2_UP2, 0x05 }, -+ { R5B_AGC_AUTO, 0x07 }, -+ { R5C_AGC_DEBUG, 0x00 }, -+ }; -+ -+ /* crystal related regs depend on frequency */ -+ static const u8 xtal_regs[][5] = { -+ /* reg: 4d 4e 4f 50 51 */ -+ [TDA18250_XTAL_FREQ_16MHZ] = { 0x3e, 0x80, 0x50, 0x00, 0x20 }, -+ [TDA18250_XTAL_FREQ_24MHZ] = { 0x5d, 0xc0, 0xec, 0x00, 0x18 }, -+ [TDA18250_XTAL_FREQ_25MHZ] = { 0x61, 0xa8, 0xec, 0x80, 0x19 }, -+ [TDA18250_XTAL_FREQ_27MHZ] = { 0x69, 0x78, 0x8d, 0x80, 0x1b }, -+ [TDA18250_XTAL_FREQ_30MHZ] = { 0x75, 0x30, 0x8f, 0x00, 0x1e }, -+ }; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ ret = tda18250_power_control(fe, TDA18250_POWER_NORMAL); -+ if (ret) -+ goto err; -+ -+ msleep(20); -+ -+ if (dev->warm) -+ goto warm; -+ -+ /* set initial register values */ -+ for (i = 0; i < ARRAY_SIZE(init_regs); i++) { -+ ret = regmap_write(dev->regmap, init_regs[i][0], -+ init_regs[i][1]); -+ if (ret) -+ goto err; -+ } -+ -+ /* set xtal related regs */ -+ ret = regmap_bulk_write(dev->regmap, R4D_XTALFLX1, -+ xtal_regs[dev->xtal_freq], 5); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R10_LT1, 0x80, -+ dev->loopthrough ? 0x00 : 0x80); -+ if (ret) -+ goto err; -+ -+ /* clear IRQ */ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_HW_INIT); -+ if (ret) -+ goto err; -+ -+ /* start HW init */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x70); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_HW_INIT); -+ if (ret) -+ goto err; -+ -+ /* tuner calibration */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x02); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_CAL); -+ if (ret) -+ goto err; -+ -+ dev->warm = true; -+ -+warm: -+ /* power up LNA */ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x80, 0x00); -+ if (ret) -+ goto err; -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_set_agc(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ u8 utmp, utmp2; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ ret = regmap_write_bits(dev->regmap, R1F_RF_BPF, 0x87, 0x06); -+ if (ret) -+ goto err; -+ -+ utmp = ((c->frequency < 100000000) && -+ ((c->delivery_system == SYS_DVBC_ANNEX_A) || -+ (c->delivery_system == SYS_DVBC_ANNEX_C)) && -+ (c->bandwidth_hz == 6000000)) ? 0x80 : 0x00; -+ ret = regmap_write(dev->regmap, R5A_H3H5, utmp); -+ if (ret) -+ goto err; -+ -+ /* AGC1 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 4; -+ break; -+ default: /* DVB-C/QAM */ -+ switch (c->bandwidth_hz) { -+ case 6000000: -+ utmp = (c->frequency < 800000000) ? 6 : 4; -+ break; -+ default: /* 7.935 and 8 MHz */ -+ utmp = (c->frequency < 100000000) ? 2 : 3; -+ break; -+ } -+ break; -+ } -+ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x07, utmp); -+ if (ret) -+ goto err; -+ -+ /* AGC2 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = (c->frequency < 320000000) ? 20 : 16; -+ utmp2 = (c->frequency < 320000000) ? 22 : 18; -+ break; -+ default: /* DVB-C/QAM */ -+ switch (c->bandwidth_hz) { -+ case 6000000: -+ if (c->frequency < 600000000) { -+ utmp = 18; -+ utmp2 = 22; -+ } else if (c->frequency < 800000000) { -+ utmp = 16; -+ utmp2 = 20; -+ } else { -+ utmp = 14; -+ utmp2 = 16; -+ } -+ break; -+ default: /* 7.935 and 8 MHz */ -+ utmp = (c->frequency < 320000000) ? 16 : 18; -+ utmp2 = (c->frequency < 320000000) ? 18 : 20; -+ break; -+ } -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R58_AGC2_UP1, 0x1f, utmp2+8); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R13_AGC22, 0x1f, utmp); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x1f, utmp2); -+ if (ret) -+ goto err; -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 98; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 90; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R16_AGC25, 0xf8, utmp); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R12_AGC21, 0x60, -+ (c->frequency > 800000000) ? 0x40 : 0x20); -+ if (ret) -+ goto err; -+ -+ /* AGC3 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = (c->frequency < 320000000) ? 5 : 7; -+ utmp2 = (c->frequency < 320000000) ? 10 : 12; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 7; -+ utmp2 = 12; -+ break; -+ } -+ ret = regmap_write(dev->regmap, R17_AGC31, (utmp << 4) | utmp2); -+ if (ret) -+ goto err; -+ -+ /* S2D */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 8000000) -+ utmp = 0x04; -+ else -+ utmp = (c->frequency < 320000000) ? 0x04 : 0x02; -+ break; -+ default: /* DVB-C/QAM */ -+ if (c->bandwidth_hz == 6000000) -+ utmp = ((c->frequency > 172544000) && -+ (c->frequency < 320000000)) ? 0x04 : 0x02; -+ else /* 7.935 and 8 MHz */ -+ utmp = ((c->frequency > 320000000) && -+ (c->frequency < 600000000)) ? 0x02 : 0x04; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R20_IR_MIX, 0x06, utmp); -+ if (ret) -+ goto err; -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 0; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = (c->frequency < 600000000) ? 0 : 3; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R16_AGC25, 0x03, utmp); -+ if (ret) -+ goto err; -+ -+ utmp = 0x09; -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 8000000) -+ utmp = 0x0c; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 0x0c; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R0F_AGC14, 0x3f, utmp); -+ if (ret) -+ goto err; -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_pll_calc(struct dvb_frontend *fe, u8 *rdiv, -+ u8 *ndiv, u8 *icp) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ unsigned int uval, exp, lopd, scale; -+ unsigned long fvco; -+ -+ ret = regmap_read(dev->regmap, R34_MD1, &uval); -+ if (ret) -+ goto err; -+ -+ exp = (uval & 0x70) >> 4; -+ if (exp > 5) -+ exp = 0; -+ lopd = 1 << (exp - 1); -+ scale = uval & 0x0f; -+ fvco = lopd * scale * ((c->frequency / 1000) + dev->if_frequency); -+ -+ switch (dev->xtal_freq) { -+ case TDA18250_XTAL_FREQ_16MHZ: -+ *rdiv = 1; -+ *ndiv = 0; -+ *icp = (fvco < 6622000) ? 0x05 : 0x02; -+ break; -+ case TDA18250_XTAL_FREQ_24MHZ: -+ case TDA18250_XTAL_FREQ_25MHZ: -+ *rdiv = 3; -+ *ndiv = 1; -+ *icp = (fvco < 6622000) ? 0x05 : 0x02; -+ break; -+ case TDA18250_XTAL_FREQ_27MHZ: -+ if (fvco < 6643000) { -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = 0x05; -+ } else if (fvco < 6811000) { -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = 0x06; -+ } else { -+ *rdiv = 3; -+ *ndiv = 1; -+ *icp = 0x02; -+ } -+ break; -+ case TDA18250_XTAL_FREQ_30MHZ: -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = (fvco < 6811000) ? 0x05 : 0x02; -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ dev_dbg(&client->dev, -+ "lopd=%d scale=%u fvco=%lu, rdiv=%d ndiv=%d icp=%d", -+ lopd, scale, fvco, *rdiv, *ndiv, *icp); -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_set_params(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ u32 if_khz; -+ int ret; -+ unsigned int i, j; -+ u8 utmp; -+ u8 buf[3]; -+ -+ #define REG 0 -+ #define MASK 1 -+ #define DVBT_6 2 -+ #define DVBT_7 3 -+ #define DVBT_8 4 -+ #define DVBC_6 5 -+ #define DVBC_8 6 -+ #define ATSC 7 -+ -+ static const u8 delsys_params[][16] = { -+ [REG] = { 0x22, 0x23, 0x24, 0x21, 0x0d, 0x0c, 0x0f, 0x14, -+ 0x0e, 0x12, 0x58, 0x59, 0x1a, 0x19, 0x1e, 0x30 }, -+ [MASK] = { 0x77, 0xff, 0xff, 0x87, 0xf0, 0x78, 0x07, 0xe0, -+ 0x60, 0x0f, 0x60, 0x0f, 0x33, 0x30, 0x80, 0x06 }, -+ [DVBT_6] = { 0x51, 0x03, 0x83, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x60, 0x0f, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBT_7] = { 0x52, 0x03, 0x85, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x60, 0x0f, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBT_8] = { 0x53, 0x03, 0x87, 0x82, 0x40, 0x48, 0x06, 0xe0, -+ 0x60, 0x07, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBC_6] = { 0x32, 0x05, 0x86, 0x82, 0x50, 0x00, 0x06, 0x60, -+ 0x40, 0x0e, 0x60, 0x05, 0x33, 0x10, 0x00, 0x04 }, -+ [DVBC_8] = { 0x53, 0x03, 0x88, 0x82, 0x50, 0x00, 0x06, 0x60, -+ 0x40, 0x0e, 0x60, 0x05, 0x33, 0x10, 0x00, 0x04 }, -+ [ATSC] = { 0x51, 0x03, 0x83, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x40, 0x0e, 0x60, 0x05, 0x03, 0x00, 0x80, 0x04 }, -+ }; -+ -+ dev_dbg(&client->dev, -+ "delivery_system=%d frequency=%u bandwidth_hz=%u", -+ c->delivery_system, c->frequency, c->bandwidth_hz); -+ -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ j = ATSC; -+ if_khz = dev->if_atsc; -+ break; -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 0) { -+ ret = -EINVAL; -+ goto err; -+ } else if (c->bandwidth_hz <= 6000000) { -+ j = DVBT_6; -+ if_khz = dev->if_dvbt_6; -+ } else if (c->bandwidth_hz <= 7000000) { -+ j = DVBT_7; -+ if_khz = dev->if_dvbt_7; -+ } else if (c->bandwidth_hz <= 8000000) { -+ j = DVBT_8; -+ if_khz = dev->if_dvbt_8; -+ } else { -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ case SYS_DVBC_ANNEX_A: -+ case SYS_DVBC_ANNEX_C: -+ if (c->bandwidth_hz == 0) { -+ ret = -EINVAL; -+ goto err; -+ } else if (c->bandwidth_hz <= 6000000) { -+ j = DVBC_6; -+ if_khz = dev->if_dvbc_6; -+ } else if (c->bandwidth_hz <= 8000000) { -+ j = DVBC_8; -+ if_khz = dev->if_dvbc_8; -+ } else { -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ default: -+ ret = -EINVAL; -+ dev_err(&client->dev, "unsupported delivery system=%d", -+ c->delivery_system); -+ goto err; -+ } -+ -+ /* set delivery system dependent registers */ -+ for (i = 0; i < 16; i++) { -+ ret = regmap_write_bits(dev->regmap, delsys_params[REG][i], -+ delsys_params[MASK][i], delsys_params[j][i]); -+ if (ret) -+ goto err; -+ } -+ -+ /* set IF if needed */ -+ if (dev->if_frequency != if_khz) { -+ utmp = DIV_ROUND_CLOSEST(if_khz, 50); -+ ret = regmap_write(dev->regmap, R26_IF, utmp); -+ if (ret) -+ goto err; -+ dev->if_frequency = if_khz; -+ dev_dbg(&client->dev, "set IF=%u kHz", if_khz); -+ -+ } -+ -+ ret = tda18250_set_agc(fe); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R1A_AGCK, 0x03, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x40, 0x00); -+ if (ret) -+ goto err; -+ -+ /* set frequency */ -+ buf[0] = ((c->frequency / 1000) >> 16) & 0xff; -+ buf[1] = ((c->frequency / 1000) >> 8) & 0xff; -+ buf[2] = ((c->frequency / 1000) >> 0) & 0xff; -+ ret = regmap_bulk_write(dev->regmap, R27_RF1, buf, 3); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* initial tune */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* calc ndiv and rdiv */ -+ ret = tda18250_pll_calc(fe, &buf[0], &buf[1], &buf[2]); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R4F_XTALFLX3, 0xe0, -+ (buf[0] << 6) | (buf[1] << 5)); -+ if (ret) -+ goto err; -+ -+ /* clear IRQ */ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R46_CPUMP, 0x07, 0x00); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R39_SD5, 0x03, 0x00); -+ if (ret) -+ goto err; -+ -+ /* tune again */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x01); /* tune */ -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); /* go */ -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* pll locking */ -+ msleep(20); -+ -+ ret = regmap_write_bits(dev->regmap, R2B_MSM2, 0x04, 0x04); -+ if (ret) -+ goto err; -+ -+ msleep(20); -+ -+ /* restore AGCK */ -+ ret = regmap_write_bits(dev->regmap, R1A_AGCK, 0x03, 0x03); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x40, 0x40); -+ if (ret) -+ goto err; -+ -+ /* charge pump */ -+ ret = regmap_write_bits(dev->regmap, R46_CPUMP, 0x07, buf[2]); -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ -+ *frequency = dev->if_frequency * 1000; -+ return 0; -+} -+ -+static int tda18250_sleep(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ /* power down LNA */ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x80, 0x00); -+ if (ret) -+ return ret; -+ -+ /* set if freq to 0 in order to make sure it's set after wake up */ -+ dev->if_frequency = 0; -+ -+ ret = tda18250_power_control(fe, TDA18250_POWER_STANDBY); -+ return ret; -+} -+ -+static const struct dvb_tuner_ops tda18250_ops = { -+ .info = { -+ .name = "NXP TDA18250", -+ .frequency_min = 42000000, -+ .frequency_max = 870000000, -+ }, -+ -+ .init = tda18250_init, -+ .set_params = tda18250_set_params, -+ .get_if_frequency = tda18250_get_if_frequency, -+ .sleep = tda18250_sleep, -+}; -+ -+static int tda18250_probe(struct i2c_client *client, -+ const struct i2c_device_id *id) -+{ -+ struct tda18250_config *cfg = client->dev.platform_data; -+ struct dvb_frontend *fe = cfg->fe; -+ struct tda18250_dev *dev; -+ int ret; -+ unsigned char chip_id[3]; -+ -+ /* some registers are always read from HW */ -+ static const struct regmap_range tda18250_yes_ranges[] = { -+ regmap_reg_range(R05_POWER1, R0B_IRQ4), -+ regmap_reg_range(R21_IF_AGC, R21_IF_AGC), -+ regmap_reg_range(R2A_MSM1, R2B_MSM2), -+ regmap_reg_range(R2F_RSSI1, R31_IRQ_CTRL), -+ }; -+ -+ static const struct regmap_access_table tda18250_volatile_table = { -+ .yes_ranges = tda18250_yes_ranges, -+ .n_yes_ranges = ARRAY_SIZE(tda18250_yes_ranges), -+ }; -+ -+ static const struct regmap_config tda18250_regmap_config = { -+ .reg_bits = 8, -+ .val_bits = 8, -+ .max_register = TDA18250_NUM_REGS - 1, -+ .volatile_table = &tda18250_volatile_table, -+ }; -+ -+ dev = kzalloc(sizeof(*dev), GFP_KERNEL); -+ if (!dev) { -+ ret = -ENOMEM; -+ goto err; -+ } -+ -+ i2c_set_clientdata(client, dev); -+ -+ dev->fe = cfg->fe; -+ dev->loopthrough = cfg->loopthrough; -+ if (cfg->xtal_freq < TDA18250_XTAL_FREQ_MAX) { -+ dev->xtal_freq = cfg->xtal_freq; -+ } else { -+ ret = -EINVAL; -+ dev_err(&client->dev, "xtal_freq invalid=%d", cfg->xtal_freq); -+ goto err_kfree; -+ } -+ dev->if_dvbt_6 = cfg->if_dvbt_6; -+ dev->if_dvbt_7 = cfg->if_dvbt_7; -+ dev->if_dvbt_8 = cfg->if_dvbt_8; -+ dev->if_dvbc_6 = cfg->if_dvbc_6; -+ dev->if_dvbc_8 = cfg->if_dvbc_8; -+ dev->if_atsc = cfg->if_atsc; -+ -+ dev->if_frequency = 0; -+ dev->warm = false; -+ -+ dev->regmap = devm_regmap_init_i2c(client, &tda18250_regmap_config); -+ if (IS_ERR(dev->regmap)) { -+ ret = PTR_ERR(dev->regmap); -+ goto err_kfree; -+ } -+ -+ /* read the three chip ID registers */ -+ regmap_bulk_read(dev->regmap, R00_ID1, &chip_id, 3); -+ dev_dbg(&client->dev, "chip_id=%02x:%02x:%02x", -+ chip_id[0], chip_id[1], chip_id[2]); -+ -+ switch (chip_id[0]) { -+ case 0xc7: -+ dev->slave = false; -+ break; -+ case 0x47: -+ dev->slave = true; -+ break; -+ default: -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ if (chip_id[1] != 0x4a) { -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ switch (chip_id[2]) { -+ case 0x20: -+ dev_info(&client->dev, -+ "NXP TDA18250AHN/%s successfully identified", -+ dev->slave ? "S" : "M"); -+ break; -+ case 0x21: -+ dev_info(&client->dev, -+ "NXP TDA18250BHN/%s successfully identified", -+ dev->slave ? "S" : "M"); -+ break; -+ default: -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ fe->tuner_priv = client; -+ memcpy(&fe->ops.tuner_ops, &tda18250_ops, -+ sizeof(struct dvb_tuner_ops)); -+ -+ /* put the tuner in standby */ -+ tda18250_power_control(fe, TDA18250_POWER_STANDBY); -+ -+ return 0; -+err_kfree: -+ kfree(dev); -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_remove(struct i2c_client *client) -+{ -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dvb_frontend *fe = dev->fe; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); -+ fe->tuner_priv = NULL; -+ kfree(dev); -+ -+ return 0; -+} -+ -+static const struct i2c_device_id tda18250_id_table[] = { -+ {"tda18250", 0}, -+ {} -+}; -+MODULE_DEVICE_TABLE(i2c, tda18250_id_table); -+ -+static struct i2c_driver tda18250_driver = { -+ .driver = { -+ .name = "tda18250", -+ }, -+ .probe = tda18250_probe, -+ .remove = tda18250_remove, -+ .id_table = tda18250_id_table, -+}; -+ -+module_i2c_driver(tda18250_driver); -+ -+MODULE_DESCRIPTION("NXP TDA18250 silicon tuner driver"); -+MODULE_AUTHOR("Olli Salonen "); -+MODULE_LICENSE("GPL"); -diff --git a/drivers/media/tuners/tda18250.h b/drivers/media/tuners/tda18250.h -new file mode 100644 -index 00000000..fb569060 ---- /dev/null -+++ b/drivers/media/tuners/tda18250.h -@@ -0,0 +1,51 @@ -+/* -+ * NXP TDA18250BHN silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#ifndef TDA18250_H -+#define TDA18250_H -+ -+#include -+#include -+#include "dvb_frontend.h" -+ -+#define TDA18250_XTAL_FREQ_16MHZ 0 -+#define TDA18250_XTAL_FREQ_24MHZ 1 -+#define TDA18250_XTAL_FREQ_25MHZ 2 -+#define TDA18250_XTAL_FREQ_27MHZ 3 -+#define TDA18250_XTAL_FREQ_30MHZ 4 -+#define TDA18250_XTAL_FREQ_MAX 5 -+ -+struct tda18250_config { -+ u16 if_dvbt_6; -+ u16 if_dvbt_7; -+ u16 if_dvbt_8; -+ u16 if_dvbc_6; -+ u16 if_dvbc_8; -+ u16 if_atsc; -+ u8 xtal_freq; -+ bool loopthrough; -+ -+ /* -+ * frontend -+ */ -+ struct dvb_frontend *fe; -+ -+#if defined(CONFIG_MEDIA_CONTROLLER) -+ struct media_device *mdev; -+#endif -+}; -+ -+#endif -diff --git a/drivers/media/tuners/tda18250_priv.h b/drivers/media/tuners/tda18250_priv.h -new file mode 100644 -index 00000000..4a6f8017 ---- /dev/null -+++ b/drivers/media/tuners/tda18250_priv.h -@@ -0,0 +1,145 @@ -+/* -+ * NXP TDA18250BHN silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#ifndef TDA18250_PRIV_H -+#define TDA18250_PRIV_H -+ -+#include "tda18250.h" -+ -+#define R00_ID1 0x00 /* ID byte 1 */ -+#define R01_ID2 0x01 /* ID byte 2 */ -+#define R02_ID3 0x02 /* ID byte 3 */ -+#define R03_THERMO1 0x03 /* Thermo byte 1 */ -+#define R04_THERMO2 0x04 /* Thermo byte 2 */ -+#define R05_POWER1 0x05 /* Power byte 1 */ -+#define R06_POWER2 0x06 /* Power byte 2 */ -+#define R07_GPIO 0x07 /* GPIO */ -+#define R08_IRQ1 0x08 /* IRQ */ -+#define R09_IRQ2 0x09 /* IRQ */ -+#define R0A_IRQ3 0x0a /* IRQ */ -+#define R0B_IRQ4 0x0b /* IRQ */ -+#define R0C_AGC11 0x0c /* AGC1 byte 1 */ -+#define R0D_AGC12 0x0d /* AGC1 byte 2 */ -+#define R0E_AGC13 0x0e /* AGC1 byte 3 */ -+#define R0F_AGC14 0x0f /* AGC1 byte 4 */ -+#define R10_LT1 0x10 /* LT byte 1 */ -+#define R11_LT2 0x11 /* LT byte 2 */ -+#define R12_AGC21 0x12 /* AGC2 byte 1 */ -+#define R13_AGC22 0x13 /* AGC2 byte 2 */ -+#define R14_AGC23 0x14 /* AGC2 byte 3 */ -+#define R15_AGC24 0x15 /* AGC2 byte 4 */ -+#define R16_AGC25 0x16 /* AGC2 byte 5 */ -+#define R17_AGC31 0x17 /* AGC3 byte 1 */ -+#define R18_AGC32 0x18 /* AGC3 byte 2 */ -+#define R19_AGC33 0x19 /* AGC3 byte 3 */ -+#define R1A_AGCK 0x1a -+#define R1B_GAIN1 0x1b -+#define R1C_GAIN2 0x1c -+#define R1D_GAIN3 0x1d -+#define R1E_WI_FI 0x1e /* Wireless Filter */ -+#define R1F_RF_BPF 0x1f /* RF Band Pass Filter */ -+#define R20_IR_MIX 0x20 /* IR Mixer */ -+#define R21_IF_AGC 0x21 -+#define R22_IF1 0x22 /* IF byte 1 */ -+#define R23_IF2 0x23 /* IF byte 2 */ -+#define R24_IF3 0x24 /* IF byte 3 */ -+#define R25_REF 0x25 /* reference byte */ -+#define R26_IF 0x26 /* IF frequency */ -+#define R27_RF1 0x27 /* RF frequency byte 1 */ -+#define R28_RF2 0x28 /* RF frequency byte 2 */ -+#define R29_RF3 0x29 /* RF frequency byte 3 */ -+#define R2A_MSM1 0x2a -+#define R2B_MSM2 0x2b -+#define R2C_PS1 0x2c /* power saving mode byte 1 */ -+#define R2D_PS2 0x2d /* power saving mode byte 2 */ -+#define R2E_PS3 0x2e /* power saving mode byte 3 */ -+#define R2F_RSSI1 0x2f -+#define R30_RSSI2 0x30 -+#define R31_IRQ_CTRL 0x31 -+#define R32_DUMMY 0x32 -+#define R33_TEST 0x33 -+#define R34_MD1 0x34 -+#define R35_SD1 0x35 -+#define R36_SD2 0x36 -+#define R37_SD3 0x37 -+#define R38_SD4 0x38 -+#define R39_SD5 0x39 -+#define R3A_SD_TEST 0x3a -+#define R3B_REGU 0x3b -+#define R3C_RCCAL1 0x3c -+#define R3D_RCCAL2 0x3d -+#define R3E_IRCAL1 0x3e -+#define R3F_IRCAL2 0x3f -+#define R40_IRCAL3 0x40 -+#define R41_IRCAL4 0x41 -+#define R42_IRCAL5 0x42 -+#define R43_PD1 0x43 /* power down byte 1 */ -+#define R44_PD2 0x44 /* power down byte 2 */ -+#define R45_PD 0x45 /* power down */ -+#define R46_CPUMP 0x46 /* charge pump */ -+#define R47_LNAPOL 0x47 /* LNA polar casc */ -+#define R48_SMOOTH1 0x48 /* smooth test byte 1 */ -+#define R49_SMOOTH2 0x49 /* smooth test byte 2 */ -+#define R4A_SMOOTH3 0x4a /* smooth test byte 3 */ -+#define R4B_XTALOSC1 0x4b -+#define R4C_XTALOSC2 0x4c -+#define R4D_XTALFLX1 0x4d -+#define R4E_XTALFLX2 0x4e -+#define R4F_XTALFLX3 0x4f -+#define R50_XTALFLX4 0x50 -+#define R51_XTALFLX5 0x51 -+#define R52_IRLOOP0 0x52 -+#define R53_IRLOOP1 0x53 -+#define R54_IRLOOP2 0x54 -+#define R55_IRLOOP3 0x55 -+#define R56_IRLOOP4 0x56 -+#define R57_PLL_LOG 0x57 -+#define R58_AGC2_UP1 0x58 -+#define R59_AGC2_UP2 0x59 -+#define R5A_H3H5 0x5a -+#define R5B_AGC_AUTO 0x5b -+#define R5C_AGC_DEBUG 0x5c -+ -+#define TDA18250_NUM_REGS 93 -+ -+#define TDA18250_POWER_STANDBY 0 -+#define TDA18250_POWER_NORMAL 1 -+ -+#define TDA18250_IRQ_CAL 0x81 -+#define TDA18250_IRQ_HW_INIT 0x82 -+#define TDA18250_IRQ_TUNE 0x88 -+ -+struct tda18250_dev { -+ struct mutex i2c_mutex; -+ struct dvb_frontend *fe; -+ struct i2c_adapter *i2c; -+ struct regmap *regmap; -+ u8 xtal_freq; -+ /* IF in kHz */ -+ u16 if_dvbt_6; -+ u16 if_dvbt_7; -+ u16 if_dvbt_8; -+ u16 if_dvbc_6; -+ u16 if_dvbc_8; -+ u16 if_atsc; -+ u16 if_frequency; -+ bool slave; -+ bool loopthrough; -+ bool warm; -+ u8 regs[TDA18250_NUM_REGS]; -+}; -+ -+#endif --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/0007-dvb-mn88472-staging.patch b/archive-patches/armbox/hd60/0007-dvb-mn88472-staging.patch deleted file mode 100644 index 7d5ce1f..0000000 --- a/archive-patches/armbox/hd60/0007-dvb-mn88472-staging.patch +++ /dev/null @@ -1,834 +0,0 @@ ---- - drivers/media/dvb-frontends/mn88472.h | 45 +- - drivers/staging/media/mn88472/mn88472.c | 525 ++++++++++--------- - drivers/staging/media/mn88472/mn88472_priv.h | 11 +- - 3 files changed, 310 insertions(+), 271 deletions(-) - -diff --git a/drivers/media/dvb-frontends/mn88472.h b/drivers/media/dvb-frontends/mn88472.h -index 095294d2..32363252 100644 ---- a/drivers/media/dvb-frontends/mn88472.h -+++ b/drivers/media/dvb-frontends/mn88472.h -@@ -19,23 +19,33 @@ - - #include - --enum ts_clock { -- VARIABLE_TS_CLOCK, -- FIXED_TS_CLOCK, --}; -+/** -+ * struct mn88472_config - Platform data for the mn88472 driver -+ * @xtal: Clock frequency. -+ * @ts_mode: TS mode. -+ * @ts_clock: TS clock config. -+ * @i2c_wr_max: Max number of bytes driver writes to I2C at once. -+ * @get_dvb_frontend: Get DVB frontend. -+ */ - --enum ts_mode { -- SERIAL_TS_MODE, -- PARALLEL_TS_MODE, --}; -+/* Define old names for backward compatibility */ -+#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE -+#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED -+#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL -+#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL - - struct mn88472_config { -- /* -- * Max num of bytes given I2C adapter could write at once. -- * Default: none -- */ -- u16 i2c_wr_max; -+ unsigned int xtal; -+ -+#define MN88472_TS_MODE_SERIAL 0 -+#define MN88472_TS_MODE_PARALLEL 1 -+ int ts_mode; - -+#define MN88472_TS_CLK_FIXED 0 -+#define MN88472_TS_CLK_VARIABLE 1 -+ int ts_clock; -+ -+ u16 i2c_wr_max; - - /* Everything after that is returned by the driver. */ - -@@ -43,14 +53,7 @@ struct mn88472_config { - * DVB frontend. - */ - struct dvb_frontend **fe; -- -- /* -- * Xtal frequency. -- * Hz -- */ -- u32 xtal; -- int ts_mode; -- int ts_clock; -+ struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *); - }; - - #endif -diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c -index cf2e96bc..18fb2df1 100644 ---- a/drivers/staging/media/mn88472/mn88472.c -+++ b/drivers/staging/media/mn88472/mn88472.c -@@ -17,28 +17,90 @@ - #include "mn88472_priv.h" - - static int mn88472_get_tune_settings(struct dvb_frontend *fe, -- struct dvb_frontend_tune_settings *s) -+ struct dvb_frontend_tune_settings *s) - { -- s->min_delay_ms = 800; -+ s->min_delay_ms = 1000; - return 0; - } - -+static int mn88472_read_status(struct dvb_frontend *fe, enum fe_status *status) -+{ -+ struct i2c_client *client = fe->demodulator_priv; -+ struct mn88472_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ unsigned int utmp; -+ -+ if (!dev->active) { -+ ret = -EAGAIN; -+ goto err; -+ } -+ -+ switch (c->delivery_system) { -+ case SYS_DVBT: -+ ret = regmap_read(dev->regmap[0], 0x7f, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x09) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else -+ *status = 0; -+ break; -+ case SYS_DVBT2: -+ ret = regmap_read(dev->regmap[2], 0x92, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x0d) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else if ((utmp & 0x0f) >= 0x0a) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI; -+ else if ((utmp & 0x0f) >= 0x07) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER; -+ else -+ *status = 0; -+ break; -+ case SYS_DVBC_ANNEX_A: -+ ret = regmap_read(dev->regmap[1], 0x84, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x08) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else -+ *status = 0; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d\n", ret); -+ return ret; -+} -+ - static int mn88472_set_frontend(struct dvb_frontend *fe) - { - struct i2c_client *client = fe->demodulator_priv; - struct mn88472_dev *dev = i2c_get_clientdata(client); - struct dtv_frontend_properties *c = &fe->dtv_property_cache; - int ret, i; -- u32 if_frequency = 0; -- u64 tmp; -- u8 delivery_system_val, if_val[3], bw_val[7], bw_val2; -+ unsigned int utmp; -+ u32 if_frequency; -+ u8 buf[3], delivery_system_val, bandwidth_val, *bandwidth_vals_ptr; -+ u8 reg_bank0_b4_val, reg_bank0_cd_val, reg_bank0_d4_val; -+ u8 reg_bank0_d6_val; - - dev_dbg(&client->dev, -- "delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d\n", -- c->delivery_system, c->modulation, -- c->frequency, c->symbol_rate, c->inversion); -+ "delivery_system=%u modulation=%u frequency=%u bandwidth_hz=%u symbol_rate=%u inversion=%d stream_id=%d\n", -+ c->delivery_system, c->modulation, c->frequency, -+ c->bandwidth_hz, c->symbol_rate, c->inversion, c->stream_id); - -- if (!dev->warm) { -+ if (!dev->active) { - ret = -EAGAIN; - goto err; - } -@@ -46,39 +108,64 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - switch (c->delivery_system) { - case SYS_DVBT: - delivery_system_val = 0x02; -+ reg_bank0_b4_val = 0x00; -+ reg_bank0_cd_val = 0x1f; -+ reg_bank0_d4_val = 0x0a; -+ reg_bank0_d6_val = 0x48; - break; - case SYS_DVBT2: - delivery_system_val = 0x03; -+ reg_bank0_b4_val = 0xf6; -+ reg_bank0_cd_val = 0x01; -+ reg_bank0_d4_val = 0x09; -+ reg_bank0_d6_val = 0x46; - break; - case SYS_DVBC_ANNEX_A: - delivery_system_val = 0x04; -+ reg_bank0_b4_val = 0x00; -+ reg_bank0_cd_val = 0x17; -+ reg_bank0_d4_val = 0x09; -+ reg_bank0_d6_val = 0x48; - break; - default: - ret = -EINVAL; - goto err; - } - -- if (c->bandwidth_hz <= 5000000) { -- memcpy(bw_val, "\xe5\x99\x9a\x1b\xa9\x1b\xa9", 7); -- bw_val2 = 0x03; -- } else if (c->bandwidth_hz <= 6000000) { -- /* IF 3570000 Hz, BW 6000000 Hz */ -- memcpy(bw_val, "\xbf\x55\x55\x15\x6b\x15\x6b", 7); -- bw_val2 = 0x02; -- } else if (c->bandwidth_hz <= 7000000) { -- /* IF 4570000 Hz, BW 7000000 Hz */ -- memcpy(bw_val, "\xa4\x00\x00\x0f\x2c\x0f\x2c", 7); -- bw_val2 = 0x01; -- } else if (c->bandwidth_hz <= 8000000) { -- /* IF 4570000 Hz, BW 8000000 Hz */ -- memcpy(bw_val, "\x8f\x80\x00\x08\xee\x08\xee", 7); -- bw_val2 = 0x00; -- } else { -- ret = -EINVAL; -- goto err; -+ switch (c->delivery_system) { -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ switch (c->bandwidth_hz) { -+ case 5000000: -+ bandwidth_vals_ptr = "\xe5\x99\x9a\x1b\xa9\x1b\xa9"; -+ bandwidth_val = 0x03; -+ break; -+ case 6000000: -+ bandwidth_vals_ptr = "\xbf\x55\x55\x15\x6b\x15\x6b"; -+ bandwidth_val = 0x02; -+ break; -+ case 7000000: -+ bandwidth_vals_ptr = "\xa4\x00\x00\x0f\x2c\x0f\x2c"; -+ bandwidth_val = 0x01; -+ break; -+ case 8000000: -+ bandwidth_vals_ptr = "\x8f\x80\x00\x08\xee\x08\xee"; -+ bandwidth_val = 0x00; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ case SYS_DVBC_ANNEX_A: -+ bandwidth_vals_ptr = NULL; -+ bandwidth_val = 0x00; -+ break; -+ default: -+ break; - } - -- /* program tuner */ -+ /* Program tuner */ - if (fe->ops.tuner_ops.set_params) { - ret = fe->ops.tuner_ops.set_params(fe); - if (ret) -@@ -91,20 +178,10 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - goto err; - - dev_dbg(&client->dev, "get_if_frequency=%d\n", if_frequency); -- } -- -- /* Calculate IF registers ( (1<<24)*IF / Xtal ) */ -- tmp = div_u64(if_frequency * (u64)(1<<24) + (dev->xtal / 2), -- dev->xtal); -- if_val[0] = ((tmp >> 16) & 0xff); -- if_val[1] = ((tmp >> 8) & 0xff); -- if_val[2] = ((tmp >> 0) & 0xff); -- -- ret = regmap_write(dev->regmap[2], 0xfb, 0x13); -- ret = regmap_write(dev->regmap[2], 0xef, 0x13); -- ret = regmap_write(dev->regmap[2], 0xf9, 0x13); -- if (ret) -+ } else { -+ ret = -EINVAL; - goto err; -+ } - - ret = regmap_write(dev->regmap[2], 0x00, 0x66); - if (ret) -@@ -118,157 +195,81 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - ret = regmap_write(dev->regmap[2], 0x03, delivery_system_val); - if (ret) - goto err; -- ret = regmap_write(dev->regmap[2], 0x04, bw_val2); -+ ret = regmap_write(dev->regmap[2], 0x04, bandwidth_val); - if (ret) - goto err; - -- for (i = 0; i < sizeof(if_val); i++) { -- ret = regmap_write(dev->regmap[2], 0x10 + i, if_val[i]); -+ /* IF */ -+ utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x1000000, dev->clk); -+ buf[0] = (utmp >> 16) & 0xff; -+ buf[1] = (utmp >> 8) & 0xff; -+ buf[2] = (utmp >> 0) & 0xff; -+ for (i = 0; i < 3; i++) { -+ ret = regmap_write(dev->regmap[2], 0x10 + i, buf[i]); - if (ret) - goto err; - } - -- for (i = 0; i < sizeof(bw_val); i++) { -- ret = regmap_write(dev->regmap[2], 0x13 + i, bw_val[i]); -- if (ret) -- goto err; -+ /* Bandwidth */ -+ if (bandwidth_vals_ptr) { -+ for (i = 0; i < 7; i++) { -+ ret = regmap_write(dev->regmap[2], 0x13 + i, -+ bandwidth_vals_ptr[i]); -+ if (ret) -+ goto err; -+ } - } - -+ ret = regmap_write(dev->regmap[0], 0xb4, reg_bank0_b4_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xcd, reg_bank0_cd_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xd4, reg_bank0_d4_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xd6, reg_bank0_d6_val); -+ if (ret) -+ goto err; -+ - switch (c->delivery_system) { - case SYS_DVBT: - ret = regmap_write(dev->regmap[0], 0x07, 0x26); -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xb4, 0x00); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x1f); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x48); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[0], 0x00, 0xba); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[0], 0x01, 0x13); - if (ret) - goto err; - break; - case SYS_DVBT2: - ret = regmap_write(dev->regmap[2], 0x2b, 0x13); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[2], 0x4f, 0x05); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[1], 0xf6, 0x05); -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xb4, 0xf6); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x01); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x09); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x46); -- ret = regmap_write(dev->regmap[2], 0x30, 0x80); -- ret = regmap_write(dev->regmap[2], 0x32, 0x00); - if (ret) - goto err; -- break; -- case SYS_DVBC_ANNEX_A: -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0b); -- ret = regmap_write(dev->regmap[0], 0xb4, 0x00); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x17); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x09); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x48); -- ret = regmap_write(dev->regmap[1], 0x00, 0xb0); -+ ret = regmap_write(dev->regmap[2], 0x32, c->stream_id); - if (ret) - goto err; - break; -- default: -- ret = -EINVAL; -- goto err; -- } -- -- ret = regmap_write(dev->regmap[0], 0x46, 0x00); -- ret = regmap_write(dev->regmap[0], 0xae, 0x00); -- -- switch (dev->ts_mode) { -- case SERIAL_TS_MODE: -- ret = regmap_write(dev->regmap[2], 0x08, 0x1d); -- break; -- case PARALLEL_TS_MODE: -- ret = regmap_write(dev->regmap[2], 0x08, 0x00); -+ case SYS_DVBC_ANNEX_A: - break; - default: -- dev_dbg(&client->dev, "ts_mode error: %d\n", dev->ts_mode); -- ret = -EINVAL; -- goto err; -- } -- -- switch (dev->ts_clock) { -- case VARIABLE_TS_CLOCK: -- ret = regmap_write(dev->regmap[0], 0xd9, 0xe3); - break; -- case FIXED_TS_CLOCK: -- ret = regmap_write(dev->regmap[0], 0xd9, 0xe1); -- break; -- default: -- dev_dbg(&client->dev, "ts_clock error: %d\n", dev->ts_clock); -- ret = -EINVAL; -- goto err; - } - -- /* Reset demod */ -+ /* Reset FSM */ - ret = regmap_write(dev->regmap[2], 0xf8, 0x9f); - if (ret) - goto err; - -- dev->delivery_system = c->delivery_system; -- -- return 0; --err: -- dev_dbg(&client->dev, "failed=%d\n", ret); -- return ret; --} -- --static int mn88472_read_status(struct dvb_frontend *fe, enum fe_status *status) --{ -- struct i2c_client *client = fe->demodulator_priv; -- struct mn88472_dev *dev = i2c_get_clientdata(client); -- struct dtv_frontend_properties *c = &fe->dtv_property_cache; -- int ret; -- unsigned int utmp; -- int lock = 0; -- -- *status = 0; -- -- if (!dev->warm) { -- ret = -EAGAIN; -- goto err; -- } -- -- switch (c->delivery_system) { -- case SYS_DVBT: -- ret = regmap_read(dev->regmap[0], 0x7F, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x09) -- lock = 1; -- break; -- case SYS_DVBT2: -- ret = regmap_read(dev->regmap[2], 0x92, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x07) -- *status |= FE_HAS_SIGNAL; -- if ((utmp & 0xF) >= 0x0a) -- *status |= FE_HAS_CARRIER; -- if ((utmp & 0xF) >= 0x0d) -- *status |= FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -- break; -- case SYS_DVBC_ANNEX_A: -- ret = regmap_read(dev->regmap[1], 0x84, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x08) -- lock = 1; -- break; -- default: -- ret = -EINVAL; -- goto err; -- } -- -- if (lock) -- *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | -- FE_HAS_SYNC | FE_HAS_LOCK; -- - return 0; - err: - dev_dbg(&client->dev, "failed=%d\n", ret); -@@ -279,93 +280,107 @@ static int mn88472_init(struct dvb_frontend *fe) - { - struct i2c_client *client = fe->demodulator_priv; - struct mn88472_dev *dev = i2c_get_clientdata(client); -- int ret, len, remaining; -- const struct firmware *fw = NULL; -- u8 *fw_file = MN88472_FIRMWARE; -- unsigned int tmp; -+ int ret, len, rem; -+ unsigned int utmp; -+ const struct firmware *firmware; -+ const char *name = MN88472_FIRMWARE; - - dev_dbg(&client->dev, "\n"); - -- /* set cold state by default */ -- dev->warm = false; -- -- /* power on */ -+ /* Power up */ - ret = regmap_write(dev->regmap[2], 0x05, 0x00); - if (ret) - goto err; -- -- ret = regmap_bulk_write(dev->regmap[2], 0x0b, "\x00\x00", 2); -+ ret = regmap_write(dev->regmap[2], 0x0b, 0x00); - if (ret) - goto err; -- -- /* check if firmware is already running */ -- ret = regmap_read(dev->regmap[0], 0xf5, &tmp); -+ ret = regmap_write(dev->regmap[2], 0x0c, 0x00); - if (ret) - goto err; - -- if (!(tmp & 0x1)) { -- dev_info(&client->dev, "firmware already running\n"); -- dev->warm = true; -- return 0; -- } -+ /* Check if firmware is already running */ -+ ret = regmap_read(dev->regmap[0], 0xf5, &utmp); -+ if (ret) -+ goto err; -+ if (!(utmp & 0x01)) -+ goto warm; - -- /* request the firmware, this will block and timeout */ -- ret = request_firmware(&fw, fw_file, &client->dev); -+ ret = request_firmware(&firmware, name, &client->dev); - if (ret) { -- dev_err(&client->dev, "firmare file '%s' not found\n", -- fw_file); -+ dev_err(&client->dev, "firmware file '%s' not found\n", name); - goto err; - } - -- dev_info(&client->dev, "downloading firmware from file '%s'\n", -- fw_file); -+ dev_info(&client->dev, "downloading firmware from file '%s'\n", name); - - ret = regmap_write(dev->regmap[0], 0xf5, 0x03); - if (ret) -- goto firmware_release; -- -- for (remaining = fw->size; remaining > 0; -- remaining -= (dev->i2c_wr_max - 1)) { -- len = remaining; -- if (len > (dev->i2c_wr_max - 1)) -- len = dev->i2c_wr_max - 1; -+ goto err_release_firmware; - -+ for (rem = firmware->size; rem > 0; rem -= (dev->i2c_write_max - 1)) { -+ len = min(dev->i2c_write_max - 1, rem); - ret = regmap_bulk_write(dev->regmap[0], 0xf6, -- &fw->data[fw->size - remaining], len); -+ &firmware->data[firmware->size - rem], -+ len); - if (ret) { -- dev_err(&client->dev, -- "firmware download failed=%d\n", ret); -- goto firmware_release; -+ dev_err(&client->dev, "firmware download failed %d\n", -+ ret); -+ goto err_release_firmware; - } - } - -- /* parity check of firmware */ -- ret = regmap_read(dev->regmap[0], 0xf8, &tmp); -- if (ret) { -- dev_err(&client->dev, -- "parity reg read failed=%d\n", ret); -- goto firmware_release; -- } -- if (tmp & 0x10) { -- dev_err(&client->dev, -- "firmware parity check failed=0x%x\n", tmp); -- goto firmware_release; -+ /* Parity check of firmware */ -+ ret = regmap_read(dev->regmap[0], 0xf8, &utmp); -+ if (ret) -+ goto err_release_firmware; -+ if (utmp & 0x10) { -+ ret = -EINVAL; -+ dev_err(&client->dev, "firmware did not run\n"); -+ goto err_release_firmware; - } -- dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp); - - ret = regmap_write(dev->regmap[0], 0xf5, 0x00); - if (ret) -- goto firmware_release; -+ goto err_release_firmware; -+ -+ release_firmware(firmware); -+warm: -+ /* TS config */ -+ switch (dev->ts_mode) { -+ case SERIAL_TS_MODE: -+ utmp = 0x1d; -+ break; -+ case PARALLEL_TS_MODE: -+ utmp = 0x00; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ ret = regmap_write(dev->regmap[2], 0x08, utmp); -+ if (ret) -+ goto err; - -- release_firmware(fw); -- fw = NULL; -+ switch (dev->ts_clk) { -+ case VARIABLE_TS_CLOCK: -+ utmp = 0xe3; -+ break; -+ case FIXED_TS_CLOCK: -+ utmp = 0xe1; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ ret = regmap_write(dev->regmap[0], 0xd9, utmp); -+ if (ret) -+ goto err; - -- /* warm state */ -- dev->warm = true; -+ dev->active = true; - - return 0; --firmware_release: -- release_firmware(fw); -+err_release_firmware: -+ release_firmware(firmware); - err: - dev_dbg(&client->dev, "failed=%d\n", ret); - return ret; -@@ -379,18 +394,17 @@ static int mn88472_sleep(struct dvb_frontend *fe) - - dev_dbg(&client->dev, "\n"); - -- /* power off */ -+ /* Power down */ -+ ret = regmap_write(dev->regmap[2], 0x0c, 0x30); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[2], 0x0b, 0x30); -- - if (ret) - goto err; -- - ret = regmap_write(dev->regmap[2], 0x05, 0x3e); - if (ret) - goto err; - -- dev->delivery_system = SYS_UNDEFINED; -- - return 0; - err: - dev_dbg(&client->dev, "failed=%d\n", ret); -@@ -434,10 +448,19 @@ static struct dvb_frontend_ops mn88472_ops = { - .read_status = mn88472_read_status, - }; - -+static struct dvb_frontend *mn88472_get_dvb_frontend(struct i2c_client *client) -+{ -+ struct mn88472_dev *dev = i2c_get_clientdata(client); -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ return &dev->fe; -+} -+ - static int mn88472_probe(struct i2c_client *client, -- const struct i2c_device_id *id) -+ const struct i2c_device_id *id) - { -- struct mn88472_config *config = client->dev.platform_data; -+ struct mn88472_config *pdata = client->dev.platform_data; - struct mn88472_dev *dev; - int ret; - unsigned int utmp; -@@ -448,23 +471,16 @@ static int mn88472_probe(struct i2c_client *client, - - dev_dbg(&client->dev, "\n"); - -- /* Caller really need to provide pointer for frontend we create. */ -- if (config->fe == NULL) { -- dev_err(&client->dev, "frontend pointer not defined\n"); -- ret = -EINVAL; -- goto err; -- } -- - dev = kzalloc(sizeof(*dev), GFP_KERNEL); -- if (dev == NULL) { -+ if (!dev) { - ret = -ENOMEM; - goto err; - } - -- dev->i2c_wr_max = config->i2c_wr_max; -- dev->xtal = config->xtal; -- dev->ts_mode = config->ts_mode; -- dev->ts_clock = config->ts_clock; -+ dev->i2c_write_max = pdata->i2c_wr_max ? pdata->i2c_wr_max : ~0; -+ dev->clk = pdata->xtal; -+ dev->ts_mode = pdata->ts_mode; -+ dev->ts_clk = pdata->ts_clock; - dev->client[0] = client; - dev->regmap[0] = regmap_init_i2c(dev->client[0], ®map_config); - if (IS_ERR(dev->regmap[0])) { -@@ -472,18 +488,28 @@ static int mn88472_probe(struct i2c_client *client, - goto err_kfree; - } - -- /* check demod answers to I2C */ -- ret = regmap_read(dev->regmap[0], 0x00, &utmp); -+ /* Check demod answers with correct chip id */ -+ ret = regmap_read(dev->regmap[0], 0xff, &utmp); - if (ret) - goto err_regmap_0_regmap_exit; - -+ dev_dbg(&client->dev, "chip id=%02x\n", utmp); -+ -+ if (utmp != 0x02) { -+ ret = -ENODEV; -+ goto err_regmap_0_regmap_exit; -+ } -+ - /* -- * Chip has three I2C addresses for different register pages. Used -+ * Chip has three I2C addresses for different register banks. Used - * addresses are 0x18, 0x1a and 0x1c. We register two dummy clients, -- * 0x1a and 0x1c, in order to get own I2C client for each register page. -+ * 0x1a and 0x1c, in order to get own I2C client for each register bank. -+ * -+ * Also, register bank 2 do not support sequential I/O. Only single -+ * register write or read is allowed to that bank. - */ - dev->client[1] = i2c_new_dummy(client->adapter, 0x1a); -- if (dev->client[1] == NULL) { -+ if (!dev->client[1]) { - ret = -ENODEV; - dev_err(&client->dev, "I2C registration failed\n"); - if (ret) -@@ -497,7 +523,7 @@ static int mn88472_probe(struct i2c_client *client, - i2c_set_clientdata(dev->client[1], dev); - - dev->client[2] = i2c_new_dummy(client->adapter, 0x1c); -- if (dev->client[2] == NULL) { -+ if (!dev->client[2]) { - ret = -ENODEV; - dev_err(&client->dev, "2nd I2C registration failed\n"); - if (ret) -@@ -510,15 +536,25 @@ static int mn88472_probe(struct i2c_client *client, - } - i2c_set_clientdata(dev->client[2], dev); - -- /* create dvb_frontend */ -+ /* Sleep because chip is active by default */ -+ ret = regmap_write(dev->regmap[2], 0x05, 0x3e); -+ if (ret) -+ goto err_regmap_2_regmap_exit; -+ -+ /* Create dvb frontend */ - memcpy(&dev->fe.ops, &mn88472_ops, sizeof(struct dvb_frontend_ops)); - dev->fe.demodulator_priv = client; -- *config->fe = &dev->fe; -+ *pdata->fe = &dev->fe; - i2c_set_clientdata(client, dev); - -- dev_info(&client->dev, "Panasonic MN88472 successfully attached\n"); -- return 0; -+ /* Setup callbacks */ -+ pdata->get_dvb_frontend = mn88472_get_dvb_frontend; - -+ dev_info(&client->dev, "Panasonic MN88472 successfully identified\n"); -+ -+ return 0; -+err_regmap_2_regmap_exit: -+ regmap_exit(dev->regmap[2]); - err_client_2_i2c_unregister_device: - i2c_unregister_device(dev->client[2]); - err_regmap_1_regmap_exit: -@@ -561,11 +597,12 @@ MODULE_DEVICE_TABLE(i2c, mn88472_id_table); - - static struct i2c_driver mn88472_driver = { - .driver = { -- .name = "mn88472", -+ .name = "mn88472", -+ .suppress_bind_attrs = true, - }, -- .probe = mn88472_probe, -- .remove = mn88472_remove, -- .id_table = mn88472_id_table, -+ .probe = mn88472_probe, -+ .remove = mn88472_remove, -+ .id_table = mn88472_id_table, - }; - - module_i2c_driver(mn88472_driver); -diff --git a/drivers/staging/media/mn88472/mn88472_priv.h b/drivers/staging/media/mn88472/mn88472_priv.h -index 1a0de9e4..cdf2597a 100644 ---- a/drivers/staging/media/mn88472/mn88472_priv.h -+++ b/drivers/staging/media/mn88472/mn88472_priv.h -@@ -28,12 +28,11 @@ struct mn88472_dev { - struct i2c_client *client[3]; - struct regmap *regmap[3]; - struct dvb_frontend fe; -- u16 i2c_wr_max; -- enum fe_delivery_system delivery_system; -- bool warm; /* FW running */ -- u32 xtal; -- int ts_mode; -- int ts_clock; -+ u16 i2c_write_max; -+ unsigned int clk; -+ unsigned int active:1; -+ unsigned int ts_mode:1; -+ unsigned int ts_clk:1; - }; - - #endif --- -2.17.1 - diff --git a/archive-patches/armbox/hd60/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch b/archive-patches/armbox/hd60/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch deleted file mode 100644 index 5cb57cb..0000000 --- a/archive-patches/armbox/hd60/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch +++ /dev/null @@ -1,51 +0,0 @@ -From edc966de8725f9186cc9358214da89d335f0e0bd Mon Sep 17 00:00:00 2001 -From: Miguel Ojeda -Date: Fri, 2 Aug 2019 12:37:56 +0200 -Subject: Backport minimal compiler_attributes.h to support GCC 9 - -This adds support for __copy to v4.9.y so that we can use it in -init/exit_module to avoid -Werror=missing-attributes errors on GCC 9. - -Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/ -Cc: -Suggested-by: Rolf Eike Beer -Signed-off-by: Miguel Ojeda -Signed-off-by: Greg Kroah-Hartman - -Signed-off-by: Sasha Levin ---- - include/linux/compiler.h | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -(limited to 'include/linux') - -diff --git a/include/linux/compiler.h b/include/linux/compiler.h -index ed772311ec1f..5508011cc0c7 100644 ---- a/include/linux/compiler.h -+++ b/include/linux/compiler.h -@@ -52,6 +52,22 @@ extern void __chk_io_ptr(const volatile void __iomem *); - - #ifdef __KERNEL__ - -+/* -+ * Minimal backport of compiler_attributes.h to add support for __copy -+ * to v4.9.y so that we can use it in init/exit_module to avoid -+ * -Werror=missing-attributes errors on GCC 9. -+ */ -+#ifndef __has_attribute -+# define __has_attribute(x) __GCC4_has_attribute_##x -+# define __GCC4_has_attribute___copy__ 0 -+#endif -+ -+#if __has_attribute(__copy__) -+# define __copy(symbol) __attribute__((__copy__(symbol))) -+#else -+# define __copy(symbol) -+#endif -+ - #ifdef __GNUC__ - #include - #endif --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd60/HauppaugeWinTV-dualHD.patch b/archive-patches/armbox/hd60/HauppaugeWinTV-dualHD.patch deleted file mode 100644 index ea47228..0000000 --- a/archive-patches/armbox/hd60/HauppaugeWinTV-dualHD.patch +++ /dev/null @@ -1,629 +0,0 @@ -diff -Nur a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx ---- a/Documentation/video4linux/CARDLIST.em28xx 2017-07-31 15:25:12.000000000 +0200 -+++ b/Documentation/video4linux/CARDLIST.em28xx 2019-04-02 08:35:00.919204500 +0200 -@@ -96,3 +96,5 @@ - 95 -> Leadtek VC100 (em2861) [0413:6f07] - 96 -> Terratec Cinergy T2 Stick HD (em28178) - 97 -> Elgato EyeTV Hybrid 2008 INT (em2884) [0fd9:0018] -+ 98 -> Hauppauge WinTV-dualHD DVB (em28174) [2040:0265] -+ -diff -Nur a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h ---- a/drivers/media/usb/em28xx/em28xx.h 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx.h 2019-04-02 08:30:40.196114900 +0200 -@@ -145,6 +145,7 @@ - #define EM2861_BOARD_LEADTEK_VC100 95 - #define EM28178_BOARD_TERRATEC_T2_STICK_HD 96 - #define EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 97 -+#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB 98 - - /* Limits minimum and default number of buffers */ - #define EM28XX_MIN_BUF 4 -@@ -213,6 +214,9 @@ - /* max. number of button state polling addresses */ - #define EM28XX_NUM_BUTTON_ADDRESSES_MAX 5 - -+#define PRIMARY_TS 0 -+#define SECONDARY_TS 1 -+ - enum em28xx_mode { - EM28XX_SUSPEND, - EM28XX_ANALOG_MODE, -@@ -412,6 +416,7 @@ - enum em28xx_led_role { - EM28XX_LED_ANALOG_CAPTURING = 0, - EM28XX_LED_DIGITAL_CAPTURING, -+ EM28XX_LED_DIGITAL_CAPTURING_TS2, - EM28XX_LED_ILLUMINATION, - EM28XX_NUM_LED_ROLES, /* must be the last */ - }; -@@ -458,6 +463,7 @@ - unsigned int mts_firmware:1; - unsigned int max_range_640_480:1; - unsigned int has_dvb:1; -+ unsigned int has_dual_ts:1; - unsigned int is_webcam:1; - unsigned int valid:1; - unsigned int has_ir_i2c:1; -@@ -608,7 +614,6 @@ - struct em28xx_IR *ir; - - /* generic device properties */ -- char name[30]; /* name (including minor) of the device */ - int model; /* index in the device_data struct */ - int devno; /* marks the number of this device */ - enum em28xx_chip_id chip_id; -@@ -619,6 +624,7 @@ - unsigned int is_audio_only:1; - enum em28xx_int_audio_type int_audio_type; - enum em28xx_usb_audio_type usb_audio_type; -+ unsigned char name[32]; - - struct em28xx_board board; - -@@ -677,9 +683,12 @@ - - /* usb transfer */ - struct usb_device *udev; /* the usb device */ -+ struct usb_interface *intf; // the usb interface - u8 ifnum; /* number of the assigned usb interface */ - u8 analog_ep_isoc; /* address of isoc endpoint for analog */ - u8 analog_ep_bulk; /* address of bulk endpoint for analog */ -+ u8 dvb_ep_isoc_ts2; /* address of isoc endpoint for DVB TS2*/ -+ u8 dvb_ep_bulk_ts2; /* address of bulk endpoint for DVB TS2*/ - u8 dvb_ep_isoc; /* address of isoc endpoint for DVB */ - u8 dvb_ep_bulk; /* address of bulk endpoint for DVB */ - int alt; /* alternate setting */ -@@ -693,6 +702,8 @@ - int dvb_alt_isoc; /* alternate setting for DVB isoc transfers */ - unsigned int dvb_max_pkt_size_isoc; /* isoc max packet size of the - selected DVB ep at dvb_alt */ -+ unsigned int dvb_max_pkt_size_isoc_ts2; /* isoc max packet size of the -+ selected DVB ep at dvb_alt */ - unsigned int dvb_xfer_bulk:1; /* use bulk instead of isoc - transfers for DVB */ - char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ -@@ -718,6 +729,15 @@ - /* Snapshot button input device */ - char snapshot_button_path[30]; /* path of the input dev */ - struct input_dev *sbutton_input_dev; -+ -+#ifdef CONFIG_MEDIA_CONTROLLER -+ struct media_device *media_dev; -+ struct media_entity input_ent[MAX_EM28XX_INPUT]; -+ struct media_pad input_pad[MAX_EM28XX_INPUT]; -+#endif -+ -+ struct em28xx *dev_next; -+ int ts; - }; - - #define kref_to_dev(d) container_of(d, struct em28xx, ref) -diff -Nur a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c ---- a/drivers/media/usb/em28xx/em28xx-cards.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-cards.c 2019-04-02 08:43:27.288403900 +0200 -@@ -491,6 +491,30 @@ - {-1, -1, -1, -1}, - }; - -+/* 2040:0265 Hauppauge WinTV-dualHD DVB Isoc -+ * 2040:8265 Hauppauge WinTV-dualHD DVB Bulk -+ * reg 0x80/0x84: -+ * GPIO_0: Yellow LED tuner 1, 0=on, 1=off -+ * GPIO_1: Green LED tuner 1, 0=on, 1=off -+ * GPIO_2: Yellow LED tuner 2, 0=on, 1=off -+ * GPIO_3: Green LED tuner 2, 0=on, 1=off -+ * GPIO_5: Reset #2, 0=active -+ * GPIO_6: Reset #1, 0=active -+ */ -+static struct em28xx_reg_seq hauppauge_dualhd_dvb[] = { -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, -+ {0x0d, 0xff, 0xff, 200}, -+ {0x50, 0x04, 0xff, 300}, -+ {EM2874_R80_GPIO_P0_CTRL, 0xbf, 0xff, 100}, /* demod 1 reset */ -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, -+ {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */ -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, -+ {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50}, -+ {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50}, -+ {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50}, -+ {-1, -1, -1, -1}, -+}; -+ - /* - * Button definitions - */ -@@ -560,6 +584,22 @@ - {-1, 0, 0, 0}, - }; - -+static struct em28xx_led hauppauge_dualhd_leds[] = { -+ { -+ .role = EM28XX_LED_DIGITAL_CAPTURING, -+ .gpio_reg = EM2874_R80_GPIO_P0_CTRL, -+ .gpio_mask = EM_GPIO_1, -+ .inverted = 1, -+ }, -+ { -+ .role = EM28XX_LED_DIGITAL_CAPTURING_TS2, -+ .gpio_reg = EM2874_R80_GPIO_P0_CTRL, -+ .gpio_mask = EM_GPIO_3, -+ .inverted = 1, -+ }, -+ {-1, 0, 0, 0}, -+}; -+ - /* - * Board definitions - */ -@@ -2288,6 +2328,20 @@ - .has_dvb = 1, - .ir_codes = RC_MAP_TERRATEC_SLIM_2, - }, -+ /* 2040:0265 Hauppauge WinTV-dualHD (DVB version) Isoc. -+ * 2040:8265 Hauppauge WinTV-dualHD (DVB version) Bulk. -+ * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157 */ -+ [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = { -+ .name = "Hauppauge WinTV-dualHD DVB", -+ .def_i2c_bus = 1, -+ .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, -+ .tuner_type = TUNER_ABSENT, -+ .tuner_gpio = hauppauge_dualhd_dvb, -+ .has_dvb = 1, -+ .has_dual_ts = 1, -+ .ir_codes = RC_MAP_HAUPPAUGE, -+ .leds = hauppauge_dualhd_leds, -+ }, - }; - EXPORT_SYMBOL_GPL(em28xx_boards); - -@@ -2411,6 +2465,10 @@ - .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, - { USB_DEVICE(0x2040, 0x651f), - .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, -+ { USB_DEVICE(0x2040, 0x0265), -+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, -+ { USB_DEVICE(0x2040, 0x8265), -+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, - { USB_DEVICE(0x0438, 0xb002), - .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, - { USB_DEVICE(0x2001, 0xf112), -@@ -2804,6 +2862,7 @@ - case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: - case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: - case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: -+ case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: - { - struct tveeprom tv; - -@@ -3013,6 +3072,8 @@ - */ - static void em28xx_release_resources(struct em28xx *dev) - { -+ struct usb_device *udev = interface_to_usbdev(dev->intf); -+ - /*FIXME: I2C IR should be disconnected */ - - mutex_lock(&dev->lock); -@@ -3021,7 +3082,8 @@ - em28xx_i2c_unregister(dev, 1); - em28xx_i2c_unregister(dev, 0); - -- usb_put_dev(dev->udev); -+ if (dev->ts == PRIMARY_TS) -+ usb_put_dev(udev); - - /* Mark device as unused */ - clear_bit(dev->devno, em28xx_devused); -@@ -3063,6 +3125,7 @@ - const char *chip_name = default_chip_name; - - dev->udev = udev; -+ dev->intf = interface; - mutex_init(&dev->ctrl_urb_lock); - spin_lock_init(&dev->slock); - -@@ -3220,6 +3283,35 @@ - return 0; - } - -+int em28xx_duplicate_dev(struct em28xx *dev) -+{ -+ int nr; -+ struct em28xx *sec_dev = kzalloc(sizeof(*sec_dev), GFP_KERNEL); -+ -+ if (sec_dev == NULL) { -+ dev->dev_next = NULL; -+ return -ENOMEM; -+ } -+ memcpy(sec_dev, dev, sizeof(sizeof(*sec_dev))); -+ /* Check to see next free device and mark as used */ -+ do { -+ nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS); -+ if (nr >= EM28XX_MAXBOARDS) { -+ /* No free device slots */ -+ printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", -+ EM28XX_MAXBOARDS); -+ kfree(sec_dev); -+ dev->dev_next = NULL; -+ return -ENOMEM; -+ } -+ } while (test_and_set_bit(nr, em28xx_devused)); -+ sec_dev->devno = nr; -+ snprintf(sec_dev->name, 28, "em28xx #%d", nr); -+ sec_dev->dev_next = NULL; -+ dev->dev_next = sec_dev; -+ return 0; -+} -+ - /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */ - #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03)) - -@@ -3340,6 +3432,17 @@ - } - } - break; -+ case 0x85: -+ if (usb_endpoint_xfer_isoc(e)) { -+ if (size > dev->dvb_max_pkt_size_isoc_ts2) { -+ dev->dvb_ep_isoc_ts2 = e->bEndpointAddress; -+ dev->dvb_max_pkt_size_isoc_ts2 = size; -+ dev->dvb_alt_isoc = i; -+ } -+ } else { -+ dev->dvb_ep_bulk_ts2 = e->bEndpointAddress; -+ } -+ break; - } - } - /* NOTE: -@@ -3354,6 +3457,8 @@ - * 0x83 isoc* => audio - * 0x84 isoc => digital - * 0x84 bulk => analog or digital** -+ * 0x85 isoc => digital TS2 -+ * 0x85 bulk => digital TS2 - * (*: audio should always be isoc) - * (**: analog, if ep 0x82 is isoc, otherwise digital) - * -@@ -3422,6 +3527,10 @@ - dev->has_video = has_video; - dev->ifnum = ifnum; - -+ dev->ts = PRIMARY_TS; -+ snprintf(dev->name, 28, "em28xx"); -+ dev->dev_next = NULL; -+ - if (has_vendor_audio) { - printk(KERN_INFO DRIVER_NAME ": Audio interface %i found %s\n", - ifnum, "(Vendor Class)"); -@@ -3491,6 +3600,65 @@ - dev->dvb_xfer_bulk ? "bulk" : "isoc"); - } - -+ if (dev->board.has_dual_ts && em28xx_duplicate_dev(dev) == 0) { -+ dev->dev_next->ts = SECONDARY_TS; -+ dev->dev_next->alt = -1; -+ dev->dev_next->is_audio_only = has_vendor_audio && -+ !(has_video || has_dvb); -+ dev->dev_next->has_video = false; -+ dev->dev_next->ifnum = ifnum; -+ dev->dev_next->model = id->driver_info; -+ -+ mutex_init(&dev->dev_next->lock); -+ retval = em28xx_init_dev(dev->dev_next, udev, interface, -+ dev->dev_next->devno); -+ if (retval) -+ goto err_free; -+ -+ dev->dev_next->board.ir_codes = NULL; /* No IR for 2nd tuner */ -+ dev->dev_next->board.has_ir_i2c = 0; /* No IR for 2nd tuner */ -+ -+ if (usb_xfer_mode < 0) { -+ if (dev->dev_next->board.is_webcam) -+ try_bulk = 1; -+ else -+ try_bulk = 0; -+ } else { -+ try_bulk = usb_xfer_mode > 0; -+ } -+ -+ /* Select USB transfer types to use */ -+ if (has_dvb) { -+ if (!dev->dvb_ep_isoc_ts2 || -+ (try_bulk && dev->dvb_ep_bulk_ts2)) -+ dev->dev_next->dvb_xfer_bulk = 1; -+ printk(DRIVER_NAME "dvb ts2 set to %s mode.\n", -+ dev->dev_next->dvb_xfer_bulk ? "bulk" : "isoc"); -+ } -+ -+ dev->dev_next->dvb_ep_isoc = dev->dvb_ep_isoc_ts2; -+ dev->dev_next->dvb_ep_bulk = dev->dvb_ep_bulk_ts2; -+ dev->dev_next->dvb_max_pkt_size_isoc = dev->dvb_max_pkt_size_isoc_ts2; -+ dev->dev_next->dvb_alt_isoc = dev->dvb_alt_isoc; -+ -+ /* Configuare hardware to support TS2*/ -+ if (dev->dvb_xfer_bulk) { -+ /* The ep4 and ep5 are configuared for BULK */ -+ em28xx_write_reg(dev, 0x0b, 0x96); -+ mdelay(100); -+ em28xx_write_reg(dev, 0x0b, 0x80); -+ mdelay(100); -+ } else { -+ /* The ep4 and ep5 are configuared for ISO */ -+ em28xx_write_reg(dev, 0x0b, 0x96); -+ mdelay(100); -+ em28xx_write_reg(dev, 0x0b, 0x82); -+ mdelay(100); -+ } -+ -+ kref_init(&dev->dev_next->ref); -+ } -+ - kref_init(&dev->ref); - - request_modules(dev); -@@ -3528,6 +3696,13 @@ - if (!dev) - return; - -+ if (dev->dev_next != NULL) { -+ dev->dev_next->disconnected = 1; -+ printk(DRIVER_NAME "Disconnecting %s\n", -+ dev->dev_next->name); -+ flush_request_modules(dev->dev_next); -+ } -+ - dev->disconnected = 1; - - em28xx_info("Disconnecting %s\n", dev->name); -@@ -3536,7 +3711,14 @@ - - em28xx_close_extension(dev); - -+ if (dev->dev_next != NULL) -+ em28xx_release_resources(dev->dev_next); - em28xx_release_resources(dev); -+ -+ if (dev->dev_next != NULL) { -+ kref_put(&dev->dev_next->ref, em28xx_free_device); -+ dev->dev_next = NULL; -+ } - kref_put(&dev->ref, em28xx_free_device); - } - -diff -Nur a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c ---- a/drivers/media/usb/em28xx/em28xx-core.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-core.c 2019-04-02 08:30:40.204091800 +0200 -@@ -636,10 +636,19 @@ - dev->chip_id == CHIP_ID_EM28174 || - dev->chip_id == CHIP_ID_EM28178) { - /* The Transport Stream Enable Register moved in em2874 */ -- rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, -- start ? -- EM2874_TS1_CAPTURE_ENABLE : 0x00, -- EM2874_TS1_CAPTURE_ENABLE); -+ if (dev->ts == PRIMARY_TS) { -+ rc = em28xx_write_reg_bits(dev, -+ EM2874_R5F_TS_ENABLE, -+ start ? -+ EM2874_TS1_CAPTURE_ENABLE : 0x00, -+ EM2874_TS1_CAPTURE_ENABLE); -+ } else { -+ rc = em28xx_write_reg_bits(dev, -+ EM2874_R5F_TS_ENABLE, -+ start ? -+ EM2874_TS2_CAPTURE_ENABLE : 0x00, -+ EM2874_TS2_CAPTURE_ENABLE); -+ } - } else { - /* FIXME: which is the best order? */ - /* video registers are sampled by VREF */ -@@ -1073,7 +1082,11 @@ - mutex_lock(&em28xx_devlist_mutex); - list_add_tail(&ops->next, &em28xx_extension_devlist); - list_for_each_entry(dev, &em28xx_devlist, devlist) { -- ops->init(dev); -+ if (ops->init) { -+ ops->init(dev); -+ if (dev->dev_next != NULL) -+ ops->init(dev->dev_next); -+ } - } - mutex_unlock(&em28xx_devlist_mutex); - printk(KERN_INFO "em28xx: Registered (%s) extension\n", ops->name); -@@ -1087,7 +1100,11 @@ - - mutex_lock(&em28xx_devlist_mutex); - list_for_each_entry(dev, &em28xx_devlist, devlist) { -- ops->fini(dev); -+ if (ops->fini) { -+ if (dev->dev_next != NULL) -+ ops->fini(dev->dev_next); -+ ops->fini(dev); -+ } - } - list_del(&ops->next); - mutex_unlock(&em28xx_devlist_mutex); -@@ -1102,8 +1119,11 @@ - mutex_lock(&em28xx_devlist_mutex); - list_add_tail(&dev->devlist, &em28xx_devlist); - list_for_each_entry(ops, &em28xx_extension_devlist, next) { -- if (ops->init) -- ops->init(dev); -+ if (ops->init) { -+ ops->init(dev); -+ if (dev->dev_next != NULL) -+ ops->init(dev->dev_next); -+ } - } - mutex_unlock(&em28xx_devlist_mutex); - } -@@ -1114,8 +1134,11 @@ - - mutex_lock(&em28xx_devlist_mutex); - list_for_each_entry(ops, &em28xx_extension_devlist, next) { -- if (ops->fini) -- ops->fini(dev); -+ if (ops->fini) { -+ if (dev->dev_next != NULL) -+ ops->fini(dev->dev_next); -+ ops->fini(dev); -+ } - } - list_del(&dev->devlist); - mutex_unlock(&em28xx_devlist_mutex); -@@ -1130,6 +1153,8 @@ - list_for_each_entry(ops, &em28xx_extension_devlist, next) { - if (ops->suspend) - ops->suspend(dev); -+ if (dev->dev_next != NULL) -+ ops->suspend(dev->dev_next); - } - mutex_unlock(&em28xx_devlist_mutex); - return 0; -@@ -1144,6 +1169,8 @@ - list_for_each_entry(ops, &em28xx_extension_devlist, next) { - if (ops->resume) - ops->resume(dev); -+ if (dev->dev_next != NULL) -+ ops->resume(dev->dev_next); - } - mutex_unlock(&em28xx_devlist_mutex); - return 0; -diff -Nur a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c ---- a/drivers/media/usb/em28xx/em28xx-dvb.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-dvb.c 2019-04-02 08:30:40.206087100 +0200 -@@ -211,7 +211,6 @@ - dvb_alt = dev->dvb_alt_isoc; - } - -- usb_set_interface(dev->udev, dev->ifnum, dvb_alt); - rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); - if (rc < 0) - return rc; -@@ -1031,8 +1030,9 @@ - - static int em28xx_dvb_init(struct em28xx *dev) - { -- int result = 0; -+ int result = 0, dvb_alt = 0; - struct em28xx_dvb *dvb; -+ struct usb_device *udev; - - if (dev->is_audio_only) { - /* Shouldn't initialize IR for this interface */ -@@ -1726,6 +1726,76 @@ - dvb->i2c_client_tuner = client; - } - break; -+ case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: -+ { -+ struct i2c_adapter *adapter; -+ struct i2c_client *client; -+ struct i2c_board_info info; -+ struct si2168_config si2168_config; -+ struct si2157_config si2157_config; -+ -+ /* attach demod */ -+ memset(&si2168_config, 0, sizeof(si2168_config)); -+ si2168_config.i2c_adapter = &adapter; -+ si2168_config.fe = &dvb->fe[0]; -+ si2168_config.ts_mode = SI2168_TS_SERIAL; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2168", I2C_NAME_SIZE); -+ if (dev->ts == PRIMARY_TS) -+ info.addr = 0x64; -+ else -+ info.addr = 0x67; -+ info.platform_data = &si2168_config; -+ request_module(info.type); -+ client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info); -+ if (client == NULL || client->dev.driver == NULL) { -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ if (!try_module_get(client->dev.driver->owner)) { -+ i2c_unregister_device(client); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ dvb->i2c_client_demod = client; -+ -+ /* attach tuner */ -+ memset(&si2157_config, 0, sizeof(si2157_config)); -+ si2157_config.fe = dvb->fe[0]; -+ si2157_config.if_port = 1; -+#ifdef CONFIG_MEDIA_CONTROLLER_DVB -+ si2157_config.mdev = dev->media_dev; -+#endif -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2157", I2C_NAME_SIZE); -+ if (dev->ts == PRIMARY_TS) -+ info.addr = 0x60; -+ else -+ info.addr = 0x63; -+ info.platform_data = &si2157_config; -+ request_module(info.type); -+ client = i2c_new_device(adapter, &info); -+ if (client == NULL || client->dev.driver == NULL) { -+ module_put(dvb->i2c_client_demod->dev.driver->owner); -+ i2c_unregister_device(dvb->i2c_client_demod); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ if (!try_module_get(client->dev.driver->owner)) { -+ i2c_unregister_device(client); -+ module_put(dvb->i2c_client_demod->dev.driver->owner); -+ i2c_unregister_device(dvb->i2c_client_demod); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ dvb->i2c_client_tuner = client; -+ -+ } -+ break; - default: - em28xx_errdev("/2: The frontend of your DVB/ATSC card" - " isn't supported yet\n"); -@@ -1747,6 +1817,14 @@ - if (result < 0) - goto out_free; - -+ if (dev->dvb_xfer_bulk) { -+ dvb_alt = 0; -+ } else { /* isoc */ -+ dvb_alt = dev->dvb_alt_isoc; -+ } -+ -+ udev = interface_to_usbdev(dev->intf); -+ usb_set_interface(udev, dev->ifnum, dvb_alt); - em28xx_info("DVB extension successfully initialized\n"); - - kref_get(&dev->ref); -diff -Nur a/drivers/media/usb/em28xx/em28xx-reg.h b/drivers/media/usb/em28xx/em28xx-reg.h ---- a/drivers/media/usb/em28xx/em28xx-reg.h 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-reg.h 2019-04-02 08:30:40.209080400 +0200 -@@ -193,6 +193,19 @@ - /* em2874 registers */ - #define EM2874_R50_IR_CONFIG 0x50 - #define EM2874_R51_IR 0x51 -+#define EM2874_R5D_TS1_PKT_SIZE 0x5d -+#define EM2874_R5E_TS2_PKT_SIZE 0x5e -+ /* -+ * For both TS1 and TS2, In isochronous mode: -+ * 0x01 188 bytes -+ * 0x02 376 bytes -+ * 0x03 564 bytes -+ * 0x04 752 bytes -+ * 0x05 940 bytes -+ * In bulk mode: -+ * 0x01..0xff total packet count in 188-byte -+ */ -+ - #define EM2874_R5F_TS_ENABLE 0x5f - - /* em2874/174/84, em25xx, em276x/7x/8x GPIO registers */ diff --git a/archive-patches/armbox/hd60/defconfig b/archive-patches/armbox/hd60/defconfig deleted file mode 100644 index ddcdbb9..0000000 --- a/archive-patches/armbox/hd60/defconfig +++ /dev/null @@ -1,4537 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 4.4.35 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_NEED_MACH_IO_H=y -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -# CONFIG_COMPILE_TEST is not set -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_KERNEL_GZIP=y -# CONFIG_KERNEL_LZMA is not set -# CONFIG_KERNEL_XZ is not set -# CONFIG_KERNEL_LZO is not set -# CONFIG_KERNEL_LZ4 is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_FHANDLE is not set -CONFIG_USELIB=y -# CONFIG_AUDIT is not set - -# -# IRQ subsystem -# -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_HANDLE_DOMAIN_IRQ=y -# CONFIG_IRQ_DOMAIN_DEBUG is not set -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -# CONFIG_NO_HZ_FULL is not set -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_SCHED_WALT is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_RCU=y -# CONFIG_RCU_EXPERT is not set -CONFIG_SRCU=y -# CONFIG_TASKS_RCU is not set -CONFIG_RCU_STALL_COMMON=y -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_EXPEDITE_BOOT is not set -# CONFIG_BUILD_BIN2C is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_GENERIC_SCHED_CLOCK=y -# CONFIG_CGROUPS is not set -# CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -# CONFIG_USER_NS is not set -CONFIG_PID_NS=y -CONFIG_NET_NS=y -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SCHED_TUNE is not set -# CONFIG_DEFAULT_USE_ENERGY_AWARE is not set -# CONFIG_SYSFS_DEPRECATED is not set -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_RD_XZ=y -CONFIG_RD_LZO=y -CONFIG_RD_LZ4=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_BPF=y -# CONFIG_EXPERT is not set -CONFIG_UID16=y -CONFIG_MULTIUSER=y -# CONFIG_SGETMASK_SYSCALL is not set -CONFIG_SYSFS_SYSCALL=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -# CONFIG_BPF_SYSCALL is not set -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_ADVISE_SYSCALLS=y -# CONFIG_USERFAULTFD is not set -CONFIG_PCI_QUIRKS=y -CONFIG_MEMBARRIER=y -# CONFIG_EMBEDDED is not set -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLAB is not set -CONFIG_SLUB=y -CONFIG_SLUB_CPU_PARTIAL=y -# CONFIG_SYSTEM_DATA_VERIFICATION is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_KPROBES is not set -# CONFIG_JUMP_LABEL is not set -# CONFIG_UPROBES is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_CC_STACKPROTECTOR=y -# CONFIG_CC_STACKPROTECTOR is not set -CONFIG_CC_STACKPROTECTOR_NONE=y -# CONFIG_CC_STACKPROTECTOR_REGULAR is not set -# CONFIG_CC_STACKPROTECTOR_STRONG is not set -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_ARCH_MMAP_RND_BITS_MIN=8 -CONFIG_ARCH_MMAP_RND_BITS_MAX=16 -CONFIG_ARCH_MMAP_RND_BITS=8 -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_BLK_DEV_BSG=y -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set -CONFIG_BLK_CMDLINE_PARSER=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_AIX_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set -CONFIG_CMDLINE_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_S40 is not set -# CONFIG_ARCH_HI3716MV420N is not set -# CONFIG_ARCH_HI3716MV430 is not set -# CONFIG_ARCH_HI3798MX is not set -# CONFIG_ARCH_HI3798CV2X is not set -CONFIG_ARCH_HI3798MV2X=y -# CONFIG_ARCH_HI3798MV310 is not set -# CONFIG_ARCH_HI3796MV2X is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -CONFIG_DEFAULT_UART_BASE_ADDR=0xF8B00000 -CONFIG_DEFAULT_VMALLOC_SIZE=500 - -# -# HI3798MV2X board feature -# -CONFIG_MACH_HI3798MV2X=y -CONFIG_HAVE_SP804_LOCAL_TIMER_HI3798MV2X=y -# CONFIG_HAVE_ARM_LOCAL_TIMER_HI3798MV2X is not set -# CONFIG_HI3798MV2X_FPGA is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -# CONFIG_ARM_THUMBEE is not set -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -CONFIG_VDSO=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -# CONFIG_ARM_KERNMEM_PERMS is not set -CONFIG_MULTI_IRQ_HANDLER=y -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_773022 is not set - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_DOMAINS_GENERIC is not set -CONFIG_PCI_SYSCALL=y -# CONFIG_PCI_MSI is not set -# CONFIG_PCI_DEBUG is not set -# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set -# CONFIG_PCI_STUB is not set -# CONFIG_PCI_IOV is not set -# CONFIG_PCI_PRI is not set -# CONFIG_PCI_PASID is not set - -# -# PCI host controller drivers -# -CONFIG_PCIE_DW=y -# CONFIG_PCI_HOST_GENERIC is not set -# CONFIG_PCI_LAYERSCAPE is not set -# CONFIG_PCIE_IPROC is not set -# CONFIG_PCIE_ALTERA is not set -CONFIG_PCIEPORTBUS=y -CONFIG_PCIEAER=y -# CONFIG_PCIE_ECRC is not set -# CONFIG_PCIEAER_INJECT is not set -CONFIG_PCIEASPM=y -# CONFIG_PCIEASPM_DEBUG is not set -CONFIG_PCIEASPM_DEFAULT=y -# CONFIG_PCIEASPM_POWERSAVE is not set -# CONFIG_PCIEASPM_PERFORMANCE is not set -CONFIG_PCIE_PME=y -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -CONFIG_HAVE_ARM_ARCH_TIMER=y -# CONFIG_MCPM is not set -# CONFIG_BIG_LITTLE is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_ARCH_NR_GPIO=0 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_HZ_FIXED=0 -# CONFIG_HZ_100 is not set -# CONFIG_HZ_200 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_300 is not set -# CONFIG_HZ_500 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_CPU_SW_DOMAIN_PAN=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -# CONFIG_ARM_MODULE_PLTS is not set -CONFIG_VM_MIN_FREE_KBYTES=0 -CONFIG_VM_OVERCOMMIT_GUESS=0 -CONFIG_VM_DIRTY_RATIO=20 -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_COMPACTION is not set -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_CMA=y -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=7 -# CONFIG_ZPOOL is not set -# CONFIG_ZBUD is not set -# CONFIG_ZSMALLOC is not set -# CONFIG_IDLE_PAGE_TRACKING is not set -CONFIG_FRAME_VECTOR=y -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -# CONFIG_SECCOMP is not set -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_XEN is not set -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -CONFIG_USE_OF=y -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="hi3798mv200" -CONFIG_ZBOOT_ROM_TEXT=0x00008000 -CONFIG_ZBOOT_ROM_BSS=0x00008000 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y -CONFIG_CMDLINE="mem=128M console=ttyAMA0,115200 console=ttyMTD,blackbox" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHED is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -# CONFIG_CPU_FREQ_GOV_SCHED is not set - -# -# CPU frequency scaling drivers -# -# CONFIG_CPUFREQ_DT is not set -# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Hisilicon CPU frequency scaling config -# -CONFIG_MICRO_FREQUENCY_UP_THRESHOLD=95 -CONFIG_DEFAULT_GO_HISPEED_LOAD=99 -CONFIG_DEFAULT_TARGET_LOAD=90 -# CONFIG_QORIQ_CPUFREQ is not set - -# -# CPU Idle -# -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_NEON=y -CONFIG_KERNEL_MODE_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_WAKELOCK=y -# CONFIG_HIBERNATION is not set -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -# CONFIG_PM_AUTOSLEEP is not set -# CONFIG_PM_WAKELOCKS is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -# CONFIG_PM_ADVANCED_DEBUG is not set -CONFIG_PM_SLEEP_DEBUG=y -CONFIG_APM_EMULATION=y -CONFIG_PM_OPP=y -CONFIG_PM_CLK=y -# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set -CONFIG_CPU_PM=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_NET_INGRESS=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=m -# CONFIG_IP_MROUTE is not set -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_NET_UDP_TUNNEL=m -# CONFIG_NET_FOU is not set -# CONFIG_NET_FOU_IP_TUNNELS is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_LRO=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_INET_DIAG_DESTROY is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_ROUTER_PREF=y -# CONFIG_IPV6_ROUTE_INFO is not set -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_IPV6_MIP6 is not set -# CONFIG_IPV6_ILA is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -# CONFIG_IPV6_VTI is not set -CONFIG_IPV6_SIT=m -# CONFIG_IPV6_SIT_6RD is not set -CONFIG_IPV6_NDISC_NODETYPE=y -# CONFIG_IPV6_TUNNEL is not set -# CONFIG_IPV6_GRE is not set -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_IPV6_MROUTE is not set -# CONFIG_ANDROID_PARANOID_NETWORK is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NET_PTP_CLASSIFY is not set -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_INGRESS=y -CONFIG_NETFILTER_NETLINK=y -CONFIG_NETFILTER_NETLINK_ACCT=y -CONFIG_NETFILTER_NETLINK_QUEUE=y -# CONFIG_NETFILTER_NETLINK_LOG is not set -# CONFIG_NF_CONNTRACK is not set -# CONFIG_NF_TABLES is not set -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -# CONFIG_NETFILTER_XT_MARK is not set - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set -# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set -# CONFIG_NETFILTER_XT_MATCH_L2TP is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_MAC is not set -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_RECENT is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_TIME is not set -# CONFIG_NETFILTER_XT_MATCH_U32 is not set -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV4 is not set -# CONFIG_NF_DUP_IPV4 is not set -# CONFIG_NF_LOG_ARP is not set -# CONFIG_NF_LOG_IPV4 is not set -# CONFIG_NF_REJECT_IPV4 is not set -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_TTL is not set -# CONFIG_IP_NF_FILTER is not set -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_RAW is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV6 is not set -# CONFIG_NF_DUP_IPV6 is not set -# CONFIG_NF_REJECT_IPV6 is not set -# CONFIG_NF_LOG_IPV6 is not set -# CONFIG_IP6_NF_IPTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -# CONFIG_BRIDGE is not set -CONFIG_HAVE_NET_DSA=y -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_6LOWPAN is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set -CONFIG_DNS_RESOLVER=y -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -# CONFIG_MPLS is not set -# CONFIG_HSR is not set -# CONFIG_NET_SWITCHDEV is not set -# CONFIG_NET_L3_MASTER_DEV is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -CONFIG_NET_RX_BUSY_POLL=y -CONFIG_BQL=y -# CONFIG_BPF_JIT is not set -CONFIG_NET_FLOW_LIMIT=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_BREDR=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -# CONFIG_BT_BNEP_MC_FILTER is not set -# CONFIG_BT_BNEP_PROTO_FILTER is not set -CONFIG_BT_HIDP=m -CONFIG_BT_HS=y -CONFIG_BT_LE=y -CONFIG_BT_SELFTEST=y -CONFIG_BT_SELFTEST_ECDH=y -CONFIG_BT_SELFTEST_SMP=y -CONFIG_BT_DEBUGFS=y - -# -# Bluetooth device drivers -# -CONFIG_BT_INTEL=m -CONFIG_BT_BCM=m -CONFIG_BT_RTL=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTUSB_BCM=y -CONFIG_BT_HCIBTUSB_RTL=y -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIUART_3WIRE=y -CONFIG_BT_HCIUART_INTEL=y -CONFIG_BT_HCIUART_BCM=y -# CONFIG_BT_HCIUART_QCA is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -CONFIG_BT_HCIVHCI=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -# CONFIG_BT_ATH3K is not set -# CONFIG_AF_RXRPC is not set -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_SPY=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=m -# CONFIG_NL80211_TESTMODE is not set -# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set -# CONFIG_CFG80211_REG_DEBUG is not set -CONFIG_CFG80211_DEFAULT_PS=y -# CONFIG_CFG80211_DEBUGFS is not set -# CONFIG_CFG80211_INTERNAL_REGDB is not set -CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_CFG80211_WEXT=y -CONFIG_LIB80211=m -CONFIG_LIB80211_CRYPT_WEP=m -CONFIG_LIB80211_CRYPT_CCMP=m -CONFIG_LIB80211_CRYPT_TKIP=m -# CONFIG_LIB80211_DEBUG is not set -CONFIG_MAC80211=m -CONFIG_MAC80211_HAS_RC=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_MAC80211_RC_MINSTREL_HT=y -# CONFIG_MAC80211_RC_MINSTREL_VHT is not set -CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y -CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" -CONFIG_MAC80211_MESH=y -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_MESSAGE_TRACING is not set -# CONFIG_MAC80211_DEBUG_MENU is not set -CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -CONFIG_WIMAX=m -CONFIG_WIMAX_DEBUG_LEVEL=8 -CONFIG_RFKILL=y -CONFIG_RFKILL_LEDS=y -CONFIG_RFKILL_INPUT=y -# CONFIG_RFKILL_REGULATOR is not set -# CONFIG_RFKILL_GPIO is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_LWTUNNEL is not set -CONFIG_HAVE_BPF_JIT=y - -# -# Device Drivers -# - -# -# Hisilicon driver support -# -# CONFIG_VIRTUAL_INPUT is not set -CONFIG_HISI_DEBUG_UART_PHYS=0xF8B00000 -CONFIG_HISI_DEBUG_UART_VIRT=0xF9B00000 -CONFIG_PCIE_HISILICON=y -CONFIG_PCIE_PME_IRQ=0xa2 -CONFIG_PCIE_DMA_SIZE_READ=0x0 -CONFIG_PCIE_DMA_SIZE_WRITE=0x0 -# CONFIG_PCIE_RESET is not set -# CONFIG_GPIO_PCIE_POWER_EN_SUPPORT is not set - -# -# Hisilicon IR drivers -# -# CONFIG_HISI_IR is not set -CONFIG_SUPPORT_SRAM_MANAGER=y -CONFIG_SRAM_PHYS_START=0xFFFF2800 -CONFIG_SRAM_PHYS_SIZE=0x00002800 -CONFIG_TIMER_HISP804=y -CONFIG_TIMER_HIFIXTIMER=y -CONFIG_MTD_BLOCK_ROMBLOCK=y -CONFIG_PART_CHANGE=y - -# -# Hisilicon CPU frequency scaling config -# -CONFIG_HI_I2C=y -# CONFIG_PAGEALLOC_LOCK is not set -# CONFIG_SUPPORT_DSP_RUN_MEM is not set -# CONFIG_SUPPORT_ATF_MEM is not set -# CONFIG_SUPPORT_SMCU_MEM is not set -# CONFIG_HISI_EXT4_TMP_QUIRK is not set -# CONFIG_SUPPORT_CA is not set -# CONFIG_CA_FILE_AUTHORITY is not set -# CONFIG_CA_NET_CONFIG is not set -# CONFIG_CMA_MEM_SHARED is not set -# CONFIG_CMA_ADVANCE_SHARE is not set -# CONFIG_USB_OTG_HISI is not set -# CONFIG_CPU_IDLE_HI3798MV2X is not set -# CONFIG_TEE is not set -CONFIG_DEVFREQ_GOV_GPU_ONDEMAND=y -# CONFIG_DEVFREQ_GOV_MIDGARD_ONDEMAND is not set -CONFIG_REGULATOR=y -# CONFIG_REGULATOR_HI3798CV200 is not set -CONFIG_REGULATOR_HI3798MV200=y -# CONFIG_REGULATOR_HI3798MV310 is not set -# CONFIG_REGULATOR_HI3796MV200 is not set -# CONFIG_HASH_VRF_DEV is not set - -# -# Hisilicon thermal drivers -# -# CONFIG_HISI_THERMAL is not set -CONFIG_ARM_AMBA=y -# CONFIG_TEGRA_AHB is not set - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_WANT_DEV_COREDUMP=y -CONFIG_ALLOW_DEV_COREDUMP=y -CONFIG_DEV_COREDUMP=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_FENCE_TRACE is not set -CONFIG_DMA_CMA=y - -# -# Default contiguous memory area size: -# -CONFIG_CMA_SIZE_MBYTES=4 -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_ALIGNMENT=8 - -# -# Bus devices -# -# CONFIG_ARM_CCI400_PMU is not set -# CONFIG_ARM_CCI500_PMU is not set -# CONFIG_ARM_CCN is not set -# CONFIG_BRCMSTB_GISB_ARB is not set -# CONFIG_VEXPRESS_CONFIG is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_TESTS is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set -# CONFIG_MTD_PARTITIONED_MASTER is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_INTEL_VR_NOR is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLOCK2MTD=y - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -# CONFIG_MTD_HISFC350 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI_PCI is not set -# CONFIG_MTD_NAND_DENALI_DT is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set -# CONFIG_MTD_NAND_RICOH is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_NANDSIM is not set -# CONFIG_MTD_NAND_BRCMNAND is not set -# CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_NAND_HISI504 is not set -# CONFIG_MTD_NAND_HINFC610 is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR & LPDDR2 PCM memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_LPDDR2_NVM is not set -# CONFIG_MTD_SPI_NOR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=128 -CONFIG_MTD_UBI_BEB_LIMIT=20 -CONFIG_MTD_UBI_FASTMAP=y -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_MTD_UBI_BLOCK is not set -CONFIG_MTD_HIFMC100=y -CONFIG_MTD_HIFMC100_SPINOR=y -CONFIG_MTD_HIFMC100_SPINAND=y -CONFIG_MTD_HIFMC100_NAND=y -CONFIG_DTC=y -CONFIG_OF=y -# CONFIG_OF_UNITTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_IRQ=y -CONFIG_OF_NET=y -CONFIG_OF_MDIO=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_NULL_BLK is not set -# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set -# CONFIG_BLK_DEV_RSXX is not set -# CONFIG_BLK_DEV_NVME is not set - -# -# Misc devices -# -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_PHANTOM is not set -# CONFIG_SGI_IOC4 is not set -# CONFIG_TIFM_CORE is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_HP_ILO is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_UID_CPUTIME is not set -# CONFIG_MEMORY_STATE_TIME is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -CONFIG_EEPROM_93CX6=m -# CONFIG_EEPROM_93XX46 is not set -# CONFIG_CB710_CORE is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set - -# -# Intel MIC Bus Driver -# - -# -# SCIF Bus Driver -# - -# -# Intel MIC Host Driver -# - -# -# Intel MIC Card Driver -# - -# -# SCIF Driver -# - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# -# CONFIG_ECHO is not set -# CONFIG_CXL_BASE is not set -# CONFIG_CXL_KERNEL_API is not set -# CONFIG_CXL_EEH is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_MQ_DEFAULT is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_ISCSI_BOOT_SYSFS is not set -# CONFIG_SCSI_CXGB3_ISCSI is not set -# CONFIG_SCSI_CXGB4_ISCSI is not set -# CONFIG_SCSI_BNX2_ISCSI is not set -# CONFIG_BE2ISCSI is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_HPSA is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_3W_SAS is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC94XX is not set -# CONFIG_SCSI_MVSAS is not set -# CONFIG_SCSI_MVUMI is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_ARCMSR is not set -# CONFIG_SCSI_ESAS2R is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_MPT3SAS is not set -# CONFIG_SCSI_MPT2SAS is not set -# CONFIG_SCSI_UFSHCD is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_SNIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_STEX is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_ISCSI is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_WD719X is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_PMCRAID is not set -# CONFIG_SCSI_PM8001 is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -CONFIG_ATA=y -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_VERBOSE_ERROR=y -CONFIG_SATA_PMP=y - -# -# Controllers with non-SFF native interface -# -# CONFIG_SATA_AHCI is not set -CONFIG_SATA_AHCI_PLATFORM=y -# CONFIG_AHCI_CEVA is not set -# CONFIG_AHCI_QORIQ is not set -# CONFIG_SATA_INIC162X is not set -# CONFIG_SATA_ACARD_AHCI is not set -# CONFIG_SATA_SIL24 is not set -CONFIG_ATA_SFF=y - -# -# SFF controllers with custom DMA interface -# -# CONFIG_PDC_ADMA is not set -# CONFIG_SATA_QSTOR is not set -# CONFIG_SATA_SX4 is not set -CONFIG_ATA_BMDMA=y - -# -# SATA SFF controllers with BMDMA -# -# CONFIG_ATA_PIIX is not set -# CONFIG_SATA_MV is not set -# CONFIG_SATA_NV is not set -# CONFIG_SATA_PROMISE is not set -# CONFIG_SATA_SIL is not set -# CONFIG_SATA_SIS is not set -# CONFIG_SATA_SVW is not set -# CONFIG_SATA_ULI is not set -# CONFIG_SATA_VIA is not set -# CONFIG_SATA_VITESSE is not set - -# -# PATA SFF controllers with BMDMA -# -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_ATP867X is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_MARVELL is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NINJA32 is not set -# CONFIG_PATA_NS87415 is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PDC2027X is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RDC is not set -# CONFIG_PATA_SCH is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_SIL680 is not set -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_TOSHIBA is not set -# CONFIG_PATA_TRIFLEX is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# PIO-only SFF controllers -# -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_RZ1000 is not set - -# -# Generic fallback / legacy drivers -# -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_LEGACY is not set -# CONFIG_MD is not set -# CONFIG_TARGET_CORE is not set -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_FIREWIRE is not set -# CONFIG_FIREWIRE_NOSY is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_NET_FC is not set -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_IPVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m -# CONFIG_TUN_VNET_CROSS_LE is not set -# CONFIG_VETH is not set -# CONFIG_NLMON is not set -# CONFIG_ARCNET is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -CONFIG_ETHERNET=y -CONFIG_NET_VENDOR_3COM=y -# CONFIG_VORTEX is not set -# CONFIG_TYPHOON is not set -CONFIG_NET_VENDOR_ADAPTEC=y -# CONFIG_ADAPTEC_STARFIRE is not set -CONFIG_NET_VENDOR_AGERE=y -# CONFIG_ET131X is not set -CONFIG_NET_VENDOR_ALTEON=y -# CONFIG_ACENIC is not set -# CONFIG_ALTERA_TSE is not set -CONFIG_NET_VENDOR_AMD=y -# CONFIG_AMD8111_ETH is not set -# CONFIG_PCNET32 is not set -# CONFIG_NET_VENDOR_ARC is not set -CONFIG_NET_VENDOR_ATHEROS=y -# CONFIG_ATL2 is not set -# CONFIG_ATL1 is not set -# CONFIG_ATL1E is not set -# CONFIG_ATL1C is not set -# CONFIG_ALX is not set -# CONFIG_NET_VENDOR_AURORA is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -CONFIG_NET_VENDOR_BROCADE=y -# CONFIG_BNA is not set -CONFIG_NET_VENDOR_CAVIUM=y -CONFIG_NET_VENDOR_CHELSIO=y -# CONFIG_CHELSIO_T1 is not set -# CONFIG_CHELSIO_T3 is not set -# CONFIG_CHELSIO_T4 is not set -# CONFIG_CHELSIO_T4VF is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -CONFIG_NET_VENDOR_CISCO=y -# CONFIG_ENIC is not set -# CONFIG_DM9000 is not set -# CONFIG_DNET is not set -CONFIG_NET_VENDOR_DEC=y -# CONFIG_NET_TULIP is not set -CONFIG_NET_VENDOR_DLINK=y -# CONFIG_DL2K is not set -# CONFIG_SUNDANCE is not set -CONFIG_NET_VENDOR_EMULEX=y -# CONFIG_BE2NET is not set -CONFIG_NET_VENDOR_EZCHIP=y -# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set -CONFIG_NET_VENDOR_EXAR=y -# CONFIG_S2IO is not set -# CONFIG_VXGE is not set -# CONFIG_NET_VENDOR_FARADAY is not set -CONFIG_HIETH_SWITCH_FABRIC=y -CONFIG_HIETH_MAX_RX_POOLS=1024 -CONFIG_NET_VENDOR_HISILICON=y -# CONFIG_HIX5HD2_GMAC is not set -# CONFIG_HIP04_ETH is not set -# CONFIG_HNS is not set -# CONFIG_HNS_DSAF is not set -# CONFIG_HNS_ENET is not set -CONFIG_HIETH_GMAC=y -CONFIG_HIGMAC_DESC_4WORD=y -CONFIG_HIGMAC_RXCSUM=y -CONFIG_NET_VENDOR_HP=y -# CONFIG_HP100 is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_JME is not set -# CONFIG_NET_VENDOR_MARVELL is not set -CONFIG_NET_VENDOR_MELLANOX=y -# CONFIG_MLX4_EN is not set -# CONFIG_MLX4_CORE is not set -# CONFIG_MLX5_CORE is not set -# CONFIG_MLXSW_CORE is not set -# CONFIG_NET_VENDOR_MICREL is not set -CONFIG_NET_VENDOR_MICROCHIP=y -# CONFIG_ENC28J60 is not set -# CONFIG_ENCX24J600 is not set -CONFIG_NET_VENDOR_MYRI=y -# CONFIG_MYRI10GE is not set -# CONFIG_FEALNX is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_NET_VENDOR_NVIDIA=y -# CONFIG_FORCEDETH is not set -CONFIG_NET_VENDOR_OKI=y -# CONFIG_ETHOC is not set -CONFIG_NET_PACKET_ENGINE=y -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_NET_VENDOR_QLOGIC=y -# CONFIG_QLA3XXX is not set -# CONFIG_QLCNIC is not set -# CONFIG_QLGE is not set -# CONFIG_NETXEN_NIC is not set -# CONFIG_QED is not set -# CONFIG_NET_VENDOR_QUALCOMM is not set -CONFIG_NET_VENDOR_REALTEK=y -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_R8169 is not set -CONFIG_NET_VENDOR_RENESAS=y -CONFIG_NET_VENDOR_RDC=y -# CONFIG_R6040 is not set -CONFIG_NET_VENDOR_ROCKER=y -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_NET_VENDOR_SILAN=y -# CONFIG_SC92031 is not set -CONFIG_NET_VENDOR_SIS=y -# CONFIG_SIS900 is not set -# CONFIG_SIS190 is not set -# CONFIG_SFC is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_NET_VENDOR_SUN=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NIU is not set -CONFIG_NET_VENDOR_SYNOPSYS=y -# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set -CONFIG_NET_VENDOR_TEHUTI=y -# CONFIG_TEHUTI is not set -CONFIG_NET_VENDOR_TI=y -# CONFIG_TI_CPSW_ALE is not set -# CONFIG_TLAN is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_AQUANTIA_PHY is not set -# CONFIG_AT803X_PHY is not set -# CONFIG_AMD_PHY is not set -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_TERANETICS_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_BROADCOM_PHY is not set -# CONFIG_BCM7XXX_PHY is not set -# CONFIG_BCM87XX_PHY is not set -# CONFIG_ICPLUS_PHY is not set -# CONFIG_REALTEK_PHY is not set -# CONFIG_NATIONAL_PHY is not set -# CONFIG_STE10XP is not set -# CONFIG_LSI_ET1011C_PHY is not set -# CONFIG_MICREL_PHY is not set -# CONFIG_DP83848_PHY is not set -# CONFIG_DP83867_PHY is not set -# CONFIG_MICROCHIP_PHY is not set -CONFIG_HISILICON_PHY=y -# CONFIG_FIXED_PHY is not set -# CONFIG_MDIO_BITBANG is not set -# CONFIG_MDIO_BUS_MUX_GPIO is not set -# CONFIG_MDIO_BUS_MUX_MMIOREG is not set -# CONFIG_MDIO_BCM_UNIMAC is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -# CONFIG_PPPOLAC is not set -# CONFIG_PPPOPNS is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -# CONFIG_SLIP is not set -CONFIG_SLHC=m -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=m -# CONFIG_USB_LAN78XX is not set -CONFIG_USB_USBNET=y -CONFIG_USB_NET_AX8817X=m -# CONFIG_USB_NET_AX88179_178A is not set -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_CDC_EEM=m -CONFIG_USB_NET_CDC_NCM=m -CONFIG_USB_NET_HUAWEI_CDC_NCM=m -CONFIG_USB_NET_CDC_MBIM=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_SR9700=m -CONFIG_USB_NET_SR9800=m -CONFIG_USB_NET_SMSC75XX=m -CONFIG_USB_NET_SMSC95XX=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_NET_CX82310_ETH=m -CONFIG_USB_NET_KALMIA=m -CONFIG_USB_NET_QMI_WWAN=m -# CONFIG_USB_HSO is not set -CONFIG_USB_NET_INT51X1=m -CONFIG_USB_IPHETH=m -CONFIG_USB_SIERRA_NET=m -CONFIG_USB_VL600=m -# CONFIG_USB_NET_CH9200 is not set -CONFIG_WLAN=y -CONFIG_LIBERTAS_THINFIRM=m -# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set -CONFIG_LIBERTAS_THINFIRM_USB=m -# CONFIG_ATMEL is not set -CONFIG_AT76C50X_USB=m -# CONFIG_PRISM54 is not set -CONFIG_USB_ZD1201=m -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_ADM8211 is not set -# CONFIG_RTL8180 is not set -CONFIG_RTL8187=m -CONFIG_RTL8187_LEDS=y -# CONFIG_MAC80211_HWSIM is not set -# CONFIG_MWL8K is not set -CONFIG_ATH_COMMON=m -CONFIG_ATH_CARDS=m -# CONFIG_ATH_DEBUG is not set -# CONFIG_ATH5K is not set -# CONFIG_ATH5K_PCI is not set -CONFIG_ATH9K_HW=m -CONFIG_ATH9K_COMMON=m -CONFIG_ATH9K_BTCOEX_SUPPORT=y -CONFIG_ATH9K=m -CONFIG_ATH9K_PCI=y -# CONFIG_ATH9K_AHB is not set -# CONFIG_ATH9K_DEBUGFS is not set -# CONFIG_ATH9K_DYNACK is not set -# CONFIG_ATH9K_WOW is not set -CONFIG_ATH9K_RFKILL=y -# CONFIG_ATH9K_CHANNEL_CONTEXT is not set -CONFIG_ATH9K_PCOEM=y -CONFIG_ATH9K_HTC=m -# CONFIG_ATH9K_HTC_DEBUGFS is not set -CONFIG_CARL9170=m -CONFIG_CARL9170_LEDS=y -CONFIG_CARL9170_WPC=y -# CONFIG_CARL9170_HWRNG 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_WIL6210 is not set -CONFIG_ATH10K=m -# CONFIG_ATH10K_PCI is not set -# CONFIG_ATH10K_DEBUG is not set -# CONFIG_ATH10K_DEBUGFS is not set -# CONFIG_ATH10K_TRACING is not set -# CONFIG_WCN36XX is not set -# CONFIG_B43 is not set -# CONFIG_B43LEGACY is not set -CONFIG_BRCMUTIL=m -# CONFIG_BRCMSMAC is not set -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_PROTO_BCDC=y -CONFIG_BRCMFMAC_SDIO=y -# CONFIG_BRCMFMAC_USB is not set -# CONFIG_BRCMFMAC_PCIE is not set -# CONFIG_BRCM_TRACING is not set -# CONFIG_BRCMDBG is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set -# CONFIG_HOSTAP_PLX is not set -# CONFIG_HOSTAP_PCI is not set -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_IWLWIFI is not set -# CONFIG_IWL4965 is not set -# CONFIG_IWL3945 is not set -CONFIG_LIBERTAS=m -# CONFIG_LIBERTAS_USB is not set -# CONFIG_LIBERTAS_SDIO is not set -# CONFIG_LIBERTAS_SPI is not set -# CONFIG_LIBERTAS_DEBUG is not set -# CONFIG_LIBERTAS_MESH is not set -# CONFIG_HERMES is not set -CONFIG_P54_COMMON=m -# CONFIG_P54_USB is not set -# CONFIG_P54_PCI is not set -# CONFIG_P54_SPI is not set -CONFIG_P54_LEDS=y -CONFIG_RT2X00=m -# CONFIG_RT2400PCI is not set -# CONFIG_RT2500PCI is not set -# CONFIG_RT61PCI is not set -# CONFIG_RT2800PCI is not set -CONFIG_RT2500USB=m -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 -CONFIG_RT2X00_LIB=m -CONFIG_RT2X00_LIB_FIRMWARE=y -CONFIG_RT2X00_LIB_CRYPTO=y -CONFIG_RT2X00_LIB_LEDS=y -# CONFIG_RT2X00_DEBUG is not set -CONFIG_WL_MEDIATEK=y -CONFIG_MT7601U=m -CONFIG_RTL_CARDS=m -# CONFIG_RTL8192CE is not set -# CONFIG_RTL8192SE is not set -# CONFIG_RTL8192DE is not set -# CONFIG_RTL8723AE is not set -# CONFIG_RTL8723BE is not set -# CONFIG_RTL8188EE is not set -# CONFIG_RTL8192EE is not set -# CONFIG_RTL8821AE is not set -CONFIG_RTL8192CU=m -CONFIG_RTLWIFI=m -CONFIG_RTLWIFI_USB=m -CONFIG_RTLWIFI_DEBUG=y -CONFIG_RTL8192C_COMMON=m -CONFIG_RTL8XXXU=m -CONFIG_RTL8XXXU_UNTESTED=y -# CONFIG_WL_TI is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_MWIFIEX=m -# CONFIG_MWIFIEX_SDIO is not set -# CONFIG_MWIFIEX_PCIE is not set -CONFIG_MWIFIEX_USB=m -CONFIG_CW1200=m -# CONFIG_CW1200_WLAN_SDIO is not set -# CONFIG_CW1200_WLAN_SPI is not set -CONFIG_RSI_91X=m -# CONFIG_RSI_DEBUGFS is not set -# CONFIG_RSI_SDIO is not set -CONFIG_RSI_USB=m - -# -# WiMAX Wireless Broadband devices -# -# CONFIG_WIMAX_I2400M_USB is not set -# CONFIG_WAN is not set -# CONFIG_VMXNET3 is not set -# CONFIG_ISDN is not set -# CONFIG_NVM is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_LEDS=y -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_POLLDEV is not set -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_OMAP4 is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_CAP11XX is not set -# CONFIG_KEYBOARD_BCM is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_CYPRESS=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_ELANTECH is not set -# CONFIG_MOUSE_PS2_SENTELIC is not set -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_PS2_FOCALTECH=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_ELAN_I2C is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDJOY is not set -# CONFIG_JOYSTICK_ZHENHUA is not set -# CONFIG_JOYSTICK_AS5011 is not set -# CONFIG_JOYSTICK_JOYDUMP is not set -CONFIG_JOYSTICK_XPAD=y -CONFIG_JOYSTICK_XPAD_FF=y -CONFIG_JOYSTICK_XPAD_LEDS=y -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_E3X0_BUTTON is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_BEEPER is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -# CONFIG_INPUT_REGULATOR_HAPTIC is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set -# CONFIG_INPUT_DRV260X_HAPTICS is not set -# CONFIG_INPUT_DRV2665_HAPTICS is not set -# CONFIG_INPUT_DRV2667_HAPTICS is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_AMBAKMI is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_SERIO_ALTERA_PS2 is not set -# CONFIG_SERIO_PS2MULT is not set -# CONFIG_SERIO_ARC_PS2 is not set -# CONFIG_SERIO_APBPS2 is not set -# CONFIG_USERIO is not set -CONFIG_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_GAMEPORT_EMU10K1 is not set -# CONFIG_GAMEPORT_FM801 is not set - -# -# Character devices -# -CONFIG_TTY=y -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_NOZOMI is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -CONFIG_SERIAL_EARLYCON=y -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -# CONFIG_SERIAL_UARTLITE is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_SC16IS7XX is not set -# CONFIG_SERIAL_BCM63XX is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_SERIAL_RP2 is not set -# CONFIG_SERIAL_FSL_LPUART is not set -# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set -# CONFIG_SERIAL_ST_ASC is not set -# CONFIG_SERIAL_STM32 is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=y -# CONFIG_HW_RANDOM_TIMERIOMEM is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_DEVPORT=y -# CONFIG_XILLYBUS is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y - -# -# Multiplexer I2C Chip support -# -# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set -# CONFIG_I2C_MUX_GPIO is not set -# CONFIG_I2C_MUX_PCA9541 is not set -# CONFIG_I2C_MUX_PCA954x is not set -# CONFIG_I2C_MUX_REG is not set -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_ALGOBIT=m - -# -# I2C Hardware Bus support -# - -# -# PC SMBus host controller drivers -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_ISCH is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_DESIGNWARE_PCI is not set -# CONFIG_I2C_EMEV2 is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_RK3X is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_ROBOTFUZZ_OSIF is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_SLAVE is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -CONFIG_SPI_BITBANG=y -# CONFIG_SPI_CADENCE is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -CONFIG_SPI_OC_TINY=y -CONFIG_SPI_PL022=y -# CONFIG_SPI_PXA2XX is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_ROCKCHIP is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_ZYNQMP_GQSPI is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -CONFIG_SPI_SPIDEV=y -# CONFIG_SPI_TLE62X0 is not set -# CONFIG_SPMI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_OF_GPIO=y -CONFIG_GPIOLIB_IRQCHIP=y -# CONFIG_DEBUG_GPIO is not set -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC=y - -# -# Memory mapped GPIO drivers -# -# CONFIG_GPIO_74XX_MMIO is not set -# CONFIG_GPIO_ALTERA is not set -# CONFIG_GPIO_DWAPB is not set -# CONFIG_GPIO_EM is not set -CONFIG_GPIO_GENERIC_PLATFORM=y -# CONFIG_GPIO_GRGPIO is not set -CONFIG_GPIO_PL061=y -# CONFIG_GPIO_VX855 is not set -# CONFIG_GPIO_XILINX is not set -# CONFIG_GPIO_ZEVIO is not set -# CONFIG_GPIO_ZX is not set - -# -# I2C GPIO expanders -# -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set - -# -# MFD GPIO expanders -# - -# -# PCI GPIO expanders -# -# CONFIG_GPIO_AMD8111 is not set -# CONFIG_GPIO_BT8XX is not set -# CONFIG_GPIO_ML_IOH is not set -# CONFIG_GPIO_RDC321X is not set - -# -# SPI GPIO expanders -# -# CONFIG_GPIO_74X164 is not set -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MC33880 is not set - -# -# SPI or I2C GPIO expanders -# -# CONFIG_GPIO_MCP23S08 is not set - -# -# USB GPIO expanders -# -# CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -# CONFIG_THERMAL is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_CORE=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_GPIO_WATCHDOG is not set -# CONFIG_XILINX_WATCHDOG is not set -CONFIG_ARM_SP805_WATCHDOG=y -# CONFIG_CADENCE_WATCHDOG is not set -# CONFIG_DW_WATCHDOG is not set -# CONFIG_MAX63XX_WATCHDOG is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_I6300ESB_WDT is not set -# CONFIG_BCM7038_WDT is not set -# CONFIG_MEN_A21_WDT is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_MFD_AS3722 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_ATMEL_FLEXCOM is not set -# CONFIG_MFD_ATMEL_HLCDC is not set -# CONFIG_MFD_BCM590XX is not set -# CONFIG_MFD_AXP20X is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_DA9062 is not set -# CONFIG_MFD_DA9063 is not set -# CONFIG_MFD_DA9150 is not set -# CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_MFD_HI6421_PMIC is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_LPC_ICH is not set -# CONFIG_LPC_SCH is not set -# CONFIG_INTEL_SOC_PMIC is not set -# CONFIG_MFD_JANZ_CMODIO is not set -# CONFIG_MFD_KEMPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX14577 is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX77843 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_MFD_MT6397 is not set -# CONFIG_MFD_MENF21BMC is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_PM8921_CORE is not set -# CONFIG_MFD_RDC321X is not set -# CONFIG_MFD_RTSX_PCI is not set -# CONFIG_MFD_RT5033 is not set -# CONFIG_MFD_RTSX_USB is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_RK808 is not set -# CONFIG_MFD_RN5T618 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SKY81452 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP3943 is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS65218 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set -# CONFIG_MFD_TC6393XB is not set -# CONFIG_MFD_VX855 is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR_DEBUG is not set -# CONFIG_REGULATOR_FIXED_VOLTAGE is not set -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set -# CONFIG_REGULATOR_ACT8865 is not set -# CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_DA9210 is not set -# CONFIG_REGULATOR_DA9211 is not set -# CONFIG_REGULATOR_FAN53555 is not set -# CONFIG_REGULATOR_GPIO is not set -# CONFIG_REGULATOR_ISL9305 is not set -# CONFIG_REGULATOR_ISL6271A is not set -# CONFIG_REGULATOR_LP3971 is not set -# CONFIG_REGULATOR_LP3972 is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_LP8755 is not set -# CONFIG_REGULATOR_LTC3589 is not set -# CONFIG_REGULATOR_MAX1586 is not set -# CONFIG_REGULATOR_MAX8649 is not set -# CONFIG_REGULATOR_MAX8660 is not set -# CONFIG_REGULATOR_MAX8952 is not set -# CONFIG_REGULATOR_MAX8973 is not set -# CONFIG_REGULATOR_MT6311 is not set -# CONFIG_REGULATOR_PFUZE100 is not set -# CONFIG_REGULATOR_TPS51632 is not set -# CONFIG_REGULATOR_TPS62360 is not set -# CONFIG_REGULATOR_TPS65023 is not set -# CONFIG_REGULATOR_TPS6507X is not set -# CONFIG_REGULATOR_TPS6524X is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -# CONFIG_MEDIA_SDR_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_DEV=y -# CONFIG_VIDEO_V4L2_SUBDEV_API is not set -CONFIG_VIDEO_V4L2=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEOBUF_GEN=m -CONFIG_VIDEOBUF_VMALLOC=m -CONFIG_VIDEOBUF_DVB=m -CONFIG_VIDEOBUF2_CORE=m -CONFIG_VIDEOBUF2_MEMOPS=m -CONFIG_VIDEOBUF2_VMALLOC=m -CONFIG_DVB_CORE=y -CONFIG_DVB_NET=y -CONFIG_TTPCI_EEPROM=m -CONFIG_DVB_MAX_ADAPTERS=8 -CONFIG_DVB_DYNAMIC_MINORS=y - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -# CONFIG_LIRC is not set -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_SHARP_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -CONFIG_IR_XMP_DECODER=y -# CONFIG_RC_DEVICES is not set -CONFIG_MEDIA_USB_SUPPORT=y - -# -# Webcam devices -# -# CONFIG_USB_VIDEO_CLASS is not set -CONFIG_USB_GSPCA=m -# CONFIG_USB_M5602 is not set -# CONFIG_USB_STV06XX is not set -# CONFIG_USB_GL860 is not set -# CONFIG_USB_GSPCA_BENQ is not set -# CONFIG_USB_GSPCA_CONEX is not set -# CONFIG_USB_GSPCA_CPIA1 is not set -# CONFIG_USB_GSPCA_DTCS033 is not set -# CONFIG_USB_GSPCA_ETOMS is not set -# CONFIG_USB_GSPCA_FINEPIX is not set -# CONFIG_USB_GSPCA_JEILINJ is not set -# CONFIG_USB_GSPCA_JL2005BCD is not set -# CONFIG_USB_GSPCA_KINECT is not set -# CONFIG_USB_GSPCA_KONICA is not set -# CONFIG_USB_GSPCA_MARS is not set -# CONFIG_USB_GSPCA_MR97310A is not set -# CONFIG_USB_GSPCA_NW80X is not set -# CONFIG_USB_GSPCA_OV519 is not set -# CONFIG_USB_GSPCA_OV534 is not set -# CONFIG_USB_GSPCA_OV534_9 is not set -# CONFIG_USB_GSPCA_PAC207 is not set -# CONFIG_USB_GSPCA_PAC7302 is not set -# CONFIG_USB_GSPCA_PAC7311 is not set -# CONFIG_USB_GSPCA_SE401 is not set -# CONFIG_USB_GSPCA_SN9C2028 is not set -# CONFIG_USB_GSPCA_SN9C20X is not set -# CONFIG_USB_GSPCA_SONIXB is not set -# CONFIG_USB_GSPCA_SONIXJ is not set -# CONFIG_USB_GSPCA_SPCA500 is not set -# CONFIG_USB_GSPCA_SPCA501 is not set -# CONFIG_USB_GSPCA_SPCA505 is not set -# CONFIG_USB_GSPCA_SPCA506 is not set -# CONFIG_USB_GSPCA_SPCA508 is not set -# CONFIG_USB_GSPCA_SPCA561 is not set -# CONFIG_USB_GSPCA_SPCA1528 is not set -# CONFIG_USB_GSPCA_SQ905 is not set -# CONFIG_USB_GSPCA_SQ905C is not set -# CONFIG_USB_GSPCA_SQ930X is not set -# CONFIG_USB_GSPCA_STK014 is not set -# CONFIG_USB_GSPCA_STK1135 is not set -# CONFIG_USB_GSPCA_STV0680 is not set -# CONFIG_USB_GSPCA_SUNPLUS is not set -# CONFIG_USB_GSPCA_T613 is not set -# CONFIG_USB_GSPCA_TOPRO is not set -# CONFIG_USB_GSPCA_TOUPTEK is not set -# CONFIG_USB_GSPCA_TV8532 is not set -# CONFIG_USB_GSPCA_VC032X is not set -# CONFIG_USB_GSPCA_VICAM is not set -# CONFIG_USB_GSPCA_XIRLINK_CIT is not set -# CONFIG_USB_GSPCA_ZC3XX is not set -# CONFIG_USB_PWC is not set -# CONFIG_VIDEO_CPIA2 is not set -# CONFIG_USB_ZR364XX is not set -# CONFIG_USB_STKWEBCAM is not set -# CONFIG_USB_S2255 is not set -# CONFIG_VIDEO_USBTV is not set - -# -# Analog TV USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_SYSFS=y -CONFIG_VIDEO_PVRUSB2_DVB=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_USBVISION=m -# CONFIG_VIDEO_STK1160_COMMON is not set -# CONFIG_VIDEO_GO7007 is not set - -# -# Analog/digital TV USB devices -# -CONFIG_VIDEO_AU0828=m -CONFIG_VIDEO_AU0828_V4L2=y -# CONFIG_VIDEO_AU0828_RC is not set -CONFIG_VIDEO_CX231XX=m -CONFIG_VIDEO_CX231XX_RC=y -CONFIG_VIDEO_CX231XX_ALSA=m -CONFIG_VIDEO_CX231XX_DVB=m -CONFIG_VIDEO_TM6000=m -CONFIG_VIDEO_TM6000_ALSA=m -CONFIG_VIDEO_TM6000_DVB=m - -# -# Digital TV USB devices -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_USB_AF9005=m -# CONFIG_DVB_USB_AF9005_REMOTE is not set -CONFIG_DVB_USB_PCTV452E=m -CONFIG_DVB_USB_DW2102=m -CONFIG_DVB_USB_CINERGY_T2=m -CONFIG_DVB_USB_DTV5100=m -CONFIG_DVB_USB_FRIIO=m -CONFIG_DVB_USB_AZ6027=m -CONFIG_DVB_USB_TECHNISAT_USB2=m -CONFIG_DVB_USB_V2=m -CONFIG_DVB_USB_AF9015=m -CONFIG_DVB_USB_AF9035=m -CONFIG_DVB_USB_ANYSEE=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_AZ6007=m -CONFIG_DVB_USB_CE6230=m -CONFIG_DVB_USB_EC168=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_LME2510=m -CONFIG_DVB_USB_MXL111SF=m -CONFIG_DVB_USB_RTL28XXU=m -CONFIG_DVB_USB_DVBSKY=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_SMS_USB_DRV=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set -CONFIG_DVB_AS102=m - -# -# Webcam, TV (analog/digital) USB devices -# -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_EM28XX_V4L2=m -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_EM28XX_DVB=m -# CONFIG_VIDEO_EM28XX_RC is not set -# CONFIG_MEDIA_PCI_SUPPORT is not set -CONFIG_V4L_PLATFORM_DRIVERS=y -# CONFIG_VIDEO_CAFE_CCIC is not set -# CONFIG_SOC_CAMERA is not set -# CONFIG_V4L_MEM2MEM_DRIVERS is not set -# CONFIG_V4L_TEST_DRIVERS is not set -CONFIG_DVB_PLATFORM_DRIVERS=y - -# -# Supported MMC/SDIO adapters -# -# CONFIG_SMS_SDIO_DRV is not set -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_SI470X is not set -# CONFIG_RADIO_SI4713 is not set -# CONFIG_USB_MR800 is not set -# CONFIG_USB_DSBR is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_SHARK is not set -# CONFIG_RADIO_SHARK2 is not set -# CONFIG_USB_KEENE is not set -# CONFIG_USB_RAREMONO is not set -# CONFIG_USB_MA901 is not set -# CONFIG_RADIO_TEA5764 is not set -# CONFIG_RADIO_SAA7706H is not set -# CONFIG_RADIO_TEF6862 is not set -# CONFIG_RADIO_WL1273 is not set - -# -# Texas Instruments WL128x FM driver (ST based) -# -CONFIG_MEDIA_COMMON_OPTIONS=y - -# -# common driver options -# -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_CYPRESS_FIRMWARE=m -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_SMS_SIANO_MDTV=m -CONFIG_SMS_SIANO_RC=y - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=y - -# -# Encoders, decoders, sensors and other helper chips -# - -# -# Audio decoders, processors and mixers -# -# CONFIG_VIDEO_TVAUDIO is not set -# CONFIG_VIDEO_TDA7432 is not set -# CONFIG_VIDEO_TDA9840 is not set -# CONFIG_VIDEO_TEA6415C is not set -# CONFIG_VIDEO_TEA6420 is not set -CONFIG_VIDEO_MSP3400=m -# CONFIG_VIDEO_CS5345 is not set -CONFIG_VIDEO_CS53L32A=m -# CONFIG_VIDEO_TLV320AIC23B is not set -# CONFIG_VIDEO_UDA1342 is not set -CONFIG_VIDEO_WM8775=m -# CONFIG_VIDEO_WM8739 is not set -# CONFIG_VIDEO_VP27SMPX is not set -# CONFIG_VIDEO_SONY_BTF_MPX is not set - -# -# RDS decoders -# -# CONFIG_VIDEO_SAA6588 is not set - -# -# Video decoders -# -# CONFIG_VIDEO_ADV7183 is not set -# CONFIG_VIDEO_BT819 is not set -# CONFIG_VIDEO_BT856 is not set -# CONFIG_VIDEO_BT866 is not set -# CONFIG_VIDEO_KS0127 is not set -# CONFIG_VIDEO_ML86V7667 is not set -# CONFIG_VIDEO_SAA7110 is not set -CONFIG_VIDEO_SAA711X=m -# CONFIG_VIDEO_TVP514X is not set -# CONFIG_VIDEO_TVP5150 is not set -# CONFIG_VIDEO_TVP7002 is not set -# CONFIG_VIDEO_TW2804 is not set -# CONFIG_VIDEO_TW9903 is not set -# CONFIG_VIDEO_TW9906 is not set -# CONFIG_VIDEO_VPX3220 is not set - -# -# Video and audio decoders -# -# CONFIG_VIDEO_SAA717X is not set -CONFIG_VIDEO_CX25840=m - -# -# Video encoders -# -# CONFIG_VIDEO_SAA7127 is not set -# CONFIG_VIDEO_SAA7185 is not set -# CONFIG_VIDEO_ADV7170 is not set -# CONFIG_VIDEO_ADV7175 is not set -# CONFIG_VIDEO_ADV7343 is not set -# CONFIG_VIDEO_ADV7393 is not set -# CONFIG_VIDEO_AK881X is not set -# CONFIG_VIDEO_THS8200 is not set - -# -# Camera sensor devices -# -# CONFIG_VIDEO_OV2659 is not set -# CONFIG_VIDEO_OV7640 is not set -# CONFIG_VIDEO_OV7670 is not set -# CONFIG_VIDEO_VS6624 is not set -# CONFIG_VIDEO_MT9V011 is not set -# CONFIG_VIDEO_SR030PC30 is not set - -# -# Flash devices -# -# CONFIG_VIDEO_ADP1653 is not set -# CONFIG_VIDEO_AS3645A is not set -# CONFIG_VIDEO_LM3560 is not set -# CONFIG_VIDEO_LM3646 is not set - -# -# Video improvement chips -# -# CONFIG_VIDEO_UPD64031A is not set -# CONFIG_VIDEO_UPD64083 is not set - -# -# Audio/Video compression chips -# -# CONFIG_VIDEO_SAA6752HS is not set - -# -# Miscellaneous helper chips -# -# CONFIG_VIDEO_THS7303 is not set -# CONFIG_VIDEO_M52790 is not set - -# -# Sensors used on soc_camera driver -# -CONFIG_MEDIA_TUNER=y - -# -# Customize TV tuners -# -CONFIG_MEDIA_TUNER_SIMPLE=y -CONFIG_MEDIA_TUNER_TDA18250=y -CONFIG_MEDIA_TUNER_TDA8290=y -CONFIG_MEDIA_TUNER_TDA827X=y -CONFIG_MEDIA_TUNER_TDA18271=y -CONFIG_MEDIA_TUNER_TDA9887=y -CONFIG_MEDIA_TUNER_TEA5761=m -CONFIG_MEDIA_TUNER_TEA5767=m -CONFIG_MEDIA_TUNER_MSI001=m -CONFIG_MEDIA_TUNER_MT20XX=y -CONFIG_MEDIA_TUNER_MT2060=m -CONFIG_MEDIA_TUNER_MT2063=m -CONFIG_MEDIA_TUNER_MT2266=m -CONFIG_MEDIA_TUNER_MT2131=m -CONFIG_MEDIA_TUNER_QT1010=m -CONFIG_MEDIA_TUNER_XC2028=y -CONFIG_MEDIA_TUNER_XC5000=y -CONFIG_MEDIA_TUNER_XC4000=y -CONFIG_MEDIA_TUNER_MXL5005S=m -CONFIG_MEDIA_TUNER_MXL5007T=m -CONFIG_MEDIA_TUNER_MC44S803=y -CONFIG_MEDIA_TUNER_MAX2165=m -CONFIG_MEDIA_TUNER_TDA18218=m -CONFIG_MEDIA_TUNER_FC0011=m -CONFIG_MEDIA_TUNER_FC0012=m -CONFIG_MEDIA_TUNER_FC0013=m -CONFIG_MEDIA_TUNER_TDA18212=m -CONFIG_MEDIA_TUNER_E4000=m -CONFIG_MEDIA_TUNER_FC2580=m -CONFIG_MEDIA_TUNER_M88RS6000T=m -CONFIG_MEDIA_TUNER_TUA9001=m -CONFIG_MEDIA_TUNER_SI2157=m -CONFIG_MEDIA_TUNER_IT913X=m -CONFIG_MEDIA_TUNER_R820T=m -CONFIG_MEDIA_TUNER_MXL301RF=m -CONFIG_MEDIA_TUNER_QM1D1C0042=m - -# -# Customise DVB Frontends -# - -# -# Multistandard (satellite) frontends -# -CONFIG_DVB_STB0899=m -CONFIG_DVB_STB6100=m -CONFIG_DVB_STV090x=m -CONFIG_DVB_STV6110x=m -CONFIG_DVB_M88DS3103=m - -# -# Multistandard (cable + terrestrial) frontends -# -CONFIG_DVB_DRXK=m -CONFIG_DVB_TDA18271C2DD=m -CONFIG_DVB_SI2165=m - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_MT312=m -CONFIG_DVB_ZL10036=m -CONFIG_DVB_ZL10039=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_STV0288=m -CONFIG_DVB_STB6000=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_STV6110=m -CONFIG_DVB_STV0900=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_TDA10086=m -CONFIG_DVB_TDA8261=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TUNER_ITD1000=m -CONFIG_DVB_TUNER_CX24113=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TUA6100=m -CONFIG_DVB_CX24116=m -CONFIG_DVB_CX24117=m -CONFIG_DVB_CX24120=m -CONFIG_DVB_SI21XX=m -CONFIG_DVB_TS2020=m -CONFIG_DVB_DS3000=m -CONFIG_DVB_MB86A16=m -CONFIG_DVB_TDA10071=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_S5H1432=m -CONFIG_DVB_DRXD=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m -CONFIG_DVB_DIB9000=m -CONFIG_DVB_TDA10048=m -CONFIG_DVB_AF9013=m -CONFIG_DVB_EC100=m -CONFIG_DVB_HD29L2=m -CONFIG_DVB_STV0367=m -CONFIG_DVB_CXD2820R=m -CONFIG_DVB_CXD2841ER=m -CONFIG_DVB_RTL2830=m -CONFIG_DVB_RTL2832=m -CONFIG_DVB_SI2168=m -CONFIG_DVB_AS102_FE=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_DVB_LGDT3305=m -CONFIG_DVB_LGDT3306A=m -CONFIG_DVB_LG2160=m -CONFIG_DVB_S5H1409=m -CONFIG_DVB_AU8522=m -CONFIG_DVB_AU8522_DTV=m -CONFIG_DVB_AU8522_V4L=m -CONFIG_DVB_S5H1411=m - -# -# ISDB-T (terrestrial) frontends -# -CONFIG_DVB_S921=m -CONFIG_DVB_DIB8000=m -CONFIG_DVB_MB86A20S=m - -# -# ISDB-S (satellite) & ISDB-T (terrestrial) frontends -# -CONFIG_DVB_TC90522=m - -# -# Digital terrestrial only tuners/PLL -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TUNER_DIB0070=m -CONFIG_DVB_TUNER_DIB0090=m - -# -# SEC control devices for DVB-S -# -CONFIG_DVB_DRX39XYJ=m -CONFIG_DVB_LNBH25=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_LNBP22=m -CONFIG_DVB_ISL6405=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_ISL6423=m -CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m -CONFIG_DVB_LGS8GL5=m -CONFIG_DVB_LGS8GXX=m -CONFIG_DVB_ATBM8830=m -CONFIG_DVB_TDA665x=m -CONFIG_DVB_IX2505V=m -CONFIG_DVB_M88RS2000=m -CONFIG_DVB_AF9033=m -CONFIG_DVB_HORUS3A=m -CONFIG_DVB_ASCOT2E=m - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -CONFIG_VGA_ARB=y -CONFIG_VGA_ARB_MAX_GPUS=16 -# CONFIG_DRM is not set - -# -# Frame buffer Devices -# -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_CMDLINE=y -CONFIG_FB_NOTIFY=y -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_OPENCORES is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I740 is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_S3 is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_VT8623 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_ARK is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_CARMINE is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_IBM_GXT4500 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_FB_SSD1307 is not set -# CONFIG_FB_SM712 is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=m -# CONFIG_LCD_L4F00242T03 is not set -# CONFIG_LCD_LMS283GF05 is not set -# CONFIG_LCD_LTV350QV is not set -# CONFIG_LCD_ILI922X is not set -# CONFIG_LCD_ILI9320 is not set -# CONFIG_LCD_TDO24M is not set -# CONFIG_LCD_VGG2432A4 is not set -# CONFIG_LCD_PLATFORM is not set -# CONFIG_LCD_S6E63M0 is not set -# CONFIG_LCD_LD9040 is not set -# CONFIG_LCD_AMS369FG06 is not set -# CONFIG_LCD_LMS501KF03 is not set -# CONFIG_LCD_HX8357 is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_GENERIC=m -# CONFIG_BACKLIGHT_PM8941_WLED is not set -# CONFIG_BACKLIGHT_ADP8860 is not set -# CONFIG_BACKLIGHT_ADP8870 is not set -# CONFIG_BACKLIGHT_LM3639 is not set -# CONFIG_BACKLIGHT_GPIO is not set -# CONFIG_BACKLIGHT_LV5207LP is not set -# CONFIG_BACKLIGHT_BD6107 is not set -# CONFIG_ADF is not set -# CONFIG_VGASTATE is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set -# CONFIG_LOGO is not set -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_JACK=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -CONFIG_SND_PCM_TIMER=y -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_PROC_FS=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_PCI=y -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AW2 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_OXYGEN is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CTXFI is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set -# CONFIG_SND_INDIGOIOX is not set -# CONFIG_SND_INDIGODJX is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_LOLA is not set -# CONFIG_SND_LX6464ES is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SE6X is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VIRTUOSO is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# HD-Audio -# -# CONFIG_SND_HDA_INTEL is not set -CONFIG_SND_HDA_PREALLOC_SIZE=64 -CONFIG_SND_ARM=y -# CONFIG_SND_ARMAACI is not set -CONFIG_SND_SPI=y -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -# CONFIG_SND_USB_HIFACE is not set -# CONFIG_SND_BCD2000 is not set -# CONFIG_SND_USB_POD is not set -# CONFIG_SND_USB_PODHD is not set -# CONFIG_SND_USB_TONEPORT is not set -# CONFIG_SND_USB_VARIAX is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set - -# -# SoC Audio for Freescale CPUs -# - -# -# Common SoC Audio options for Freescale CPUs: -# -# CONFIG_SND_SOC_FSL_ASRC is not set -# CONFIG_SND_SOC_FSL_SAI is not set -# CONFIG_SND_SOC_FSL_SSI is not set -# CONFIG_SND_SOC_FSL_SPDIF is not set -# CONFIG_SND_SOC_FSL_ESAI is not set -# CONFIG_SND_SOC_IMX_AUDMUX is not set - -# -# Allwinner SoC Audio support -# -# CONFIG_SND_SUN4I_CODEC is not set -# CONFIG_SND_SOC_XTFPGA_I2S is not set -CONFIG_SND_SOC_I2C_AND_SPI=y - -# -# CODEC drivers -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_ADAU1701 is not set -# CONFIG_SND_SOC_AK4104 is not set -# CONFIG_SND_SOC_AK4554 is not set -# CONFIG_SND_SOC_AK4613 is not set -# CONFIG_SND_SOC_AK4642 is not set -# CONFIG_SND_SOC_AK5386 is not set -# CONFIG_SND_SOC_ALC5623 is not set -# CONFIG_SND_SOC_CS35L32 is not set -# CONFIG_SND_SOC_CS42L51_I2C is not set -# CONFIG_SND_SOC_CS42L52 is not set -# CONFIG_SND_SOC_CS42L56 is not set -# CONFIG_SND_SOC_CS42L73 is not set -# CONFIG_SND_SOC_CS4265 is not set -# CONFIG_SND_SOC_CS4270 is not set -# CONFIG_SND_SOC_CS4271_I2C is not set -# CONFIG_SND_SOC_CS4271_SPI is not set -# CONFIG_SND_SOC_CS42XX8_I2C is not set -# CONFIG_SND_SOC_CS4349 is not set -# CONFIG_SND_SOC_ES8328 is not set -# CONFIG_SND_SOC_GTM601 is not set -# CONFIG_SND_SOC_PCM1681 is not set -# CONFIG_SND_SOC_PCM1792A is not set -# CONFIG_SND_SOC_PCM512x_I2C is not set -# CONFIG_SND_SOC_PCM512x_SPI is not set -# CONFIG_SND_SOC_RT5631 is not set -# CONFIG_SND_SOC_RT5677_SPI is not set -# CONFIG_SND_SOC_SGTL5000 is not set -# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set -# CONFIG_SND_SOC_SPDIF is not set -# CONFIG_SND_SOC_SSM2602_SPI is not set -# CONFIG_SND_SOC_SSM2602_I2C is not set -# CONFIG_SND_SOC_SSM4567 is not set -# CONFIG_SND_SOC_STA32X is not set -# CONFIG_SND_SOC_STA350 is not set -# CONFIG_SND_SOC_STI_SAS is not set -# CONFIG_SND_SOC_TAS2552 is not set -# CONFIG_SND_SOC_TAS5086 is not set -# CONFIG_SND_SOC_TAS571X is not set -# CONFIG_SND_SOC_TFA9879 is not set -# CONFIG_SND_SOC_TLV320AIC23_I2C is not set -# CONFIG_SND_SOC_TLV320AIC23_SPI is not set -# CONFIG_SND_SOC_TLV320AIC31XX is not set -# CONFIG_SND_SOC_TLV320AIC3X is not set -# CONFIG_SND_SOC_TS3A227E is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8523 is not set -# CONFIG_SND_SOC_WM8580 is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8728 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8737 is not set -# CONFIG_SND_SOC_WM8741 is not set -# CONFIG_SND_SOC_WM8750 is not set -# CONFIG_SND_SOC_WM8753 is not set -# CONFIG_SND_SOC_WM8770 is not set -# CONFIG_SND_SOC_WM8776 is not set -# CONFIG_SND_SOC_WM8804_I2C is not set -# CONFIG_SND_SOC_WM8804_SPI is not set -# CONFIG_SND_SOC_WM8903 is not set -# CONFIG_SND_SOC_WM8962 is not set -# CONFIG_SND_SOC_WM8978 is not set -# CONFIG_SND_SOC_TPA6130A2 is not set -# CONFIG_SND_SIMPLE_CARD is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -# CONFIG_HID_BETOP_FF is not set -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_CORSAIR is not set -# CONFIG_HID_PRODIKEYS is not set -# CONFIG_HID_CP2112 is not set -CONFIG_HID_CYPRESS=y -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -# CONFIG_HID_ELO is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_GEMBIRD is not set -# CONFIG_HID_GFRM is not set -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_GT683R is not set -# CONFIG_HID_KEYTOUCH is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_ICADE is not set -# CONFIG_HID_TWINHAN is not set -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO is not set -CONFIG_HID_LOGITECH=y -# CONFIG_HID_LOGITECH_HIDPP is not set -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PENMOUNT is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PLANTRONICS is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_RMI is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TIVO is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THINGM is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -# CONFIG_HID_XINMO is not set -# CONFIG_HID_ZEROPLUS is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -CONFIG_USB_HIDDEV=y - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_ULPI_BUS is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_PCI=y -CONFIG_USB_XHCI_PLATFORM=y -CONFIG_USB_XHCI_HISILICON=y -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_EHCI_PCI=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_FOTG210_HCD is not set -# CONFIG_USB_MAX3421_HCD is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PCI=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HCD_TEST_MODE is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -# CONFIG_USB_PRINTER is not set -CONFIG_USB_WDM=m -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_STORAGE_ENE_UB6250 is not set -CONFIG_USB_UAS=y - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USBIP_CORE is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_DWC2 is not set -# CONFIG_USB_CHIPIDEA is not set -# CONFIG_USB_ISP1760 is not set - -# -# USB port drivers -# -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_SIMPLE is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_CH341=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -CONFIG_USB_SERIAL_CP210X=m -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -CONFIG_USB_SERIAL_F81232=m -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -CONFIG_USB_SERIAL_IUU=m -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MXUPORT is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=m -CONFIG_USB_SERIAL_OPTION=m -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_XSENS_MT is not set -# CONFIG_USB_SERIAL_WISHBONE is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_QT2 is not set -# CONFIG_USB_SERIAL_DEBUG is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_EHSET_TEST_FIXTURE is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -CONFIG_USB_EZUSB_FX2=m -# CONFIG_USB_HSIC_USB3503 is not set -# CONFIG_USB_LINK_LAYER_TEST is not set -# CONFIG_USB_CHAOSKEY is not set - -# -# USB Physical Layer drivers -# -# CONFIG_USB_PHY is not set -# CONFIG_USB_OTG_WAKELOCK is not set -# CONFIG_NOP_USB_XCEIV is not set -# CONFIG_AM335X_PHY_USB is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_ULPI is not set -# CONFIG_USB_GADGET is not set -# CONFIG_USB_LED_TRIG is not set -# CONFIG_UWB is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_EMBEDDED_SDIO=y -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=8 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set -# CONFIG_MMC_SIMULATE_MAX_SPEED is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -CONFIG_HIMCIV300_SDIO_SYNOPSYS=y -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_TIFM_SD is not set -# CONFIG_MMC_CB710 is not set -# CONFIG_MMC_VIA_SDMMC is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MMC_USDHI6ROL0 is not set -# CONFIG_MMC_TOSHIBA_PCI is not set -# CONFIG_MMC_MTK is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -# CONFIG_LEDS_CLASS_FLASH is not set - -# -# LED drivers -# -# CONFIG_LEDS_BCM6328 is not set -# CONFIG_LEDS_BCM6358 is not set -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_LP8501 is not set -# CONFIG_LEDS_LP8860 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA963X is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_REGULATOR is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_TLC591XX is not set -# CONFIG_LEDS_LM355x is not set - -# -# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) -# -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -# CONFIG_LEDS_TRIGGER_TIMER is not set -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_INFINIBAND is not set -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VFIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -CONFIG_PRISM2_USB=m -# CONFIG_COMEDI is not set -# CONFIG_RTL8192U is not set -CONFIG_RTLLIB=m -CONFIG_RTLLIB_CRYPTO_CCMP=m -CONFIG_RTLLIB_CRYPTO_TKIP=m -CONFIG_RTLLIB_CRYPTO_WEP=m -# CONFIG_RTL8192E is not set -CONFIG_R8712U=m -CONFIG_R8188EU=m -# CONFIG_88EU_AP_MODE is not set -CONFIG_R8723AU=m -CONFIG_8723AU_AP_MODE=y -CONFIG_8723AU_BT_COEXIST=y -# CONFIG_RTS5208 is not set -# CONFIG_VT6655 is not set -# CONFIG_VT6656 is not set -# CONFIG_FB_SM750 is not set -# CONFIG_FB_XGI is not set - -# -# Speakup console speech -# -# CONFIG_SPEAKUP is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -CONFIG_STAGING_MEDIA=y -# CONFIG_I2C_BCM2048 is not set -# CONFIG_DVB_CXD2099 is not set -CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m - -# -# Android -# -CONFIG_ASHMEM=y -# CONFIG_ANDROID_LOGGER is not set -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_ION_DUMMY is not set -CONFIG_ION_HISI=y -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_STAGING_BOARD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_LTE_GDM724X is not set -# CONFIG_MTD_SPINAND_MT29F is not set -# CONFIG_LUSTRE_FS is not set -# CONFIG_DGNC is not set -# CONFIG_DGAP is not set -# CONFIG_GS_FPGABOOT is not set -# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set -# CONFIG_FB_TFT is not set -# CONFIG_WILC1000_DRIVER is not set -# CONFIG_MOST is not set -# CONFIG_GOLDFISH is not set -# CONFIG_CHROME_PLATFORMS is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_SI5351 is not set -# CONFIG_COMMON_CLK_SI514 is not set -# CONFIG_COMMON_CLK_SI570 is not set -# CONFIG_COMMON_CLK_CDCE925 is not set -# CONFIG_CLK_QORIQ is not set -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_CDCE706 is not set - -# -# Hardware Spinlock drivers -# - -# -# Clock Source drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y -CONFIG_CLKSRC_MMIO=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_TIMER_SP804=y -# CONFIG_ATMEL_PIT is not set -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_API=y -CONFIG_IOMMU_SUPPORT=y - -# -# Generic IOMMU Pagetable Support -# -# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set -CONFIG_OF_IOMMU=y -CONFIG_HISI_IOMMU_API=y -CONFIG_HISI_IOMMU=y -# CONFIG_ARM_SMMU is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# - -# -# SOC (System On Chip) specific Drivers -# -# CONFIG_SOC_BRCMSTB is not set -# CONFIG_SUNXI_SRAM is not set -# CONFIG_SOC_TI is not set -CONFIG_PM_DEVFREQ=y - -# -# DEVFREQ Governors -# -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set -# CONFIG_DEVFREQ_GOV_POWERSAVE is not set -# CONFIG_DEVFREQ_GOV_USERSPACE is not set - -# -# DEVFREQ Drivers -# -# CONFIG_PM_DEVFREQ_EVENT is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_NTB is not set -# CONFIG_VME_BUS is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -# CONFIG_IPACK_BUS is not set -CONFIG_RESET_CONTROLLER=y -# CONFIG_FMC is not set - -# -# PHY Subsystem -# -CONFIG_GENERIC_PHY=y -# CONFIG_PHY_PXA_28NM_HSIC is not set -# CONFIG_PHY_PXA_28NM_USB2 is not set -# CONFIG_BCM_KONA_USB2_PHY is not set -# CONFIG_POWERCAP is not set -# CONFIG_MCB is not set - -# -# Performance monitor support -# -CONFIG_ARM_PMU=y -CONFIG_RAS=y -# CONFIG_THUNDERBOLT is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_DEVICES="binder" -CONFIG_ANDROID_BINDER_IPC_32BIT=y -# CONFIG_NVMEM is not set -# CONFIG_STM is not set -# CONFIG_INTEL_TH is not set - -# -# FPGA Configuration Support -# -# CONFIG_FPGA is not set -# CONFIG_SWITCH is not set - -# -# Firmware Drivers -# -# CONFIG_FIRMWARE_MEMMAP is not set -CONFIG_HAVE_ARM_SMCCC=y - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_ENCRYPTION is not set -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -CONFIG_REISERFS_CHECK=y -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -CONFIG_JFS_DEBUG=y -CONFIG_JFS_STATISTICS=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_WARN is not set -# CONFIG_XFS_DEBUG is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_F2FS_FS=m -CONFIG_F2FS_STAT_FS=y -CONFIG_F2FS_FS_XATTR=y -CONFIG_F2FS_FS_POSIX_ACL=y -# CONFIG_F2FS_FS_SECURITY is not set -# CONFIG_F2FS_CHECK_FS is not set -# CONFIG_F2FS_FS_ENCRYPTION is not set -# CONFIG_F2FS_IO_TRACE is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=m -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -# CONFIG_OVERLAY_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=y -# CONFIG_FSCACHE_STATS is not set -# CONFIG_FSCACHE_HISTOGRAM is not set -# CONFIG_FSCACHE_DEBUG is not set -# CONFIG_FSCACHE_OBJECT_LIST is not set -# CONFIG_CACHEFILES is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -CONFIG_UDF_FS=y -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -# CONFIG_PROC_CHILDREN is not set -CONFIG_KERNFS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_ECRYPT_FS is not set -# CONFIG_SDCARD_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_YAFFS_FS=y -CONFIG_YAFFS_YAFFS1=y -# CONFIG_YAFFS_9BYTE_TAGS is not set -# CONFIG_YAFFS_DOES_ECC is not set -CONFIG_YAFFS_YAFFS2=y -CONFIG_YAFFS_AUTO_YAFFS2=y -# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set -# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set -# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set -# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set -# CONFIG_YAFFS_DISABLE_BACKGROUND is not set -# CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING is not set -CONFIG_YAFFS_XATTR=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -# CONFIG_JFFS2_LZO is not set -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_ATIME_SUPPORT is not set -# CONFIG_LOGFS is not set -CONFIG_CRAMFS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_FILE_CACHE=y -# CONFIG_SQUASHFS_FILE_DIRECT is not set -CONFIG_SQUASHFS_DECOMP_SINGLE=y -# CONFIG_SQUASHFS_DECOMP_MULTI is not set -# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set -CONFIG_SQUASHFS_XATTR=y -CONFIG_SQUASHFS_ZLIB=y -# CONFIG_SQUASHFS_LZ4 is not set -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=y -# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V2=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_SWAP=y -CONFIG_NFS_V4_1=y -CONFIG_NFS_V4_2=y -CONFIG_PNFS_FILE_LAYOUT=y -CONFIG_PNFS_FLEXFILE_LAYOUT=m -CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" -# CONFIG_NFS_V4_1_MIGRATION is not set -CONFIG_ROOT_NFS=y -# CONFIG_NFS_FSCACHE is not set -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_USE_KERNEL_DNS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_GRACE_PERIOD=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_SUNRPC_BACKCHANNEL=y -CONFIG_SUNRPC_SWAP=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_SUNRPC_DEBUG is not set -# CONFIG_CEPH_FS is not set -CONFIG_CIFS=y -CONFIG_CIFS_STATS=y -# CONFIG_CIFS_STATS2 is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_UPCALL is not set -CONFIG_CIFS_XATTR=y -# CONFIG_CIFS_POSIX is not set -# CONFIG_CIFS_ACL is not set -# CONFIG_CIFS_DEBUG is not set -CONFIG_CIFS_DFS_UPCALL=y -CONFIG_CIFS_SMB2=y -CONFIG_CIFS_SMB311=y -CONFIG_CIFS_FSCACHE=y -# CONFIG_NCP_FS is not set -CONFIG_CODA_FS=m -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=y -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# - -# -# printk and dmesg options -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_BOOT_PRINTK_DELAY is not set -CONFIG_DYNAMIC_DEBUG=y - -# -# Compile-time checks and compiler options -# -# CONFIG_DEBUG_INFO is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1024 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_PAGE_OWNER is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -CONFIG_DEBUG_KERNEL=y - -# -# Memory Debugging -# -# CONFIG_PAGE_EXTENSION is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_SHIRQ is not set - -# -# Debug Lockups and Hangs -# -CONFIG_LOCKUP_DETECTOR=y -CONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y -CONFIG_HARDLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1 -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -CONFIG_SCHED_DEBUG=y -# CONFIG_SCHED_INFO is not set -# CONFIG_PANIC_ON_RT_THROTTLING is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_SCHED_STACK_END_CHECK is not set -# CONFIG_DEBUG_TIMEKEEPING is not set -# CONFIG_TIMER_STATS is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_LOCK_TORTURE_TEST is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_PI_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_TORTURE_TEST is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -# CONFIG_RCU_TRACE is not set -# CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_GENERIC_TRACER=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -CONFIG_FUNCTION_TRACER=y -CONFIG_FUNCTION_GRAPH_TRACER=y -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_UPROBE_EVENT is not set -# CONFIG_PROBE_EVENTS is not set -CONFIG_DYNAMIC_FTRACE=y -# CONFIG_FUNCTION_PROFILER is not set -CONFIG_FTRACE_MCOUNT_RECORD=y -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_TRACEPOINT_BENCHMARK is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_TRACE_ENUM_MAP_FILE is not set -CONFIG_TRACING_EVENTS_GPIO=y - -# -# Runtime Testing -# -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_RBTREE_TEST is not set -# CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_PERCPU_TEST is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_TEST_HEXDUMP is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_TEST_FIRMWARE is not set -CONFIG_TEST_UDELAY=m -# CONFIG_MEMTEST is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_ARM_PTDUMP is not set -CONFIG_STRICT_DEVMEM=y -CONFIG_ARM_UNWIND=y -CONFIG_OLD_MCOUNT=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_UART_8250 is not set -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_DEBUG_SET_MODULE_RONX is not set -# CONFIG_CORESIGHT is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_PERSISTENT_KEYRINGS is not set -# CONFIG_BIG_KEYS is not set -# CONFIG_ENCRYPTED_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set -CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y -CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y -# CONFIG_HARDENED_USERCOPY is not set -CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_SECURITY="" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_AKCIPHER2=y -# CONFIG_CRYPTO_RSA is not set -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -# CONFIG_CRYPTO_MCRYPTD is not set -CONFIG_CRYPTO_AUTHENC=m -# CONFIG_CRYPTO_TEST is not set - -# -# Authenticated Encryption with Associated Data -# -CONFIG_CRYPTO_CCM=y -CONFIG_CRYPTO_GCM=m -# CONFIG_CRYPTO_CHACHA20POLY1305 is not set -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_ECHAINIV=m - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTR=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set -# CONFIG_CRYPTO_KEYWRAP is not set - -# -# Hash modes -# -CONFIG_CRYPTO_CMAC=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRC32=m -# CONFIG_CRYPTO_CRCT10DIF is not set -CONFIG_CRYPTO_GHASH=m -# CONFIG_CRYPTO_POLY1305 is not set -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_CHACHA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_842 is not set -# CONFIG_CRYPTO_LZ4 is not set -# CONFIG_CRYPTO_LZ4HC is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_DRBG_HMAC=y -# CONFIG_CRYPTO_DRBG_HASH is not set -# CONFIG_CRYPTO_DRBG_CTR is not set -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_JITTERENTROPY=y -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_USER_API_RNG is not set -# CONFIG_CRYPTO_USER_API_AEAD is not set -CONFIG_CRYPTO_HW=y -# CONFIG_CRYPTO_DEV_HIFN_795X is not set -# CONFIG_ASYMMETRIC_KEY_TYPE is not set - -# -# Certificates for signature checking -# -# CONFIG_SYSTEM_TRUSTED_KEYRING is not set -# CONFIG_ARM_CRYPTO is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_RATIONAL=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_NET_UTILS=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=m -# CONFIG_CRC8 is not set -# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set -# CONFIG_RANDOM32_SELFTEST is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_LZ4_DECOMPRESS=y -CONFIG_XZ_DEC=y -CONFIG_XZ_DEC_X86=y -CONFIG_XZ_DEC_POWERPC=y -CONFIG_XZ_DEC_IA64=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_ARMTHUMB=y -CONFIG_XZ_DEC_SPARC=y -CONFIG_XZ_DEC_BCJ=y -# CONFIG_XZ_DEC_TEST is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_DECOMPRESS_BZIP2=y -CONFIG_DECOMPRESS_LZMA=y -CONFIG_DECOMPRESS_XZ=y -CONFIG_DECOMPRESS_LZO=y -CONFIG_DECOMPRESS_LZ4=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_GLOB=y -# CONFIG_GLOB_SELFTEST is not set -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_LIBFDT=y -CONFIG_OID_REGISTRY=y -# CONFIG_SG_SPLIT is not set -CONFIG_ARCH_HAS_SG_CHAIN=y -# CONFIG_VIRTUALIZATION is not set diff --git a/archive-patches/armbox/hd60/dib7000-linux_4.4.179.patch b/archive-patches/armbox/hd60/dib7000-linux_4.4.179.patch deleted file mode 100644 index b3ceefa..0000000 --- a/archive-patches/armbox/hd60/dib7000-linux_4.4.179.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -Nur a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c ---- a/drivers/media/usb/dvb-usb/dib0700_core.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dib0700_core.c 2019-02-23 09:05:14.000000000 +0100 -@@ -783,6 +783,9 @@ - - /* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ - -+ if (intf->altsetting[0].desc.bNumEndpoints < rc_ep + 1) -+ return -ENODEV; -+ - purb = usb_alloc_urb(0, GFP_KERNEL); - if (purb == NULL) { - err("rc usb alloc urb failed"); -diff -Nur a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c ---- a/drivers/media/usb/dvb-usb/dib0700_devices.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c 2019-02-23 09:05:14.000000000 +0100 -@@ -292,7 +292,7 @@ - stk7700d_dib7000p_mt2266_config) - != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -326,7 +326,7 @@ - stk7700d_dib7000p_mt2266_config) - != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -431,6 +431,7 @@ - state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); - break; - case XC2028_RESET_CLK: -+ case XC2028_I2C_FLUSH: - break; - default: - err("%s: unknown command %d, arg %d\n", __func__, -@@ -479,7 +480,7 @@ - &stk7700ph_dib7700_xc3028_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -1010,7 +1011,7 @@ - &dib7070p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -1068,7 +1069,7 @@ - &dib7770p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3036,7 +3037,7 @@ - - if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); -@@ -3089,7 +3090,7 @@ - /* initialize IC 0 */ - if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3119,7 +3120,7 @@ - i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1); - if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3194,7 +3195,7 @@ - 1, 0x10, &tfe7790p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, -@@ -3289,7 +3290,7 @@ - stk7070pd_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3364,7 +3365,7 @@ - stk7070pd_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -3600,7 +3601,7 @@ - - if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { - /* Demodulator not found for some reason? */ -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -diff -Nur a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c ---- a/drivers/media/usb/dvb-usb/dibusb-common.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dibusb-common.c 2019-02-23 09:05:14.000000000 +0100 -@@ -179,8 +179,20 @@ - - int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) - { -- u8 wbuf[1] = { offs }; -- return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1); -+ u8 *buf; -+ int rc; -+ -+ buf = kmalloc(2, GFP_KERNEL); -+ if (!buf) -+ return -ENOMEM; -+ -+ buf[0] = offs; -+ -+ rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1); -+ *val = buf[1]; -+ kfree(buf); -+ -+ return rc; - } - EXPORT_SYMBOL(dibusb_read_eeprom_byte); - diff --git a/archive-patches/armbox/hd60/dvb-usb-linux_4.4.179.patch b/archive-patches/armbox/hd60/dvb-usb-linux_4.4.179.patch deleted file mode 100644 index ec672ce..0000000 --- a/archive-patches/armbox/hd60/dvb-usb-linux_4.4.179.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -Nur a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c ---- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 2019-02-23 09:05:14.000000000 +0100 -@@ -35,42 +35,51 @@ - - int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) - { -- struct hexline hx; -- u8 reset; -- int ret,pos=0; -+ struct hexline *hx; -+ u8 *buf; -+ int ret, pos = 0; -+ u16 cpu_cs_register = cypress[type].cpu_cs_register; -+ -+ buf = kmalloc(sizeof(*hx), GFP_KERNEL); -+ if (!buf) -+ return -ENOMEM; -+ hx = (struct hexline *)buf; - - /* stop the CPU */ -- reset = 1; -- if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1) -+ buf[0] = 1; -+ if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) - err("could not stop the USB controller CPU."); - -- while ((ret = dvb_usb_get_hexline(fw,&hx,&pos)) > 0) { -- deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n",hx.addr,hx.len,hx.chk); -- ret = usb_cypress_writemem(udev,hx.addr,hx.data,hx.len); -+ while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { -+ deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n", hx->addr, hx->len, hx->chk); -+ ret = usb_cypress_writemem(udev, hx->addr, hx->data, hx->len); - -- if (ret != hx.len) { -+ if (ret != hx->len) { - err("error while transferring firmware " - "(transferred size: %d, block size: %d)", -- ret,hx.len); -+ ret, hx->len); - ret = -EINVAL; - break; - } - } - if (ret < 0) { - err("firmware download failed at %d with %d",pos,ret); -+ kfree(buf); - return ret; - } - - if (ret == 0) { - /* restart the CPU */ -- reset = 0; -- if (ret || usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1) != 1) { -+ buf[0] = 0; -+ if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) { - err("could not restart the USB controller CPU."); - ret = -EINVAL; - } - } else - ret = -EIO; - -+ kfree(buf); -+ - return ret; - } - EXPORT_SYMBOL(usb_cypress_load_firmware); diff --git a/archive-patches/armbox/hd60/ieee80211-increase-scan-result-expire-time.patch b/archive-patches/armbox/hd60/ieee80211-increase-scan-result-expire-time.patch deleted file mode 100644 index 1ea4cdb..0000000 --- a/archive-patches/armbox/hd60/ieee80211-increase-scan-result-expire-time.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/wireless/scan.c -+++ b/net/wireless/scan.c -@@ -56,7 +56,7 @@ - * also linked into the probe response struct. - */ - --#define IEEE80211_SCAN_RESULT_EXPIRE (7 * HZ) -+#define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ) - - static void bss_free(struct cfg80211_internal_bss *bss) - { diff --git a/archive-patches/armbox/hd60/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch b/archive-patches/armbox/hd60/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch deleted file mode 100644 index 0fa0e04..0000000 --- a/archive-patches/armbox/hd60/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 170051d60cf08f9ae2cf296fb8410afdf56a911f Mon Sep 17 00:00:00 2001 -From: Miguel Ojeda -Date: Sat, 19 Jan 2019 20:59:34 +0100 -Subject: include/linux/module.h: copy __init/__exit attrs to - init/cleanup_module - -[ Upstream commit a6e60d84989fa0e91db7f236eda40453b0e44afa ] - -The upcoming GCC 9 release extends the -Wmissing-attributes warnings -(enabled by -Wall) to C and aliases: it warns when particular function -attributes are missing in the aliases but not in their target. - -In particular, it triggers for all the init/cleanup_module -aliases in the kernel (defined by the module_init/exit macros), -ending up being very noisy. - -These aliases point to the __init/__exit functions of a module, -which are defined as __cold (among other attributes). However, -the aliases themselves do not have the __cold attribute. - -Since the compiler behaves differently when compiling a __cold -function as well as when compiling paths leading to calls -to __cold functions, the warning is trying to point out -the possibly-forgotten attribute in the alias. - -In order to keep the warning enabled, we decided to silence -this case. Ideally, we would mark the aliases directly -as __init/__exit. However, there are currently around 132 modules -in the kernel which are missing __init/__exit in their init/cleanup -functions (either because they are missing, or for other reasons, -e.g. the functions being called from somewhere else); and -a section mismatch is a hard error. - -A conservative alternative was to mark the aliases as __cold only. -However, since we would like to eventually enforce __init/__exit -to be always marked, we chose to use the new __copy function -attribute (introduced by GCC 9 as well to deal with this). -With it, we copy the attributes used by the target functions -into the aliases. This way, functions that were not marked -as __init/__exit won't have their aliases marked either, -and therefore there won't be a section mismatch. - -Note that the warning would go away marking either the extern -declaration, the definition, or both. However, we only mark -the definition of the alias, since we do not want callers -(which only see the declaration) to be compiled as if the function -was __cold (and therefore the paths leading to those calls -would be assumed to be unlikely). - -Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/ -Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/ -Suggested-by: Martin Sebor -Acked-by: Jessica Yu -Signed-off-by: Miguel Ojeda -Signed-off-by: Sasha Levin ---- - include/linux/module.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -(limited to 'include/linux/module.h') - -diff --git a/include/linux/module.h b/include/linux/module.h -index dfe5c2e25ba1..d237d0574179 100644 ---- a/include/linux/module.h -+++ b/include/linux/module.h -@@ -127,13 +127,13 @@ extern void cleanup_module(void); - #define module_init(initfn) \ - static inline initcall_t __maybe_unused __inittest(void) \ - { return initfn; } \ -- int init_module(void) __attribute__((alias(#initfn))); -+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn))); - - /* This is only required if you want to be unloadable. */ - #define module_exit(exitfn) \ - static inline exitcall_t __maybe_unused __exittest(void) \ - { return exitfn; } \ -- void cleanup_module(void) __attribute__((alias(#exitfn))); -+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn))); - - #endif - --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd60/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch b/archive-patches/armbox/hd60/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch deleted file mode 100644 index 14cb69e..0000000 --- a/archive-patches/armbox/hd60/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 07d45a42fa21b54d83e563565699d25bde9f8cbe Mon Sep 17 00:00:00 2001 -From: Olli Salonen -Date: Sun, 30 Jul 2017 08:34:48 -0400 -Subject: media: mn88472: reset stream ID reg if no PLP given - -If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead. - -Signed-off-by: Olli Salonen -Signed-off-by: Mauro Carvalho Chehab ---- - drivers/media/dvb-frontends/mn88472.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -(limited to 'drivers/media/dvb-frontends/mn88472.c') - -diff --git a/drivers/media/dvb-frontends/mn88472.c b/drivers/media/dvb-frontends/mn88472.c -index f6938f9607ac..5e8fd63832e9 100644 ---- a/drivers/staging/media/mn88472/mn88472.c -+++ b/drivers/staging/media/mn88472/mn88472.c -@@ -377,7 +377,9 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - ret = regmap_write(dev->regmap[1], 0xf6, 0x05); - if (ret) - goto err; -- ret = regmap_write(dev->regmap[2], 0x32, c->stream_id); -+ ret = regmap_write(dev->regmap[2], 0x32, -+ (c->stream_id == NO_STREAM_ID_FILTER) ? 0 : -+ c->stream_id ); - if (ret) - goto err; - break; --- -cgit 1.2.3-1.el7 - diff --git a/archive-patches/armbox/hd60/modules_mark__inittest__exittest_as__maybe_unused.patch b/archive-patches/armbox/hd60/modules_mark__inittest__exittest_as__maybe_unused.patch deleted file mode 100644 index 8b3a33a..0000000 --- a/archive-patches/armbox/hd60/modules_mark__inittest__exittest_as__maybe_unused.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 89134f0918ec3bf4614ac2f9258543940e611f01 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -Date: Wed, 1 Feb 2017 18:00:14 +0100 -Subject: modules: mark __inittest/__exittest as __maybe_unused - -commit 1f318a8bafcfba9f0d623f4870c4e890fd22e659 upstream. - -clang warns about unused inline functions by default: - -arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function '__inittest' [-Wunused-function] -arch/arm/crypto/aes-cipher-glue.c:69:1: warning: unused function '__exittest' [-Wunused-function] - -As these appear in every single module, let's just disable the warnings by marking the -two functions as __maybe_unused. - -Signed-off-by: Arnd Bergmann -Reviewed-by: Miroslav Benes -Acked-by: Rusty Russell -Signed-off-by: Jessica Yu -Signed-off-by: Nathan Chancellor -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/module.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -(limited to 'include/linux/module.h') - -diff --git a/include/linux/module.h b/include/linux/module.h -index c9f2f85017ad..dfe5c2e25ba1 100644 ---- a/include/linux/module.h -+++ b/include/linux/module.h -@@ -125,13 +125,13 @@ extern void cleanup_module(void); - - /* Each module must use one module_init(). */ - #define module_init(initfn) \ -- static inline initcall_t __inittest(void) \ -+ static inline initcall_t __maybe_unused __inittest(void) \ - { return initfn; } \ - int init_module(void) __attribute__((alias(#initfn))); - - /* This is only required if you want to be unloadable. */ - #define module_exit(exitfn) \ -- static inline exitcall_t __exittest(void) \ -+ static inline exitcall_t __maybe_unused __exittest(void) \ - { return exitfn; } \ - void cleanup_module(void) __attribute__((alias(#exitfn))); - --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd60/move-default-dialect-to-SMB3.patch b/archive-patches/armbox/hd60/move-default-dialect-to-SMB3.patch deleted file mode 100644 index 67ee03d..0000000 --- a/archive-patches/armbox/hd60/move-default-dialect-to-SMB3.patch +++ /dev/null @@ -1,36 +0,0 @@ -[SMB3] Improve security, move default dialect to SMB3 from old CIFS -Due to recent publicity about security vulnerabilities in the -much older CIFS dialect, move the default dialect to the -widely accepted (and quite secure) SMB3.0 dialect from the -old default of the CIFS dialect. - -We do not want to be encouraging use of less secure dialects, -and both Microsoft and CERT now strongly recommend not using the -older CIFS dialect (SMB Security Best Practices -"recommends disabling SMBv1"). - -SMB3 is both secure and widely available: in Windows 8 and later, -Samba and Macs. - -Users can still choose to explicitly mount with the less secure -dialect (for old servers) by choosing "vers=1.0" on the cifs -mount - -Signed-off-by: Steve French -Reviewed-by: Pavel Shilovsky - ---- a/fs/cifs/connect.c 2019-10-19 09:34:13.448215659 +0200 -+++ b/fs/cifs/connect.c 2019-10-19 09:41:22.938494534 +0200 -@@ -1245,9 +1245,9 @@ - - vol->actimeo = CIFS_DEF_ACTIMEO; - -- /* FIXME: add autonegotiation -- for now, SMB1 is default */ -- vol->ops = &smb1_operations; -- vol->vals = &smb1_values; -+ /* FIXME: add autonegotiation for SMB3 or later rather than just SMB3 */ -+ vol->ops = &smb30_operations; /* both secure and accepted widely */ -+ vol->vals = &smb302_values; - - if (!mountdata) - goto cifs_parse_mount_err; diff --git a/archive-patches/armbox/hd60/wifi-linux_4.4.183.patch b/archive-patches/armbox/hd60/wifi-linux_4.4.183.patch deleted file mode 100644 index 5eb9402..0000000 --- a/archive-patches/armbox/hd60/wifi-linux_4.4.183.patch +++ /dev/null @@ -1,8663 +0,0 @@ ---- - drivers/net/wireless/at76c50x-usb.c | 4 +- - drivers/net/wireless/ath/ath10k/core.c | 25 ++- - drivers/net/wireless/ath/ath10k/core.h | 4 + - drivers/net/wireless/ath/ath10k/debug.c | 9 + - drivers/net/wireless/ath/ath10k/htt_rx.c | 110 ++++++++-- - drivers/net/wireless/ath/ath10k/mac.c | 105 ++++++++-- - drivers/net/wireless/ath/ath10k/pci.c | 2 +- - drivers/net/wireless/ath/ath10k/spectral.c | 2 +- - drivers/net/wireless/ath/ath10k/trace.h | 12 +- - drivers/net/wireless/ath/ath10k/wmi-ops.h | 6 + - drivers/net/wireless/ath/ath10k/wmi-tlv.c | 25 ++- - drivers/net/wireless/ath/ath10k/wmi-tlv.h | 5 + - drivers/net/wireless/ath/ath10k/wmi.c | 10 +- - drivers/net/wireless/ath/ath10k/wmi.h | 3 +- - drivers/net/wireless/ath/ath5k/debug.c | 5 +- - drivers/net/wireless/ath/ath5k/mac80211-ops.c | 3 +- - .../net/wireless/ath/ath9k/ar9003_eeprom.h | 4 +- - drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 - - drivers/net/wireless/ath/ath9k/ath9k.h | 1 + - .../net/wireless/ath/ath9k/common-spectral.c | 8 +- - drivers/net/wireless/ath/ath9k/hif_usb.c | 4 + - drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 +- - drivers/net/wireless/ath/ath9k/hw.c | 4 + - drivers/net/wireless/ath/ath9k/init.c | 1 + - drivers/net/wireless/ath/ath9k/mac.c | 44 +++- - drivers/net/wireless/ath/ath9k/mac.h | 1 + - drivers/net/wireless/ath/ath9k/main.c | 35 ++-- - drivers/net/wireless/ath/ath9k/pci.c | 7 +- - drivers/net/wireless/ath/ath9k/tx99.c | 18 +- - drivers/net/wireless/ath/carl9170/main.c | 8 +- - drivers/net/wireless/ath/regd.c | 19 +- - drivers/net/wireless/ath/regd.h | 5 + - drivers/net/wireless/ath/regd_common.h | 13 ++ - drivers/net/wireless/ath/wcn36xx/main.c | 8 +- - drivers/net/wireless/ath/wcn36xx/txrx.c | 2 +- - drivers/net/wireless/ath/wil6210/main.c | 35 +++- - drivers/net/wireless/ath/wil6210/wmi.c | 8 +- - drivers/net/wireless/b43/phy_common.c | 2 +- - drivers/net/wireless/b43/phy_lp.c | 6 +- - .../net/wireless/brcm80211/brcmfmac/bcmsdh.c | 8 +- - drivers/net/wireless/brcm80211/brcmfmac/bus.h | 4 +- - .../wireless/brcm80211/brcmfmac/cfg80211.c | 70 ++++--- - .../net/wireless/brcm80211/brcmfmac/core.c | 68 +++--- - .../net/wireless/brcm80211/brcmfmac/fweh.c | 57 ++--- - .../net/wireless/brcm80211/brcmfmac/fweh.h | 82 ++++++-- - .../wireless/brcm80211/brcmfmac/fwil_types.h | 5 + - .../net/wireless/brcm80211/brcmfmac/msgbuf.c | 42 ++-- - drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 34 +-- - .../net/wireless/brcm80211/brcmfmac/sdio.c | 46 +++- - drivers/net/wireless/brcm80211/brcmfmac/usb.c | 29 +-- - .../net/wireless/brcm80211/brcmfmac/vendor.c | 5 +- - .../wireless/brcm80211/brcmsmac/mac80211_if.c | 8 +- - .../wireless/brcm80211/brcmsmac/phy/phy_n.c | 197 +++++++++--------- - drivers/net/wireless/cw1200/cw1200_spi.c | 9 +- - drivers/net/wireless/cw1200/main.c | 5 + - drivers/net/wireless/cw1200/pm.h | 9 +- - drivers/net/wireless/cw1200/scan.c | 18 +- - drivers/net/wireless/cw1200/sta.c | 4 +- - drivers/net/wireless/cw1200/sta.h | 4 +- - drivers/net/wireless/cw1200/wsm.c | 24 +-- - drivers/net/wireless/hostap/hostap_hw.c | 15 +- - drivers/net/wireless/iwlegacy/4965-mac.c | 8 +- - drivers/net/wireless/iwlegacy/4965.h | 4 +- - drivers/net/wireless/iwlwifi/dvm/mac80211.c | 9 +- - drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 70 +++++-- - drivers/net/wireless/iwlwifi/mvm/mac80211.c | 31 ++- - drivers/net/wireless/iwlwifi/mvm/nvm.c | 5 +- - drivers/net/wireless/iwlwifi/pcie/rx.c | 2 + - drivers/net/wireless/mac80211_hwsim.c | 90 +++++--- - .../net/wireless/mediatek/mt7601u/eeprom.h | 2 +- - drivers/net/wireless/mediatek/mt7601u/main.c | 8 +- - drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 +- - drivers/net/wireless/mwifiex/11n_aggr.c | 19 +- - drivers/net/wireless/mwifiex/cfg80211.c | 25 ++- - drivers/net/wireless/mwifiex/cfp.c | 3 + - drivers/net/wireless/mwifiex/debugfs.c | 3 +- - drivers/net/wireless/mwifiex/pcie.c | 7 + - drivers/net/wireless/mwifiex/scan.c | 6 + - drivers/net/wireless/mwifiex/sta_ioctl.c | 2 - - drivers/net/wireless/mwifiex/usb.c | 3 + - drivers/net/wireless/mwifiex/util.c | 8 +- - drivers/net/wireless/mwifiex/wmm.c | 12 +- - drivers/net/wireless/mwl8k.c | 10 +- - drivers/net/wireless/p54/fwio.c | 2 +- - drivers/net/wireless/ray_cs.c | 7 +- - .../wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- - .../net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +- - drivers/net/wireless/realtek/rtlwifi/base.c | 13 +- - drivers/net/wireless/realtek/rtlwifi/core.c | 18 +- - drivers/net/wireless/realtek/rtlwifi/pci.c | 25 ++- - drivers/net/wireless/realtek/rtlwifi/pci.h | 4 +- - drivers/net/wireless/realtek/rtlwifi/ps.c | 36 +++- - .../wireless/realtek/rtlwifi/rtl8192cu/rf.c | 3 - - .../wireless/realtek/rtlwifi/rtl8192ee/fw.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- - .../wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 +- - .../wireless/realtek/rtlwifi/rtl8821ae/dm.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8821ae/hw.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8821ae/phy.c | 122 +++++++++-- - .../wireless/realtek/rtlwifi/rtl8821ae/reg.h | 1 + - drivers/net/wireless/realtek/rtlwifi/usb.c | 19 ++ - drivers/net/wireless/realtek/rtlwifi/usb.h | 3 +- - drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + - drivers/net/wireless/rndis_wlan.c | 6 + - drivers/net/wireless/rsi/rsi_91x_mac80211.c | 19 +- - drivers/net/wireless/rsi/rsi_91x_sdio.c | 2 - - drivers/net/wireless/rsi/rsi_common.h | 1 - - drivers/net/wireless/rt2x00/rt2800lib.c | 7 +- - drivers/net/wireless/rt2x00/rt2800lib.h | 4 +- - drivers/net/wireless/ti/wl1251/main.c | 4 +- - drivers/net/wireless/ti/wl18xx/event.c | 28 +++ - drivers/net/wireless/ti/wl18xx/event.h | 1 + - drivers/net/wireless/ti/wl18xx/main.c | 3 +- - drivers/net/wireless/ti/wlcore/acx.c | 5 +- - drivers/net/wireless/ti/wlcore/acx.h | 3 +- - drivers/net/wireless/ti/wlcore/init.c | 5 - - drivers/net/wireless/ti/wlcore/main.c | 21 +- - drivers/net/wireless/ti/wlcore/sdio.c | 5 + - drivers/net/wireless/ti/wlcore/spi.c | 2 +- - drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- - drivers/staging/rtl8188eu/core/rtw_recv.c | 3 + - drivers/staging/rtl8188eu/include/rtw_debug.h | 2 +- - .../staging/rtl8188eu/os_dep/ioctl_linux.c | 14 +- - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 3 + - .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 24 ++- - drivers/staging/rtl8192u/r8192U_core.c | 2 + - drivers/staging/rtl8712/ieee80211.h | 84 ++++---- - drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- - drivers/staging/rtl8712/rtl871x_recv.c | 7 +- - drivers/staging/rtl8712/rtl871x_xmit.c | 7 +- - drivers/staging/wlan-ng/p80211netdev.c | 2 +- - drivers/staging/wlan-ng/prism2mgmt.c | 2 +- - include/linux/mmc/sdio_ids.h | 1 + - include/linux/nospec.h | 68 ++++++ - include/net/cfg80211.h | 13 +- - include/net/mac80211.h | 64 ++++-- - include/uapi/linux/nl80211.h | 2 + - net/mac80211/agg-rx.c | 32 ++- - net/mac80211/agg-tx.c | 53 +++-- - net/mac80211/cfg.c | 10 +- - net/mac80211/debugfs.c | 7 +- - net/mac80211/driver-ops.c | 10 +- - net/mac80211/driver-ops.h | 7 +- - net/mac80211/ibss.c | 28 +-- - net/mac80211/ieee80211_i.h | 1 - - net/mac80211/iface.c | 4 +- - net/mac80211/key.c | 77 +++++-- - net/mac80211/main.c | 39 +++- - net/mac80211/mesh.c | 7 +- - net/mac80211/mesh_hwmp.c | 19 +- - net/mac80211/mesh_plink.c | 14 +- - net/mac80211/mesh_sync.c | 11 - - net/mac80211/mlme.c | 84 ++++++-- - net/mac80211/offchannel.c | 2 + - net/mac80211/pm.c | 1 + - net/mac80211/rx.c | 39 +++- - net/mac80211/sta_info.c | 5 +- - net/mac80211/status.c | 10 +- - net/mac80211/trace.h | 43 ++-- - net/mac80211/tx.c | 19 +- - net/mac80211/util.c | 8 +- - net/mac80211/wep.c | 3 +- - net/mac80211/wpa.c | 54 +++-- - net/rfkill/Kconfig | 5 - - net/rfkill/core.c | 4 +- - net/rfkill/rfkill-gpio.c | 7 +- - net/wireless/core.c | 11 +- - net/wireless/core.h | 2 + - net/wireless/mlme.c | 12 ++ - net/wireless/nl80211.c | 192 +++++++++-------- - net/wireless/reg.c | 5 +- - net/wireless/scan.c | 71 ++++++- - net/wireless/sme.c | 14 ++ - net/wireless/util.c | 2 +- - 174 files changed, 2220 insertions(+), 1047 deletions(-) - create mode 100644 include/linux/nospec.h - -diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c -index dab25136..da14eca2 100644 ---- a/drivers/net/wireless/at76c50x-usb.c -+++ b/drivers/net/wireless/at76c50x-usb.c -@@ -2582,8 +2582,8 @@ static int __init at76_mod_init(void) - if (result < 0) - printk(KERN_ERR DRIVER_NAME - ": usb_register failed (status %d)\n", result); -- -- led_trigger_register_simple("at76_usb-tx", &ledtrig_tx); -+ else -+ led_trigger_register_simple("at76_usb-tx", &ledtrig_tx); - return result; - } - -diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c -index 531de256..0c23768a 100644 ---- a/drivers/net/wireless/ath/ath10k/core.c -+++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -67,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA988X_BOARD_DATA_SZ, - .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_2_1_VERSION, -@@ -85,6 +86,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_2_1_VERSION, -@@ -103,6 +105,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_3_0_VERSION, -@@ -121,6 +124,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_3_2_VERSION, -@@ -140,6 +144,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA99X0_HW_2_0_DEV_VERSION, -@@ -159,6 +164,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA99X0_BOARD_DATA_SZ, - .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 1, - }, - { - .id = QCA9377_HW_1_0_DEV_VERSION, -@@ -177,6 +183,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA9377_BOARD_DATA_SZ, - .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA9377_HW_1_1_DEV_VERSION, -@@ -195,6 +202,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA9377_BOARD_DATA_SZ, - .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - }; - -@@ -548,8 +556,11 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar) - "boot get otp board id result 0x%08x board_id %d chip_id %d\n", - result, board_id, chip_id); - -- if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0) -+ if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0 || -+ (board_id == 0)) { -+ ath10k_warn(ar, "board id is not exist in otp, ignore it\n"); - return -EOPNOTSUPP; -+ } - - ar->id.bmi_ids_valid = true; - ar->id.bmi_board_id = board_id; -@@ -1607,6 +1618,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) - goto err_wmi_detach; - } - -+ /* If firmware indicates Full Rx Reorder support it must be used in a -+ * slightly different manner. Let HTT code know. -+ */ -+ ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER, -+ ar->wmi.svc_map)); -+ - status = ath10k_htt_rx_alloc(&ar->htt); - if (status) { - ath10k_err(ar, "failed to alloc htt rx: %d\n", status); -@@ -1669,12 +1686,6 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) - goto err_hif_stop; - } - -- /* If firmware indicates Full Rx Reorder support it must be used in a -- * slightly different manner. Let HTT code know. -- */ -- ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER, -- ar->wmi.svc_map)); -- - status = ath10k_htt_rx_ring_refill(ar); - if (status) { - ath10k_err(ar, "failed to refill htt rx ring: %d\n", status); -diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h -index 858d75f4..257836a0 100644 ---- a/drivers/net/wireless/ath/ath10k/core.h -+++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -670,6 +670,10 @@ struct ath10k { - size_t board_size; - size_t board_ext_size; - } fw; -+ -+ /* Number of bytes used for alignment in rx_hdr_status */ -+ int decap_align_bytes; -+ - } hw_params; - - const struct firmware *board; -diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c -index 1a88a24f..30c35756 100644 ---- a/drivers/net/wireless/ath/ath10k/debug.c -+++ b/drivers/net/wireless/ath/ath10k/debug.c -@@ -1892,6 +1892,15 @@ static ssize_t ath10k_write_simulate_radar(struct file *file, - size_t count, loff_t *ppos) - { - struct ath10k *ar = file->private_data; -+ struct ath10k_vif *arvif; -+ -+ /* Just check for for the first vif alone, as all the vifs will be -+ * sharing the same channel and if the channel is disabled, all the -+ * vifs will share the same 'is_started' state. -+ */ -+ arvif = list_first_entry(&ar->arvifs, typeof(*arvif), list); -+ if (!arvif->is_started) -+ return -EINVAL; - - ieee80211_radar_detected(ar->hw); - -diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c -index 6060dda4..a65b5d7f 100644 ---- a/drivers/net/wireless/ath/ath10k/htt_rx.c -+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c -@@ -212,11 +212,12 @@ int ath10k_htt_rx_ring_refill(struct ath10k *ar) - spin_lock_bh(&htt->rx_ring.lock); - ret = ath10k_htt_rx_ring_fill_n(htt, (htt->rx_ring.fill_level - - htt->rx_ring.fill_cnt)); -- spin_unlock_bh(&htt->rx_ring.lock); - - if (ret) - ath10k_htt_rx_ring_free(htt); - -+ spin_unlock_bh(&htt->rx_ring.lock); -+ - return ret; - } - -@@ -230,7 +231,9 @@ void ath10k_htt_rx_free(struct ath10k_htt *htt) - skb_queue_purge(&htt->rx_compl_q); - skb_queue_purge(&htt->rx_in_ord_compl_q); - -+ spin_lock_bh(&htt->rx_ring.lock); - ath10k_htt_rx_ring_free(htt); -+ spin_unlock_bh(&htt->rx_ring.lock); - - dma_free_coherent(htt->ar->dev, - (htt->rx_ring.size * -@@ -979,7 +982,7 @@ static void ath10k_process_rx(struct ath10k *ar, - *status = *rx_status; - - ath10k_dbg(ar, ATH10K_DBG_DATA, -- "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", -+ "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n", - skb, - skb->len, - ieee80211_get_SA(hdr), -@@ -1076,7 +1079,21 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, - hdr = (void *)msdu->data; - - /* Tail */ -- skb_trim(msdu, msdu->len - ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ if (status->flag & RX_FLAG_IV_STRIPPED) { -+ skb_trim(msdu, msdu->len - -+ ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ } else { -+ /* MIC */ -+ if ((status->flag & RX_FLAG_MIC_STRIPPED) && -+ enctype == HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2) -+ skb_trim(msdu, msdu->len - 8); -+ -+ /* ICV */ -+ if (status->flag & RX_FLAG_ICV_STRIPPED && -+ enctype != HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2) -+ skb_trim(msdu, msdu->len - -+ ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ } - - /* MMIC */ - if (!ieee80211_has_morefrags(hdr->frame_control) && -@@ -1095,12 +1112,14 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, - static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar, - struct sk_buff *msdu, - struct ieee80211_rx_status *status, -- const u8 first_hdr[64]) -+ const u8 first_hdr[64], -+ enum htt_rx_mpdu_encrypt_type enctype) - { - struct ieee80211_hdr *hdr; - size_t hdr_len; - u8 da[ETH_ALEN]; - u8 sa[ETH_ALEN]; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [nwifi 802.11 header] <-- replaced with 802.11 hdr -@@ -1123,6 +1142,14 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar, - /* push original 802.11 header */ - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - - /* original 802.11 header has a different DA and in -@@ -1142,6 +1169,7 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, - size_t hdr_len, crypto_len; - void *rfc1042; - bool is_first, is_last, is_amsdu; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - rxd = (void *)msdu->data - sizeof(*rxd); - hdr = (void *)rxd->rx_hdr_status; -@@ -1158,8 +1186,8 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, - hdr_len = ieee80211_hdrlen(hdr->frame_control); - crypto_len = ath10k_htt_rx_crypto_param_len(ar, enctype); - -- rfc1042 += round_up(hdr_len, 4) + -- round_up(crypto_len, 4); -+ rfc1042 += round_up(hdr_len, bytes_aligned) + -+ round_up(crypto_len, bytes_aligned); - } - - if (is_amsdu) -@@ -1180,6 +1208,7 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - void *rfc1042; - u8 da[ETH_ALEN]; - u8 sa[ETH_ALEN]; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [eth header] <-- replaced with 802.11 hdr & rfc1042/llc -@@ -1203,6 +1232,14 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - /* push original 802.11 header */ - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - - /* original 802.11 header has a different DA and in -@@ -1216,10 +1253,12 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar, - struct sk_buff *msdu, - struct ieee80211_rx_status *status, -- const u8 first_hdr[64]) -+ const u8 first_hdr[64], -+ enum htt_rx_mpdu_encrypt_type enctype) - { - struct ieee80211_hdr *hdr; - size_t hdr_len; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [amsdu header] <-- replaced with 802.11 hdr -@@ -1231,6 +1270,14 @@ static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar, - - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - } - -@@ -1265,13 +1312,15 @@ static void ath10k_htt_rx_h_undecap(struct ath10k *ar, - is_decrypted); - break; - case RX_MSDU_DECAP_NATIVE_WIFI: -- ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr); -+ ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr, -+ enctype); - break; - case RX_MSDU_DECAP_ETHERNET2_DIX: - ath10k_htt_rx_h_undecap_eth(ar, msdu, status, first_hdr, enctype); - break; - case RX_MSDU_DECAP_8023_SNAP_LLC: -- ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr); -+ ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr, -+ enctype); - break; - } - } -@@ -1314,7 +1363,8 @@ static void ath10k_htt_rx_h_csum_offload(struct sk_buff *msdu) - - static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - struct sk_buff_head *amsdu, -- struct ieee80211_rx_status *status) -+ struct ieee80211_rx_status *status, -+ bool fill_crypt_header) - { - struct sk_buff *first; - struct sk_buff *last; -@@ -1324,7 +1374,6 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - enum htt_rx_mpdu_encrypt_type enctype; - u8 first_hdr[64]; - u8 *qos; -- size_t hdr_len; - bool has_fcs_err; - bool has_crypto_err; - bool has_tkip_err; -@@ -1345,15 +1394,17 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - * decapped header. It'll be used for undecapping of each MSDU. - */ - hdr = (void *)rxd->rx_hdr_status; -- hdr_len = ieee80211_hdrlen(hdr->frame_control); -- memcpy(first_hdr, hdr, hdr_len); -+ memcpy(first_hdr, hdr, RX_HTT_HDR_STATUS_LEN); - - /* Each A-MSDU subframe will use the original header as the base and be - * reported as a separate MSDU so strip the A-MSDU bit from QoS Ctl. - */ - hdr = (void *)first_hdr; -- qos = ieee80211_get_qos_ctl(hdr); -- qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; -+ -+ if (ieee80211_is_data_qos(hdr->frame_control)) { -+ qos = ieee80211_get_qos_ctl(hdr); -+ qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; -+ } - - /* Some attention flags are valid only in the last MSDU. */ - last = skb_peek_tail(amsdu); -@@ -1387,11 +1438,17 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - if (has_tkip_err) - status->flag |= RX_FLAG_MMIC_ERROR; - -- if (is_decrypted) -+ if (is_decrypted) { - status->flag |= RX_FLAG_DECRYPTED | -- RX_FLAG_IV_STRIPPED | - RX_FLAG_MMIC_STRIPPED; - -+ if (fill_crypt_header) -+ status->flag |= RX_FLAG_MIC_STRIPPED | -+ RX_FLAG_ICV_STRIPPED; -+ else -+ status->flag |= RX_FLAG_IV_STRIPPED; -+ } -+ - skb_queue_walk(amsdu, msdu) { - ath10k_htt_rx_h_csum_offload(msdu); - ath10k_htt_rx_h_undecap(ar, msdu, status, first_hdr, enctype, -@@ -1404,6 +1461,9 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - if (!is_decrypted) - continue; - -+ if (fill_crypt_header) -+ continue; -+ - hdr = (void *)msdu->data; - hdr->frame_control &= ~__cpu_to_le16(IEEE80211_FCTL_PROTECTED); - } -@@ -1414,6 +1474,9 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar, - struct ieee80211_rx_status *status) - { - struct sk_buff *msdu; -+ struct sk_buff *first_subframe; -+ -+ first_subframe = skb_peek(amsdu); - - while ((msdu = __skb_dequeue(amsdu))) { - /* Setup per-MSDU flags */ -@@ -1422,6 +1485,13 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar, - else - status->flag |= RX_FLAG_AMSDU_MORE; - -+ if (msdu == first_subframe) { -+ first_subframe = NULL; -+ status->flag &= ~RX_FLAG_ALLOW_SAME_PN; -+ } else { -+ status->flag |= RX_FLAG_ALLOW_SAME_PN; -+ } -+ - ath10k_process_rx(ar, status, msdu); - } - } -@@ -1607,7 +1677,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt, - ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff); - ath10k_htt_rx_h_unchain(ar, &amsdu, ret > 0); - ath10k_htt_rx_h_filter(ar, &amsdu, rx_status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status, true); - ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status); - } - -@@ -1653,7 +1723,7 @@ static void ath10k_htt_rx_frag_handler(struct ath10k_htt *htt, - - ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff); - ath10k_htt_rx_h_filter(ar, &amsdu, rx_status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status, true); - ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status); - - if (fw_desc_len > 0) { -@@ -1952,7 +2022,7 @@ static void ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb) - */ - ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id); - ath10k_htt_rx_h_filter(ar, &amsdu, status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, status, false); - ath10k_htt_rx_h_deliver(ar, &amsdu, status); - break; - case -EAGAIN: -diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c -index 1e1bef34..398068ad 100644 ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1127,6 +1127,36 @@ static int ath10k_monitor_recalc(struct ath10k *ar) - return ath10k_monitor_stop(ar); - } - -+static bool ath10k_mac_can_set_cts_prot(struct ath10k_vif *arvif) -+{ -+ struct ath10k *ar = arvif->ar; -+ -+ lockdep_assert_held(&ar->conf_mutex); -+ -+ if (!arvif->is_started) { -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "defer cts setup, vdev is not ready yet\n"); -+ return false; -+ } -+ -+ return true; -+} -+ -+static int ath10k_mac_set_cts_prot(struct ath10k_vif *arvif) -+{ -+ struct ath10k *ar = arvif->ar; -+ u32 vdev_param; -+ -+ lockdep_assert_held(&ar->conf_mutex); -+ -+ vdev_param = ar->wmi.vdev_param->protection_mode; -+ -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev %d cts_protection %d\n", -+ arvif->vdev_id, arvif->use_cts_prot); -+ -+ return ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ arvif->use_cts_prot ? 1 : 0); -+} -+ - static int ath10k_recalc_rtscts_prot(struct ath10k_vif *arvif) - { - struct ath10k *ar = arvif->ar; -@@ -2871,6 +2901,13 @@ static int ath10k_update_channel_list(struct ath10k *ar) - passive = channel->flags & IEEE80211_CHAN_NO_IR; - ch->passive = passive; - -+ /* the firmware is ignoring the "radar" flag of the -+ * channel and is scanning actively using Probe Requests -+ * on "Radar detection"/DFS channels which are not -+ * marked as "available" -+ */ -+ ch->passive |= ch->chan_radar; -+ - ch->freq = channel->center_freq; - ch->band_center_freq1 = channel->center_freq; - ch->min_power = 0; -@@ -4180,7 +4217,8 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar) - lockdep_assert_held(&ar->conf_mutex); - - list_for_each_entry(arvif, &ar->arvifs, list) { -- WARN_ON(arvif->txpower < 0); -+ if (arvif->txpower <= 0) -+ continue; - - if (txpower == -1) - txpower = arvif->txpower; -@@ -4188,8 +4226,8 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar) - txpower = min(txpower, arvif->txpower); - } - -- if (WARN_ON(txpower == -1)) -- return -EINVAL; -+ if (txpower == -1) -+ return 0; - - ret = ath10k_mac_txpower_setup(ar, txpower); - if (ret) { -@@ -4432,7 +4470,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, - } - - ar->free_vdev_map &= ~(1LL << arvif->vdev_id); -+ spin_lock_bh(&ar->data_lock); - list_add(&arvif->list, &ar->arvifs); -+ spin_unlock_bh(&ar->data_lock); - - /* It makes no sense to have firmware do keepalives. mac80211 already - * takes care of this with idle connection polling. -@@ -4565,7 +4605,9 @@ err_peer_delete: - err_vdev_delete: - ath10k_wmi_vdev_delete(ar, arvif->vdev_id); - ar->free_vdev_map |= 1LL << arvif->vdev_id; -+ spin_lock_bh(&ar->data_lock); - list_del(&arvif->list); -+ spin_unlock_bh(&ar->data_lock); - - err: - if (arvif->beacon_buf) { -@@ -4609,7 +4651,9 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw, - arvif->vdev_id, ret); - - ar->free_vdev_map |= 1LL << arvif->vdev_id; -+ spin_lock_bh(&ar->data_lock); - list_del(&arvif->list); -+ spin_unlock_bh(&ar->data_lock); - - if (arvif->vdev_type == WMI_VDEV_TYPE_AP || - arvif->vdev_type == WMI_VDEV_TYPE_IBSS) { -@@ -4787,20 +4831,18 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, - - if (changed & BSS_CHANGED_ERP_CTS_PROT) { - arvif->use_cts_prot = info->use_cts_prot; -- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev %d cts_prot %d\n", -- arvif->vdev_id, info->use_cts_prot); - - ret = ath10k_recalc_rtscts_prot(arvif); - if (ret) - ath10k_warn(ar, "failed to recalculate rts/cts prot for vdev %d: %d\n", - arvif->vdev_id, ret); - -- vdev_param = ar->wmi.vdev_param->protection_mode; -- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -- info->use_cts_prot ? 1 : 0); -- if (ret) -- ath10k_warn(ar, "failed to set protection mode %d on vdev %i: %d\n", -- info->use_cts_prot, arvif->vdev_id, ret); -+ if (ath10k_mac_can_set_cts_prot(arvif)) { -+ ret = ath10k_mac_set_cts_prot(arvif); -+ if (ret) -+ ath10k_warn(ar, "failed to set cts protection for vdev %d: %d\n", -+ arvif->vdev_id, ret); -+ } - } - - if (changed & BSS_CHANGED_ERP_SLOT) { -@@ -5256,9 +5298,8 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) - sta->addr, smps, err); - } - -- if (changed & IEEE80211_RC_SUPP_RATES_CHANGED || -- changed & IEEE80211_RC_NSS_CHANGED) { -- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates/nss\n", -+ if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) { -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates\n", - sta->addr); - - err = ath10k_station_assoc(ar, arvif->vif, sta, true); -@@ -5468,6 +5509,16 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, - "mac vdev %d peer delete %pM (sta gone)\n", - arvif->vdev_id, sta->addr); - -+ if (sta->tdls) { -+ ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id, -+ sta, -+ WMI_TDLS_PEER_STATE_TEARDOWN); -+ if (ret) -+ ath10k_warn(ar, "failed to update tdls peer state for %pM state %d: %i\n", -+ sta->addr, -+ WMI_TDLS_PEER_STATE_TEARDOWN, ret); -+ } -+ - ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr); - if (ret) - ath10k_warn(ar, "failed to delete peer %pM for vdev %d: %i\n", -@@ -6273,10 +6324,20 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, - { - struct ath10k *ar = hw->priv; - struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; -+ struct ath10k_vif *arvif = (void *)vif->drv_priv; -+ struct ath10k_peer *peer; - u32 bw, smps; - - spin_lock_bh(&ar->data_lock); - -+ peer = ath10k_peer_find(ar, arvif->vdev_id, sta->addr); -+ if (!peer) { -+ spin_unlock_bh(&ar->data_lock); -+ ath10k_warn(ar, "mac sta rc update failed to find peer %pM on vdev %i\n", -+ sta->addr, arvif->vdev_id); -+ return; -+ } -+ - ath10k_dbg(ar, ATH10K_DBG_MAC, - "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n", - sta->addr, changed, sta->bandwidth, sta->rx_nss, -@@ -6351,12 +6412,13 @@ static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - - static int ath10k_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath10k *ar = hw->priv; - struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - - ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ampdu vdev_id %i sta %pM tid %hu action %d\n", - arvif->vdev_id, sta->addr, tid, action); -@@ -6397,7 +6459,7 @@ ath10k_mac_update_rx_channel(struct ath10k *ar, - lockdep_assert_held(&ar->data_lock); - - WARN_ON(ctx && vifs); -- WARN_ON(vifs && n_vifs != 1); -+ WARN_ON(vifs && !n_vifs); - - /* FIXME: Sort of an optimization and a workaround. Peers and vifs are - * on a linked list now. Doing a lookup peer -> vif -> chanctx for each -@@ -6711,6 +6773,13 @@ ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, - arvif->is_up = true; - } - -+ if (ath10k_mac_can_set_cts_prot(arvif)) { -+ ret = ath10k_mac_set_cts_prot(arvif); -+ if (ret) -+ ath10k_warn(ar, "failed to set cts protection for vdev %d: %d\n", -+ arvif->vdev_id, ret); -+ } -+ - mutex_unlock(&ar->conf_mutex); - return 0; - -diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c -index 930785a7..907fd60c 100644 ---- a/drivers/net/wireless/ath/ath10k/pci.c -+++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -3050,7 +3050,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, - goto err_core_destroy; - } - -- if (QCA_REV_6174(ar)) -+ if (QCA_REV_6174(ar) || QCA_REV_9377(ar)) - ath10k_pci_override_ce_config(ar); - - ret = ath10k_pci_alloc_pipes(ar); -diff --git a/drivers/net/wireless/ath/ath10k/spectral.c b/drivers/net/wireless/ath/ath10k/spectral.c -index 4671cfbc..a0e7eebc 100644 ---- a/drivers/net/wireless/ath/ath10k/spectral.c -+++ b/drivers/net/wireless/ath/ath10k/spectral.c -@@ -338,7 +338,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file, - } else { - res = -EINVAL; - } -- } else if (strncmp("background", buf, 9) == 0) { -+ } else if (strncmp("background", buf, 10) == 0) { - res = ath10k_spectral_scan_config(ar, SPECTRAL_BACKGROUND); - } else if (strncmp("manual", buf, 6) == 0) { - res = ath10k_spectral_scan_config(ar, SPECTRAL_MANUAL); -diff --git a/drivers/net/wireless/ath/ath10k/trace.h b/drivers/net/wireless/ath/ath10k/trace.h -index 71bdb368..0194bebb 100644 ---- a/drivers/net/wireless/ath/ath10k/trace.h -+++ b/drivers/net/wireless/ath/ath10k/trace.h -@@ -152,10 +152,9 @@ TRACE_EVENT(ath10k_log_dbg_dump, - ); - - TRACE_EVENT(ath10k_wmi_cmd, -- TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len, -- int ret), -+ TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len), - -- TP_ARGS(ar, id, buf, buf_len, ret), -+ TP_ARGS(ar, id, buf, buf_len), - - TP_STRUCT__entry( - __string(device, dev_name(ar->dev)) -@@ -163,7 +162,6 @@ TRACE_EVENT(ath10k_wmi_cmd, - __field(unsigned int, id) - __field(size_t, buf_len) - __dynamic_array(u8, buf, buf_len) -- __field(int, ret) - ), - - TP_fast_assign( -@@ -171,17 +169,15 @@ TRACE_EVENT(ath10k_wmi_cmd, - __assign_str(driver, dev_driver_string(ar->dev)); - __entry->id = id; - __entry->buf_len = buf_len; -- __entry->ret = ret; - memcpy(__get_dynamic_array(buf), buf, buf_len); - ), - - TP_printk( -- "%s %s id %d len %zu ret %d", -+ "%s %s id %d len %zu", - __get_str(driver), - __get_str(device), - __entry->id, -- __entry->buf_len, -- __entry->ret -+ __entry->buf_len - ) - ); - -diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h -index 8f4f6a89..cfed5808 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-ops.h -+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h -@@ -639,6 +639,9 @@ ath10k_wmi_vdev_spectral_conf(struct ath10k *ar, - struct sk_buff *skb; - u32 cmd_id; - -+ if (!ar->wmi.ops->gen_vdev_spectral_conf) -+ return -EOPNOTSUPP; -+ - skb = ar->wmi.ops->gen_vdev_spectral_conf(ar, arg); - if (IS_ERR(skb)) - return PTR_ERR(skb); -@@ -654,6 +657,9 @@ ath10k_wmi_vdev_spectral_enable(struct ath10k *ar, u32 vdev_id, u32 trigger, - struct sk_buff *skb; - u32 cmd_id; - -+ if (!ar->wmi.ops->gen_vdev_spectral_enable) -+ return -EOPNOTSUPP; -+ - skb = ar->wmi.ops->gen_vdev_spectral_enable(ar, vdev_id, trigger, - enable); - if (IS_ERR(skb)) -diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -index 6fbd17b6..c27fff39 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c -+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -1105,8 +1105,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_pdev *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1126,8 +1128,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_vdev *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1145,8 +1149,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_peer *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1418,6 +1424,11 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) - cfg->keep_alive_pattern_size = __cpu_to_le32(0); - cfg->max_tdls_concurrent_sleep_sta = __cpu_to_le32(1); - cfg->max_tdls_concurrent_buffer_sta = __cpu_to_le32(1); -+ cfg->wmi_send_separate = __cpu_to_le32(0); -+ cfg->num_ocb_vdevs = __cpu_to_le32(0); -+ cfg->num_ocb_channels = __cpu_to_le32(0); -+ cfg->num_ocb_schedules = __cpu_to_le32(0); -+ cfg->host_capab = __cpu_to_le32(0); - - ath10k_wmi_put_host_mem_chunks(ar, chunks); - -@@ -1448,10 +1459,10 @@ ath10k_wmi_tlv_op_gen_start_scan(struct ath10k *ar, - bssid_len = arg->n_bssids * sizeof(struct wmi_mac_addr); - ie_len = roundup(arg->ie_len, 4); - len = (sizeof(*tlv) + sizeof(*cmd)) + -- (arg->n_channels ? sizeof(*tlv) + chan_len : 0) + -- (arg->n_ssids ? sizeof(*tlv) + ssid_len : 0) + -- (arg->n_bssids ? sizeof(*tlv) + bssid_len : 0) + -- (arg->ie_len ? sizeof(*tlv) + ie_len : 0); -+ sizeof(*tlv) + chan_len + -+ sizeof(*tlv) + ssid_len + -+ sizeof(*tlv) + bssid_len + -+ sizeof(*tlv) + ie_len; - - skb = ath10k_wmi_alloc_skb(ar, len); - if (!skb) -diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h -index ad655c44..f5031f39 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h -+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h -@@ -1209,6 +1209,11 @@ struct wmi_tlv_resource_config { - __le32 keep_alive_pattern_size; - __le32 max_tdls_concurrent_sleep_sta; - __le32 max_tdls_concurrent_buffer_sta; -+ __le32 wmi_send_separate; -+ __le32 num_ocb_vdevs; -+ __le32 num_ocb_channels; -+ __le32 num_ocb_schedules; -+ __le32 host_capab; - } __packed; - - struct wmi_tlv_init_cmd { -diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c -index 7569db0f..b867875a 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi.c -+++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -1642,8 +1642,8 @@ int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, - cmd_hdr->cmd_id = __cpu_to_le32(cmd); - - memset(skb_cb, 0, sizeof(*skb_cb)); -+ trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len); - ret = ath10k_htc_send(&ar->htc, ar->wmi.eid, skb); -- trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len, ret); - - if (ret) - goto err_pull; -@@ -1749,6 +1749,12 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id) - if (ret) - dev_kfree_skb_any(skb); - -+ if (ret == -EAGAIN) { -+ ath10k_warn(ar, "wmi command %d timeout, restarting hardware\n", -+ cmd_id); -+ queue_work(ar->workqueue, &ar->restart_work); -+ } -+ - return ret; - } - -@@ -4059,7 +4065,7 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar, - rate_code[i], - type); - snprintf(buff, sizeof(buff), "%8d ", tpc[j]); -- strncat(tpc_value, buff, strlen(buff)); -+ strlcat(tpc_value, buff, sizeof(tpc_value)); - } - tpc_stats->tpc_table[type].pream_idx[i] = pream_idx; - tpc_stats->tpc_table[type].rate_code[i] = rate_code[i]; -diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h -index 72a4ef70..a8b2553e 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi.h -+++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -4826,7 +4826,8 @@ enum wmi_10_4_vdev_param { - #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3) - - #define WMI_TXBF_STS_CAP_OFFSET_LSB 4 --#define WMI_TXBF_STS_CAP_OFFSET_MASK 0xf0 -+#define WMI_TXBF_STS_CAP_OFFSET_MASK 0x70 -+#define WMI_TXBF_CONF_IMPLICIT_BF BIT(7) - #define WMI_BF_SOUND_DIM_OFFSET_LSB 8 - #define WMI_BF_SOUND_DIM_OFFSET_MASK 0xf00 - -diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c -index 654a1e33..7c5f189c 100644 ---- a/drivers/net/wireless/ath/ath5k/debug.c -+++ b/drivers/net/wireless/ath/ath5k/debug.c -@@ -939,7 +939,10 @@ static int open_file_eeprom(struct inode *inode, struct file *file) - } - - for (i = 0; i < eesize; ++i) { -- AR5K_EEPROM_READ(i, val); -+ if (!ath5k_hw_nvram_read(ah, i, &val)) { -+ ret = -EIO; -+ goto freebuf; -+ } - buf[i] = val; - } - -diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -index dc44cfef..16e052d0 100644 ---- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c -+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -@@ -502,8 +502,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - break; - return -EOPNOTSUPP; - default: -- WARN_ON(1); -- return -EINVAL; -+ return -EOPNOTSUPP; - } - - mutex_lock(&ah->lock); -diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -index 694ca2e6..74670e08 100644 ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -@@ -73,13 +73,13 @@ - #define AR9300_OTP_BASE \ - ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30000 : 0x14000) - #define AR9300_OTP_STATUS \ -- ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30018 : 0x15f18) -+ ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x31018 : 0x15f18) - #define AR9300_OTP_STATUS_TYPE 0x7 - #define AR9300_OTP_STATUS_VALID 0x4 - #define AR9300_OTP_STATUS_ACCESS_BUSY 0x2 - #define AR9300_OTP_STATUS_SM_BUSY 0x1 - #define AR9300_OTP_READ_DATA \ -- ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3001c : 0x15f1c) -+ ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3101c : 0x15f1c) - - enum targetPowerHTRates { - HT_TARGET_RATE_0_8_16, -diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -index 201425e7..fbc8c9a9 100644 ---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -@@ -1815,8 +1815,6 @@ static void ar9003_hw_spectral_scan_wait(struct ath_hw *ah) - static void ar9003_hw_tx99_start(struct ath_hw *ah, u32 qnum) - { - REG_SET_BIT(ah, AR_PHY_TEST, PHY_AGC_CLR); -- REG_SET_BIT(ah, 0x9864, 0x7f000); -- REG_SET_BIT(ah, 0x9924, 0x7f00fe); - REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_DIS); - REG_WRITE(ah, AR_CR, AR_CR_RXD); - REG_WRITE(ah, AR_DLCL_IFS(qnum), 0); -diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h -index b42f4a96..a660e40f 100644 ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -959,6 +959,7 @@ struct ath_softc { - struct survey_info *cur_survey; - struct survey_info survey[ATH9K_NUM_CHANNELS]; - -+ spinlock_t intr_lock; - struct tasklet_struct intr_tq; - struct tasklet_struct bcon_tasklet; - struct ath_hw *sc_ah; -diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c -index a8762711..03945731 100644 ---- a/drivers/net/wireless/ath/ath9k/common-spectral.c -+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c -@@ -528,6 +528,9 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h - if (!(radar_info->pulse_bw_info & SPECTRAL_SCAN_BITMASK)) - return 0; - -+ if (!spec_priv->rfs_chan_spec_scan) -+ return 1; -+ - /* Output buffers are full, no need to process anything - * since there is no space to put the result anyway - */ -@@ -1072,7 +1075,7 @@ static struct rchan_callbacks rfs_spec_scan_cb = { - - void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv) - { -- if (config_enabled(CONFIG_ATH9K_DEBUGFS)) { -+ if (config_enabled(CONFIG_ATH9K_DEBUGFS) && spec_priv->rfs_chan_spec_scan) { - relay_close(spec_priv->rfs_chan_spec_scan); - spec_priv->rfs_chan_spec_scan = NULL; - } -@@ -1086,6 +1089,9 @@ void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, - debugfs_phy, - 1024, 256, &rfs_spec_scan_cb, - NULL); -+ if (!spec_priv->rfs_chan_spec_scan) -+ return; -+ - debugfs_create_file("spectral_scan_ctl", - S_IRUSR | S_IWUSR, - debugfs_phy, spec_priv, -diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c -index 165dd202..c92564b3 100644 ---- a/drivers/net/wireless/ath/ath9k/hif_usb.c -+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -37,6 +37,7 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { - { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */ - { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ - { USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */ -+ { USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */ - - { USB_DEVICE(0x0cf3, 0x7015), - .driver_info = AR9287_USB }, /* Atheros */ -@@ -1216,6 +1217,9 @@ static int send_eject_command(struct usb_interface *interface) - u8 bulk_out_ep; - int r; - -+ if (iface_desc->desc.bNumEndpoints < 2) -+ return -ENODEV; -+ - /* Find bulk out endpoint */ - for (r = 1; r >= 0; r--) { - endpoint = &iface_desc->endpoint[r].desc; -diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -index a680a970..e4281438 100644 ---- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c -+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -@@ -1657,13 +1657,14 @@ static void ath9k_htc_reset_tsf(struct ieee80211_hw *hw, - - static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath9k_htc_priv *priv = hw->priv; - struct ath9k_htc_sta *ista; - int ret = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - - mutex_lock(&priv->mutex); - ath9k_htc_ps_wakeup(priv); -diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c -index 41382f89..4435c7bb 100644 ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1595,6 +1595,10 @@ bool ath9k_hw_check_alive(struct ath_hw *ah) - int count = 50; - u32 reg, last_val; - -+ /* Check if chip failed to wake up */ -+ if (REG_READ(ah, AR_CFG) == 0xdeadbeef) -+ return false; -+ - if (AR_SREV_9300(ah)) - return !ath9k_hw_detect_mac_hang(ah); - -diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c -index bc70ce62..0f5672f5 100644 ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -619,6 +619,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, - common->bt_ant_diversity = 1; - - spin_lock_init(&common->cc_lock); -+ spin_lock_init(&sc->intr_lock); - spin_lock_init(&sc->sc_serial_rw); - spin_lock_init(&sc->sc_pm_lock); - spin_lock_init(&sc->chan_lock); -diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c -index bba85d1a..d937c39b 100644 ---- a/drivers/net/wireless/ath/ath9k/mac.c -+++ b/drivers/net/wireless/ath/ath9k/mac.c -@@ -805,21 +805,12 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah) - } - EXPORT_SYMBOL(ath9k_hw_disable_interrupts); - --void ath9k_hw_enable_interrupts(struct ath_hw *ah) -+static void __ath9k_hw_enable_interrupts(struct ath_hw *ah) - { - struct ath_common *common = ath9k_hw_common(ah); - u32 sync_default = AR_INTR_SYNC_DEFAULT; - u32 async_mask; - -- if (!(ah->imask & ATH9K_INT_GLOBAL)) -- return; -- -- if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { -- ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -- atomic_read(&ah->intr_ref_cnt)); -- return; -- } -- - if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || - AR_SREV_9561(ah)) - sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; -@@ -841,6 +832,39 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) - ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", - REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); - } -+ -+void ath9k_hw_resume_interrupts(struct ath_hw *ah) -+{ -+ struct ath_common *common = ath9k_hw_common(ah); -+ -+ if (!(ah->imask & ATH9K_INT_GLOBAL)) -+ return; -+ -+ if (atomic_read(&ah->intr_ref_cnt) != 0) { -+ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -+ atomic_read(&ah->intr_ref_cnt)); -+ return; -+ } -+ -+ __ath9k_hw_enable_interrupts(ah); -+} -+EXPORT_SYMBOL(ath9k_hw_resume_interrupts); -+ -+void ath9k_hw_enable_interrupts(struct ath_hw *ah) -+{ -+ struct ath_common *common = ath9k_hw_common(ah); -+ -+ if (!(ah->imask & ATH9K_INT_GLOBAL)) -+ return; -+ -+ if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { -+ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -+ atomic_read(&ah->intr_ref_cnt)); -+ return; -+ } -+ -+ __ath9k_hw_enable_interrupts(ah); -+} - EXPORT_SYMBOL(ath9k_hw_enable_interrupts); - - void ath9k_hw_set_interrupts(struct ath_hw *ah) -diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h -index 7fbf7f96..1b63d26f 100644 ---- a/drivers/net/wireless/ath/ath9k/mac.h -+++ b/drivers/net/wireless/ath/ath9k/mac.h -@@ -748,6 +748,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah); - void ath9k_hw_enable_interrupts(struct ath_hw *ah); - void ath9k_hw_disable_interrupts(struct ath_hw *ah); - void ath9k_hw_kill_interrupts(struct ath_hw *ah); -+void ath9k_hw_resume_interrupts(struct ath_hw *ah); - - void ar9002_hw_attach_mac_ops(struct ath_hw *ah); - -diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c -index 8c5d2cf9..3abc6457 100644 ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -373,21 +373,20 @@ void ath9k_tasklet(unsigned long data) - struct ath_common *common = ath9k_hw_common(ah); - enum ath_reset_type type; - unsigned long flags; -- u32 status = sc->intrstatus; -+ u32 status; - u32 rxmask; - -+ spin_lock_irqsave(&sc->intr_lock, flags); -+ status = sc->intrstatus; -+ sc->intrstatus = 0; -+ spin_unlock_irqrestore(&sc->intr_lock, flags); -+ - ath9k_ps_wakeup(sc); - spin_lock(&sc->sc_pcu_lock); - - if (status & ATH9K_INT_FATAL) { - type = RESET_TYPE_FATAL_INT; - ath9k_queue_reset(sc, type); -- -- /* -- * Increment the ref. counter here so that -- * interrupts are enabled in the reset routine. -- */ -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, "FATAL: Skipping interrupts\n"); - goto out; - } -@@ -403,11 +402,6 @@ void ath9k_tasklet(unsigned long data) - type = RESET_TYPE_BB_WATCHDOG; - ath9k_queue_reset(sc, type); - -- /* -- * Increment the ref. counter here so that -- * interrupts are enabled in the reset routine. -- */ -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, - "BB_WATCHDOG: Skipping interrupts\n"); - goto out; -@@ -420,7 +414,6 @@ void ath9k_tasklet(unsigned long data) - if ((sc->gtt_cnt >= MAX_GTT_CNT) && !ath9k_hw_check_alive(ah)) { - type = RESET_TYPE_TX_GTT; - ath9k_queue_reset(sc, type); -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, - "GTT: Skipping interrupts\n"); - goto out; -@@ -477,7 +470,7 @@ void ath9k_tasklet(unsigned long data) - ath9k_btcoex_handle_interrupt(sc, status); - - /* re-enable hardware interrupt */ -- ath9k_hw_enable_interrupts(ah); -+ ath9k_hw_resume_interrupts(ah); - out: - spin_unlock(&sc->sc_pcu_lock); - ath9k_ps_restore(sc); -@@ -541,7 +534,9 @@ irqreturn_t ath_isr(int irq, void *dev) - return IRQ_NONE; - - /* Cache the status */ -- sc->intrstatus = status; -+ spin_lock(&sc->intr_lock); -+ sc->intrstatus |= status; -+ spin_unlock(&sc->intr_lock); - - if (status & SCHED_INTR) - sched = true; -@@ -587,7 +582,7 @@ chip_reset: - - if (sched) { - /* turn off every interrupt */ -- ath9k_hw_disable_interrupts(ah); -+ ath9k_hw_kill_interrupts(ah); - tasklet_schedule(&sc->intr_tq); - } - -@@ -1860,14 +1855,16 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - - static int ath9k_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath_softc *sc = hw->priv; - struct ath_common *common = ath9k_hw_common(sc->sc_ah); - bool flush = false; - int ret = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - mutex_lock(&sc->mutex); - -diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c -index 7cdaf40c..ea7b8c25 100644 ---- a/drivers/net/wireless/ath/ath9k/pci.c -+++ b/drivers/net/wireless/ath/ath9k/pci.c -@@ -27,7 +27,6 @@ static const struct pci_device_id ath_pci_id_table[] = { - { PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI */ - { PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */ - { PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */ -- { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ - - #ifdef CONFIG_ATH9K_PCOEM - /* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */ -@@ -38,7 +37,7 @@ static const struct pci_device_id ath_pci_id_table[] = { - .driver_data = ATH9K_PCI_LED_ACT_HI }, - #endif - -- { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ -+ { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ - - #ifdef CONFIG_ATH9K_PCOEM - { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, -@@ -86,7 +85,11 @@ static const struct pci_device_id ath_pci_id_table[] = { - 0x10CF, /* Fujitsu */ - 0x1536), - .driver_data = ATH9K_PCI_D3_L1_WAR }, -+#endif - -+ { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ -+ -+#ifdef CONFIG_ATH9K_PCOEM - /* AR9285 card for Asus */ - { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, - 0x002B, -diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c -index ac4781f3..7ee1a318 100644 ---- a/drivers/net/wireless/ath/ath9k/tx99.c -+++ b/drivers/net/wireless/ath/ath9k/tx99.c -@@ -180,6 +180,9 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf, - ssize_t len; - int r; - -+ if (count < 1) -+ return -EINVAL; -+ - if (sc->cur_chan->nvifs > 1) - return -EOPNOTSUPP; - -@@ -187,25 +190,32 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf, - if (copy_from_user(buf, user_buf, len)) - return -EFAULT; - -+ buf[len] = '\0'; -+ - if (strtobool(buf, &start)) - return -EINVAL; - -+ mutex_lock(&sc->mutex); -+ - if (start == sc->tx99_state) { - if (!start) -- return count; -+ goto out; - ath_dbg(common, XMIT, "Resetting TX99\n"); - ath9k_tx99_deinit(sc); - } - - if (!start) { - ath9k_tx99_deinit(sc); -- return count; -+ goto out; - } - - r = ath9k_tx99_init(sc); -- if (r) -+ if (r) { -+ mutex_unlock(&sc->mutex); - return r; -- -+ } -+out: -+ mutex_unlock(&sc->mutex); - return count; - } - -diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c -index 19d3d644..4d1527a2 100644 ---- a/drivers/net/wireless/ath/carl9170/main.c -+++ b/drivers/net/wireless/ath/carl9170/main.c -@@ -1413,10 +1413,12 @@ static void carl9170_ampdu_work(struct work_struct *work) - - static int carl9170_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - struct ar9170 *ar = hw->priv; - struct carl9170_sta_info *sta_info = (void *) sta->drv_priv; - struct carl9170_sta_tid *tid_info; -diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c -index 06ea6cc9..62077bda 100644 ---- a/drivers/net/wireless/ath/regd.c -+++ b/drivers/net/wireless/ath/regd.c -@@ -254,8 +254,12 @@ bool ath_is_49ghz_allowed(u16 regdomain) - EXPORT_SYMBOL(ath_is_49ghz_allowed); - - /* Frequency is one where radar detection is required */ --static bool ath_is_radar_freq(u16 center_freq) -+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); - } - -@@ -306,7 +310,7 @@ __ath_reg_apply_beaconing_flags(struct wiphy *wiphy, - enum nl80211_reg_initiator initiator, - struct ieee80211_channel *ch) - { -- if (ath_is_radar_freq(ch->center_freq) || -+ if (ath_is_radar_freq(ch->center_freq, reg) || - (ch->flags & IEEE80211_CHAN_RADAR)) - return; - -@@ -395,8 +399,9 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy, - } - } - --/* Always apply Radar/DFS rules on freq range 5260 MHz - 5700 MHz */ --static void ath_reg_apply_radar_flags(struct wiphy *wiphy) -+/* Always apply Radar/DFS rules on freq range 5500 MHz - 5700 MHz */ -+static void ath_reg_apply_radar_flags(struct wiphy *wiphy, -+ struct ath_regulatory *reg) - { - struct ieee80211_supported_band *sband; - struct ieee80211_channel *ch; -@@ -409,7 +414,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) - - for (i = 0; i < sband->n_channels; i++) { - ch = &sband->channels[i]; -- if (!ath_is_radar_freq(ch->center_freq)) -+ if (!ath_is_radar_freq(ch->center_freq, reg)) - continue; - /* We always enable radar detection/DFS on this - * frequency range. Additionally we also apply on -@@ -505,7 +510,7 @@ void ath_reg_notifier_apply(struct wiphy *wiphy, - struct ath_common *common = container_of(reg, struct ath_common, - regulatory); - /* We always apply this */ -- ath_reg_apply_radar_flags(wiphy); -+ ath_reg_apply_radar_flags(wiphy, reg); - - /* - * This would happen when we have sent a custom regulatory request -@@ -653,7 +658,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, - } - - wiphy_apply_custom_regulatory(wiphy, regd); -- ath_reg_apply_radar_flags(wiphy); -+ ath_reg_apply_radar_flags(wiphy, reg); - ath_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); - return 0; - } -diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h -index 37f53bd8..184b6810 100644 ---- a/drivers/net/wireless/ath/regd.h -+++ b/drivers/net/wireless/ath/regd.h -@@ -68,12 +68,14 @@ enum CountryCode { - CTRY_AUSTRALIA = 36, - CTRY_AUSTRIA = 40, - CTRY_AZERBAIJAN = 31, -+ CTRY_BAHAMAS = 44, - CTRY_BAHRAIN = 48, - CTRY_BANGLADESH = 50, - CTRY_BARBADOS = 52, - CTRY_BELARUS = 112, - CTRY_BELGIUM = 56, - CTRY_BELIZE = 84, -+ CTRY_BERMUDA = 60, - CTRY_BOLIVIA = 68, - CTRY_BOSNIA_HERZ = 70, - CTRY_BRAZIL = 76, -@@ -159,6 +161,7 @@ enum CountryCode { - CTRY_ROMANIA = 642, - CTRY_RUSSIA = 643, - CTRY_SAUDI_ARABIA = 682, -+ CTRY_SERBIA = 688, - CTRY_SERBIA_MONTENEGRO = 891, - CTRY_SINGAPORE = 702, - CTRY_SLOVAKIA = 703, -@@ -170,11 +173,13 @@ enum CountryCode { - CTRY_SWITZERLAND = 756, - CTRY_SYRIA = 760, - CTRY_TAIWAN = 158, -+ CTRY_TANZANIA = 834, - CTRY_THAILAND = 764, - CTRY_TRINIDAD_Y_TOBAGO = 780, - CTRY_TUNISIA = 788, - CTRY_TURKEY = 792, - CTRY_UAE = 784, -+ CTRY_UGANDA = 800, - CTRY_UKRAINE = 804, - CTRY_UNITED_KINGDOM = 826, - CTRY_UNITED_STATES = 840, -diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h -index bdd2b4d6..15bbd1e0 100644 ---- a/drivers/net/wireless/ath/regd_common.h -+++ b/drivers/net/wireless/ath/regd_common.h -@@ -35,6 +35,7 @@ enum EnumRd { - FRANCE_RES = 0x31, - FCC3_FCCA = 0x3A, - FCC3_WORLD = 0x3B, -+ FCC3_ETSIC = 0x3F, - - ETSI1_WORLD = 0x37, - ETSI3_ETSIA = 0x32, -@@ -44,6 +45,7 @@ enum EnumRd { - ETSI4_ETSIC = 0x38, - ETSI5_WORLD = 0x39, - ETSI6_WORLD = 0x34, -+ ETSI8_WORLD = 0x3D, - ETSI_RESERVED = 0x33, - - MKK1_MKKA = 0x40, -@@ -59,6 +61,7 @@ enum EnumRd { - MKK1_MKKA1 = 0x4A, - MKK1_MKKA2 = 0x4B, - MKK1_MKKC = 0x4C, -+ APL2_FCCA = 0x4D, - - APL3_FCCA = 0x50, - APL1_WORLD = 0x52, -@@ -67,6 +70,7 @@ enum EnumRd { - APL1_ETSIC = 0x55, - APL2_ETSIC = 0x56, - APL5_WORLD = 0x58, -+ APL13_WORLD = 0x5A, - APL6_WORLD = 0x5B, - APL7_FCCA = 0x5C, - APL8_WORLD = 0x5D, -@@ -168,6 +172,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {FCC2_ETSIC, CTL_FCC, CTL_ETSI}, - {FCC3_FCCA, CTL_FCC, CTL_FCC}, - {FCC3_WORLD, CTL_FCC, CTL_ETSI}, -+ {FCC3_ETSIC, CTL_FCC, CTL_ETSI}, - {FCC4_FCCA, CTL_FCC, CTL_FCC}, - {FCC5_FCCA, CTL_FCC, CTL_FCC}, - {FCC6_FCCA, CTL_FCC, CTL_FCC}, -@@ -179,6 +184,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {ETSI4_WORLD, CTL_ETSI, CTL_ETSI}, - {ETSI5_WORLD, CTL_ETSI, CTL_ETSI}, - {ETSI6_WORLD, CTL_ETSI, CTL_ETSI}, -+ {ETSI8_WORLD, CTL_ETSI, CTL_ETSI}, - - /* XXX: For ETSI3_ETSIA, Was NO_CTL meant for the 2 GHz band ? */ - {ETSI3_ETSIA, CTL_ETSI, CTL_ETSI}, -@@ -188,9 +194,11 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {FCC1_FCCA, CTL_FCC, CTL_FCC}, - {APL1_WORLD, CTL_FCC, CTL_ETSI}, - {APL2_WORLD, CTL_FCC, CTL_ETSI}, -+ {APL2_FCCA, CTL_FCC, CTL_FCC}, - {APL3_WORLD, CTL_FCC, CTL_ETSI}, - {APL4_WORLD, CTL_FCC, CTL_ETSI}, - {APL5_WORLD, CTL_FCC, CTL_ETSI}, -+ {APL13_WORLD, CTL_ETSI, CTL_ETSI}, - {APL6_WORLD, CTL_ETSI, CTL_ETSI}, - {APL8_WORLD, CTL_ETSI, CTL_ETSI}, - {APL9_WORLD, CTL_ETSI, CTL_ETSI}, -@@ -298,6 +306,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_AUSTRALIA2, FCC6_WORLD, "AU"}, - {CTRY_AUSTRIA, ETSI1_WORLD, "AT"}, - {CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"}, -+ {CTRY_BAHAMAS, FCC3_WORLD, "BS"}, - {CTRY_BAHRAIN, APL6_WORLD, "BH"}, - {CTRY_BANGLADESH, NULL1_WORLD, "BD"}, - {CTRY_BARBADOS, FCC2_WORLD, "BB"}, -@@ -305,6 +314,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_BELGIUM, ETSI1_WORLD, "BE"}, - {CTRY_BELGIUM2, ETSI4_WORLD, "BL"}, - {CTRY_BELIZE, APL1_ETSIC, "BZ"}, -+ {CTRY_BERMUDA, FCC3_FCCA, "BM"}, - {CTRY_BOLIVIA, APL1_ETSIC, "BO"}, - {CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"}, - {CTRY_BRAZIL, FCC3_WORLD, "BR"}, -@@ -444,6 +454,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_ROMANIA, NULL1_WORLD, "RO"}, - {CTRY_RUSSIA, NULL1_WORLD, "RU"}, - {CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"}, -+ {CTRY_SERBIA, ETSI1_WORLD, "RS"}, - {CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"}, - {CTRY_SINGAPORE, APL6_WORLD, "SG"}, - {CTRY_SLOVAKIA, ETSI1_WORLD, "SK"}, -@@ -455,10 +466,12 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_SWITZERLAND, ETSI1_WORLD, "CH"}, - {CTRY_SYRIA, NULL1_WORLD, "SY"}, - {CTRY_TAIWAN, APL3_FCCA, "TW"}, -+ {CTRY_TANZANIA, APL1_WORLD, "TZ"}, - {CTRY_THAILAND, FCC3_WORLD, "TH"}, - {CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"}, - {CTRY_TUNISIA, ETSI3_WORLD, "TN"}, - {CTRY_TURKEY, ETSI3_WORLD, "TR"}, -+ {CTRY_UGANDA, FCC3_WORLD, "UG"}, - {CTRY_UKRAINE, NULL1_WORLD, "UA"}, - {CTRY_UAE, NULL1_WORLD, "AE"}, - {CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"}, -diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c -index 7c169abd..a27279c2 100644 ---- a/drivers/net/wireless/ath/wcn36xx/main.c -+++ b/drivers/net/wireless/ath/wcn36xx/main.c -@@ -857,12 +857,14 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) - - static int wcn36xx_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct wcn36xx *wcn = hw->priv; - struct wcn36xx_sta *sta_priv = NULL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - wcn36xx_dbg(WCN36XX_DBG_MAC, "mac ampdu action action %d tid %d\n", - action, tid); -diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c -index 9bec8237..99c21aac 100644 ---- a/drivers/net/wireless/ath/wcn36xx/txrx.c -+++ b/drivers/net/wireless/ath/wcn36xx/txrx.c -@@ -57,7 +57,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) - RX_FLAG_MMIC_STRIPPED | - RX_FLAG_DECRYPTED; - -- wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag); -+ wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%llx\n", status.flag); - - memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); - -diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c -index bb69a594..f09fafaa 100644 ---- a/drivers/net/wireless/ath/wil6210/main.c -+++ b/drivers/net/wireless/ath/wil6210/main.c -@@ -125,9 +125,15 @@ void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src, - u32 *d = dst; - const volatile u32 __iomem *s = src; - -- /* size_t is unsigned, if (count%4 != 0) it will wrap */ -- for (count += 4; count > 4; count -= 4) -+ for (; count >= 4; count -= 4) - *d++ = __raw_readl(s++); -+ -+ if (unlikely(count)) { -+ /* count can be 1..3 */ -+ u32 tmp = __raw_readl(s); -+ -+ memcpy(d, &tmp, count); -+ } - } - - void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, -@@ -136,8 +142,16 @@ void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, - volatile u32 __iomem *d = dst; - const u32 *s = src; - -- for (count += 4; count > 4; count -= 4) -+ for (; count >= 4; count -= 4) - __raw_writel(*s++, d++); -+ -+ if (unlikely(count)) { -+ /* count can be 1..3 */ -+ u32 tmp = 0; -+ -+ memcpy(&tmp, s, count); -+ __raw_writel(tmp, d); -+ } - } - - static void wil_disconnect_cid(struct wil6210_priv *wil, int cid, -@@ -330,18 +344,19 @@ static void wil_fw_error_worker(struct work_struct *work) - - wil->last_fw_recovery = jiffies; - -+ wil_info(wil, "fw error recovery requested (try %d)...\n", -+ wil->recovery_count); -+ if (!no_fw_recovery) -+ wil->recovery_state = fw_recovery_running; -+ if (wil_wait_for_recovery(wil) != 0) -+ return; -+ - mutex_lock(&wil->mutex); - switch (wdev->iftype) { - case NL80211_IFTYPE_STATION: - case NL80211_IFTYPE_P2P_CLIENT: - case NL80211_IFTYPE_MONITOR: -- wil_info(wil, "fw error recovery requested (try %d)...\n", -- wil->recovery_count); -- if (!no_fw_recovery) -- wil->recovery_state = fw_recovery_running; -- if (0 != wil_wait_for_recovery(wil)) -- break; -- -+ /* silent recovery, upper layers will see disconnect */ - __wil_down(wil); - __wil_up(wil); - break; -diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c -index 6ed26bac..7af8479a 100644 ---- a/drivers/net/wireless/ath/wil6210/wmi.c -+++ b/drivers/net/wireless/ath/wil6210/wmi.c -@@ -1035,8 +1035,14 @@ int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) - }; - int rc; - u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; -- struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); -+ struct wmi_set_appie_cmd *cmd; - -+ if (len < ie_len) { -+ rc = -EINVAL; -+ goto out; -+ } -+ -+ cmd = kzalloc(len, GFP_KERNEL); - if (!cmd) { - rc = -ENOMEM; - goto out; -diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c -index ec2b9c57..3644c9ed 100644 ---- a/drivers/net/wireless/b43/phy_common.c -+++ b/drivers/net/wireless/b43/phy_common.c -@@ -616,7 +616,7 @@ struct b43_c32 b43_cordic(int theta) - u8 i; - s32 tmp; - s8 signx = 1; -- u32 angle = 0; -+ s32 angle = 0; - struct b43_c32 ret = { .i = 39797, .q = 0, }; - - while (theta > (180 << 16)) -diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c -index 058a9f23..55cb0769 100644 ---- a/drivers/net/wireless/b43/phy_lp.c -+++ b/drivers/net/wireless/b43/phy_lp.c -@@ -1834,7 +1834,7 @@ static void lpphy_papd_cal(struct b43_wldev *dev, struct lpphy_tx_gains gains, - static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) - { - struct b43_phy_lp *lpphy = dev->phy.lp; -- struct lpphy_tx_gains gains, oldgains; -+ struct lpphy_tx_gains oldgains; - int old_txpctl, old_afe_ovr, old_rf, old_bbmult; - - lpphy_read_tx_pctl_mode_from_hardware(dev); -@@ -1848,9 +1848,9 @@ static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) - lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF); - - if (dev->dev->chip_id == 0x4325 && dev->dev->chip_rev == 0) -- lpphy_papd_cal(dev, gains, 0, 1, 30); -+ lpphy_papd_cal(dev, oldgains, 0, 1, 30); - else -- lpphy_papd_cal(dev, gains, 0, 1, 65); -+ lpphy_papd_cal(dev, oldgains, 0, 1, 65); - - if (old_afe_ovr) - lpphy_set_tx_gains(dev, oldgains); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -index 59cef6c6..72e1796c 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -@@ -705,7 +705,7 @@ done: - int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - struct sk_buff_head *pktq, uint totlen) - { -- struct sk_buff *glom_skb; -+ struct sk_buff *glom_skb = NULL; - struct sk_buff *skb; - u32 addr = sdiodev->sbwad; - int err = 0; -@@ -726,10 +726,8 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - return -ENOMEM; - err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr, - glom_skb); -- if (err) { -- brcmu_pkt_buf_free_skb(glom_skb); -+ if (err) - goto done; -- } - - skb_queue_walk(pktq, skb) { - memcpy(skb->data, glom_skb->data, skb->len); -@@ -740,6 +738,7 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - pktq); - - done: -+ brcmu_pkt_buf_free_skb(glom_skb); - return err; - } - -@@ -1109,6 +1108,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43340), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43341), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43362), -+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43364), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4335_4339), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43430), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4345), -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/brcm80211/brcmfmac/bus.h -index 230cad78..84b8b1ea 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/bus.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/bus.h -@@ -214,7 +214,9 @@ bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, struct sk_buff *pkt, - int prec); - - /* Receive frame for delivery to OS. Callee disposes of rxp. */ --void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp); -+void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp, bool handle_event); -+/* Receive async event packet from firmware. Callee disposes of rxp. */ -+void brcmf_rx_event(struct device *dev, struct sk_buff *rxp); - - /* Indication from bus module regarding presence/insertion of dongle. */ - int brcmf_attach(struct device *dev); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -index 70a69853..231c0ba6 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -@@ -876,7 +876,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - - eth_broadcast_addr(params_le->bssid); - params_le->bss_type = DOT11_BSSTYPE_ANY; -- params_le->scan_type = 0; -+ params_le->scan_type = BRCMF_SCANTYPE_ACTIVE; - params_le->channel_num = 0; - params_le->nprobes = cpu_to_le32(-1); - params_le->active_time = cpu_to_le32(-1); -@@ -884,12 +884,9 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - params_le->home_time = cpu_to_le32(-1); - memset(¶ms_le->ssid_le, 0, sizeof(params_le->ssid_le)); - -- /* if request is null exit so it will be all channel broadcast scan */ -- if (!request) -- return; -- - n_ssids = request->n_ssids; - n_channels = request->n_channels; -+ - /* Copy channel array if applicable */ - brcmf_dbg(SCAN, "### List of channelspecs to scan ### %d\n", - n_channels); -@@ -926,16 +923,8 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - ptr += sizeof(ssid_le); - } - } else { -- brcmf_dbg(SCAN, "Broadcast scan %p\n", request->ssids); -- if ((request->ssids) && request->ssids->ssid_len) { -- brcmf_dbg(SCAN, "SSID %s len=%d\n", -- params_le->ssid_le.SSID, -- request->ssids->ssid_len); -- params_le->ssid_le.SSID_len = -- cpu_to_le32(request->ssids->ssid_len); -- memcpy(¶ms_le->ssid_le.SSID, request->ssids->ssid, -- request->ssids->ssid_len); -- } -+ brcmf_dbg(SCAN, "Performing passive scan\n"); -+ params_le->scan_type = BRCMF_SCANTYPE_PASSIVE; - } - /* Adding mask to channel numbers */ - params_le->channel_num = -@@ -2914,6 +2903,7 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - struct brcmf_cfg80211_info *cfg = ifp->drvr->config; - s32 status; - struct brcmf_escan_result_le *escan_result_le; -+ u32 escan_buflen; - struct brcmf_bss_info_le *bss_info_le; - struct brcmf_bss_info_le *bss = NULL; - u32 bi_length; -@@ -2930,11 +2920,23 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - - if (status == BRCMF_E_STATUS_PARTIAL) { - brcmf_dbg(SCAN, "ESCAN Partial result\n"); -+ if (e->datalen < sizeof(*escan_result_le)) { -+ brcmf_err("invalid event data length\n"); -+ goto exit; -+ } - escan_result_le = (struct brcmf_escan_result_le *) data; - if (!escan_result_le) { - brcmf_err("Invalid escan result (NULL pointer)\n"); - goto exit; - } -+ escan_buflen = le32_to_cpu(escan_result_le->buflen); -+ if (escan_buflen > WL_ESCAN_BUF_SIZE || -+ escan_buflen > e->datalen || -+ escan_buflen < sizeof(*escan_result_le)) { -+ brcmf_err("Invalid escan buffer length: %d\n", -+ escan_buflen); -+ goto exit; -+ } - if (le16_to_cpu(escan_result_le->bss_count) != 1) { - brcmf_err("Invalid bss_count %d: ignoring\n", - escan_result_le->bss_count); -@@ -2951,9 +2953,8 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - } - - bi_length = le32_to_cpu(bss_info_le->length); -- if (bi_length != (le32_to_cpu(escan_result_le->buflen) - -- WL_ESCAN_RESULTS_FIXED_SIZE)) { -- brcmf_err("Invalid bss_info length %d: ignoring\n", -+ if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) { -+ brcmf_err("Ignoring invalid bss_info length: %d\n", - bi_length); - goto exit; - } -@@ -3327,9 +3328,15 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - struct brcmf_pno_scanresults_le *pfn_result; - u32 result_count; - u32 status; -+ u32 datalen; - - brcmf_dbg(SCAN, "Enter\n"); - -+ if (e->datalen < (sizeof(*pfn_result) + sizeof(*netinfo))) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - if (e->event_code == BRCMF_E_PFN_NET_LOST) { - brcmf_dbg(SCAN, "PFN NET LOST event. Do Nothing\n"); - return 0; -@@ -3348,6 +3355,14 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - if (result_count > 0) { - int i; - -+ data += sizeof(struct brcmf_pno_scanresults_le); -+ netinfo_start = (struct brcmf_pno_net_info_le *)data; -+ datalen = e->datalen - ((void *)netinfo_start - (void *)pfn_result); -+ if (datalen < result_count * sizeof(*netinfo)) { -+ brcmf_err("insufficient event data\n"); -+ goto out_err; -+ } -+ - request = kzalloc(sizeof(*request), GFP_KERNEL); - ssid = kcalloc(result_count, sizeof(*ssid), GFP_KERNEL); - channel = kcalloc(result_count, sizeof(*channel), GFP_KERNEL); -@@ -3357,9 +3372,6 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - } - - request->wiphy = wiphy; -- data += sizeof(struct brcmf_pno_scanresults_le); -- netinfo_start = (struct brcmf_pno_net_info_le *)data; -- - for (i = 0; i < result_count; i++) { - netinfo = &netinfo_start[i]; - if (!netinfo) { -@@ -3369,6 +3381,8 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - goto out_err; - } - -+ if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN) -+ netinfo->SSID_len = IEEE80211_MAX_SSID_LEN; - brcmf_dbg(SCAN, "SSID:%s Channel:%d\n", - netinfo->SSID, netinfo->channel); - memcpy(ssid[i].ssid, netinfo->SSID, netinfo->SSID_len); -@@ -4294,9 +4308,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) - err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0); - if (err < 0) - brcmf_err("setting AP mode failed %d\n", err); -- err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 0); -- if (err < 0) -- brcmf_err("setting INFRA mode failed %d\n", err); - if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) - brcmf_fil_iovar_int_set(ifp, "mbss", 0); - err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, -@@ -4472,6 +4483,11 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, - cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true, - GFP_KERNEL); - } else if (ieee80211_is_action(mgmt->frame_control)) { -+ if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) { -+ brcmf_err("invalid action frame length\n"); -+ err = -EINVAL; -+ goto exit; -+ } - af_params = kzalloc(sizeof(*af_params), GFP_KERNEL); - if (af_params == NULL) { - brcmf_err("unable to allocate frame\n"); -@@ -4833,6 +4849,8 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, - conn_info->req_ie = - kmemdup(cfg->extra_buf, conn_info->req_ie_len, - GFP_KERNEL); -+ if (!conn_info->req_ie) -+ conn_info->req_ie_len = 0; - } else { - conn_info->req_ie_len = 0; - conn_info->req_ie = NULL; -@@ -4849,6 +4867,8 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, - conn_info->resp_ie = - kmemdup(cfg->extra_buf, conn_info->resp_ie_len, - GFP_KERNEL); -+ if (!conn_info->resp_ie) -+ conn_info->resp_ie_len = 0; - } else { - conn_info->resp_ie_len = 0; - conn_info->resp_ie = NULL; -@@ -6164,7 +6184,7 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, - req->alpha2[0], req->alpha2[1]); - - /* ignore non-ISO3166 country codes */ -- for (i = 0; i < sizeof(req->alpha2); i++) -+ for (i = 0; i < 2; i++) - if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { - brcmf_err("not a ISO3166 code\n"); - return; -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/core.c b/drivers/net/wireless/brcm80211/brcmfmac/core.c -index b5ab98ee..3082391c 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c -@@ -211,7 +211,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - int ret; - struct brcmf_if *ifp = netdev_priv(ndev); - struct brcmf_pub *drvr = ifp->drvr; -- struct ethhdr *eh = (struct ethhdr *)(skb->data); -+ struct ethhdr *eh; - - brcmf_dbg(DATA, "Enter, idx=%d\n", ifp->bssidx); - -@@ -232,22 +232,13 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - goto done; - } - -- /* Make sure there's enough room for any header */ -- if (skb_headroom(skb) < drvr->hdrlen) { -- struct sk_buff *skb2; -- -- brcmf_dbg(INFO, "%s: insufficient headroom\n", -+ /* Make sure there's enough writable headroom*/ -+ ret = skb_cow_head(skb, drvr->hdrlen); -+ if (ret < 0) { -+ brcmf_err("%s: skb_cow_head failed\n", - brcmf_ifname(drvr, ifp->bssidx)); -- drvr->bus_if->tx_realloc++; -- skb2 = skb_realloc_headroom(skb, drvr->hdrlen); - dev_kfree_skb(skb); -- skb = skb2; -- if (skb == NULL) { -- brcmf_err("%s: skb_realloc_headroom failed\n", -- brcmf_ifname(drvr, ifp->bssidx)); -- ret = -ENOMEM; -- goto done; -- } -+ goto done; - } - - /* validate length for ether packet */ -@@ -257,6 +248,8 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - goto done; - } - -+ eh = (struct ethhdr *)(skb->data); -+ - if (eh->h_proto == htons(ETH_P_PAE)) - atomic_inc(&ifp->pend_8021x_cnt); - -@@ -310,15 +303,9 @@ void brcmf_txflowblock(struct device *dev, bool state) - - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb) - { -- skb->dev = ifp->ndev; -- skb->protocol = eth_type_trans(skb, skb->dev); -- - if (skb->pkt_type == PACKET_MULTICAST) - ifp->stats.multicast++; - -- /* Process special event packets */ -- brcmf_fweh_process_skb(ifp->drvr, skb); -- - if (!(ifp->ndev->flags & IFF_UP)) { - brcmu_pkt_buf_free_skb(skb); - return; -@@ -533,7 +520,7 @@ netif_rx: - } - } - --void brcmf_rx_frame(struct device *dev, struct sk_buff *skb) -+void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event) - { - struct brcmf_if *ifp; - struct brcmf_bus *bus_if = dev_get_drvdata(dev); -@@ -553,11 +540,44 @@ void brcmf_rx_frame(struct device *dev, struct sk_buff *skb) - return; - } - -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ - rd = (struct brcmf_skb_reorder_data *)skb->cb; -- if (rd->reorder) -+ if (rd->reorder) { - brcmf_rxreorder_process_info(ifp, rd->reorder, skb); -- else -+ } else { -+ /* Process special event packets */ -+ if (handle_event) -+ brcmf_fweh_process_skb(ifp->drvr, skb, -+ BCMILCP_SUBTYPE_VENDOR_LONG); -+ - brcmf_netif_rx(ifp, skb); -+ } -+} -+ -+void brcmf_rx_event(struct device *dev, struct sk_buff *skb) -+{ -+ struct brcmf_if *ifp; -+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); -+ struct brcmf_pub *drvr = bus_if->drvr; -+ int ret; -+ -+ brcmf_dbg(EVENT, "Enter: %s: rxp=%p\n", dev_name(dev), skb); -+ -+ /* process and remove protocol-specific header */ -+ ret = brcmf_proto_hdrpull(drvr, true, skb, &ifp); -+ -+ if (ret || !ifp || !ifp->ndev) { -+ if (ret != -ENODATA && ifp) -+ ifp->stats.rx_errors++; -+ brcmu_pkt_buf_free_skb(skb); -+ return; -+ } -+ -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ -+ brcmf_fweh_process_skb(ifp->drvr, skb, 0); -+ brcmu_pkt_buf_free_skb(skb); - } - - void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success) -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -index 3878b6f6..f9aa3703 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -@@ -25,50 +25,6 @@ - #include "fweh.h" - #include "fwil.h" - --/** -- * struct brcm_ethhdr - broadcom specific ether header. -- * -- * @subtype: subtype for this packet. -- * @length: TODO: length of appended data. -- * @version: version indication. -- * @oui: OUI of this packet. -- * @usr_subtype: subtype for this OUI. -- */ --struct brcm_ethhdr { -- __be16 subtype; -- __be16 length; -- u8 version; -- u8 oui[3]; -- __be16 usr_subtype; --} __packed; -- --struct brcmf_event_msg_be { -- __be16 version; -- __be16 flags; -- __be32 event_type; -- __be32 status; -- __be32 reason; -- __be32 auth_type; -- __be32 datalen; -- u8 addr[ETH_ALEN]; -- char ifname[IFNAMSIZ]; -- u8 ifidx; -- u8 bsscfgidx; --} __packed; -- --/** -- * struct brcmf_event - contents of broadcom event packet. -- * -- * @eth: standard ether header. -- * @hdr: broadcom specific ether header. -- * @msg: common part of the actual event message. -- */ --struct brcmf_event { -- struct ethhdr eth; -- struct brcm_ethhdr hdr; -- struct brcmf_event_msg_be msg; --} __packed; -- - /** - * struct brcmf_fweh_queue_item - event item on event queue. - * -@@ -85,6 +41,7 @@ struct brcmf_fweh_queue_item { - u8 ifidx; - u8 ifaddr[ETH_ALEN]; - struct brcmf_event_msg_be emsg; -+ u32 datalen; - u8 data[0]; - }; - -@@ -294,6 +251,11 @@ static void brcmf_fweh_event_worker(struct work_struct *work) - brcmf_dbg_hex_dump(BRCMF_EVENT_ON(), event->data, - min_t(u32, emsg.datalen, 64), - "event payload, len=%d\n", emsg.datalen); -+ if (emsg.datalen > event->datalen) { -+ brcmf_err("event invalid length header=%d, msg=%d\n", -+ event->datalen, emsg.datalen); -+ goto event_free; -+ } - - /* special handling of interface event */ - if (event->code == BRCMF_E_IF) { -@@ -439,7 +401,8 @@ int brcmf_fweh_activate_events(struct brcmf_if *ifp) - * dispatch the event to a registered handler (using worker). - */ - void brcmf_fweh_process_event(struct brcmf_pub *drvr, -- struct brcmf_event *event_packet) -+ struct brcmf_event *event_packet, -+ u32 packet_len) - { - enum brcmf_fweh_event_code code; - struct brcmf_fweh_info *fweh = &drvr->fweh; -@@ -459,6 +422,9 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr, - if (code != BRCMF_E_IF && !fweh->evt_handler[code]) - return; - -+ if (datalen > BRCMF_DCMD_MAXLEN) -+ return; -+ - if (in_interrupt()) - alloc_flag = GFP_ATOMIC; - -@@ -472,6 +438,7 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr, - /* use memcpy to get aligned event message */ - memcpy(&event->emsg, &event_packet->msg, sizeof(event->emsg)); - memcpy(event->data, data, datalen); -+ event->datalen = datalen; - memcpy(event->ifaddr, event_packet->eth.h_dest, ETH_ALEN); - - brcmf_fweh_queue_event(fweh, event); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -index d9a94284..b53db923 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -@@ -27,7 +27,6 @@ - struct brcmf_pub; - struct brcmf_if; - struct brcmf_cfg80211_info; --struct brcmf_event; - - /* list of firmware events */ - #define BRCMF_FWEH_EVENT_ENUM_DEFLIST \ -@@ -180,11 +179,53 @@ enum brcmf_fweh_event_code { - /** - * definitions for event packet validation. - */ --#define BRCMF_EVENT_OUI_OFFSET 19 --#define BRCM_OUI "\x00\x10\x18" --#define DOT11_OUI_LEN 3 --#define BCMILCP_BCM_SUBTYPE_EVENT 1 -+#define BRCM_OUI "\x00\x10\x18" -+#define BCMILCP_BCM_SUBTYPE_EVENT 1 -+#define BCMILCP_SUBTYPE_VENDOR_LONG 32769 - -+/** -+ * struct brcm_ethhdr - broadcom specific ether header. -+ * -+ * @subtype: subtype for this packet. -+ * @length: TODO: length of appended data. -+ * @version: version indication. -+ * @oui: OUI of this packet. -+ * @usr_subtype: subtype for this OUI. -+ */ -+struct brcm_ethhdr { -+ __be16 subtype; -+ __be16 length; -+ u8 version; -+ u8 oui[3]; -+ __be16 usr_subtype; -+} __packed; -+ -+struct brcmf_event_msg_be { -+ __be16 version; -+ __be16 flags; -+ __be32 event_type; -+ __be32 status; -+ __be32 reason; -+ __be32 auth_type; -+ __be32 datalen; -+ u8 addr[ETH_ALEN]; -+ char ifname[IFNAMSIZ]; -+ u8 ifidx; -+ u8 bsscfgidx; -+} __packed; -+ -+/** -+ * struct brcmf_event - contents of broadcom event packet. -+ * -+ * @eth: standard ether header. -+ * @hdr: broadcom specific ether header. -+ * @msg: common part of the actual event message. -+ */ -+struct brcmf_event { -+ struct ethhdr eth; -+ struct brcm_ethhdr hdr; -+ struct brcmf_event_msg_be msg; -+} __packed; - - /** - * struct brcmf_event_msg - firmware event message. -@@ -256,34 +297,43 @@ void brcmf_fweh_unregister(struct brcmf_pub *drvr, - enum brcmf_fweh_event_code code); - int brcmf_fweh_activate_events(struct brcmf_if *ifp); - void brcmf_fweh_process_event(struct brcmf_pub *drvr, -- struct brcmf_event *event_packet); -+ struct brcmf_event *event_packet, -+ u32 packet_len); - void brcmf_fweh_p2pdev_setup(struct brcmf_if *ifp, bool ongoing); - - static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr, -- struct sk_buff *skb) -+ struct sk_buff *skb, u16 stype) - { - struct brcmf_event *event_packet; -- u8 *data; -- u16 usr_stype; -+ u16 subtype, usr_stype; - - /* only process events when protocol matches */ - if (skb->protocol != cpu_to_be16(ETH_P_LINK_CTL)) - return; - -- /* check for BRCM oui match */ -+ if ((skb->len + ETH_HLEN) < sizeof(*event_packet)) -+ return; -+ - event_packet = (struct brcmf_event *)skb_mac_header(skb); -- data = (u8 *)event_packet; -- data += BRCMF_EVENT_OUI_OFFSET; -- if (memcmp(BRCM_OUI, data, DOT11_OUI_LEN)) -+ -+ /* check subtype if needed */ -+ if (unlikely(stype)) { -+ subtype = get_unaligned_be16(&event_packet->hdr.subtype); -+ if (subtype != stype) -+ return; -+ } -+ -+ /* check for BRCM oui match */ -+ if (memcmp(BRCM_OUI, &event_packet->hdr.oui[0], -+ sizeof(event_packet->hdr.oui))) - return; - - /* final match on usr_subtype */ -- data += DOT11_OUI_LEN; -- usr_stype = get_unaligned_be16(data); -+ usr_stype = get_unaligned_be16(&event_packet->hdr.usr_subtype); - if (usr_stype != BCMILCP_BCM_SUBTYPE_EVENT) - return; - -- brcmf_fweh_process_event(drvr, event_packet); -+ brcmf_fweh_process_event(drvr, event_packet, skb->len + ETH_HLEN); - } - - #endif /* FWEH_H_ */ -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -index daa427b4..4320c4ca 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -@@ -45,6 +45,11 @@ - #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff - #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 - -+/* scan type definitions */ -+#define BRCMF_SCANTYPE_DEFAULT 0xFF -+#define BRCMF_SCANTYPE_ACTIVE 0 -+#define BRCMF_SCANTYPE_PASSIVE 1 -+ - /* primary (ie tx) key */ - #define BRCMF_PRIMARY_KEY (1 << 1) - #define DOT11_BSSTYPE_ANY 2 -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -index 44e618f9..6f7138ce 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -@@ -20,6 +20,7 @@ - - #include - #include -+#include - - #include - #include -@@ -1076,28 +1077,13 @@ static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf) - } - - --static void --brcmf_msgbuf_rx_skb(struct brcmf_msgbuf *msgbuf, struct sk_buff *skb, -- u8 ifidx) --{ -- struct brcmf_if *ifp; -- -- ifp = brcmf_get_ifp(msgbuf->drvr, ifidx); -- if (!ifp || !ifp->ndev) { -- brcmf_err("Received pkt for invalid ifidx %d\n", ifidx); -- brcmu_pkt_buf_free_skb(skb); -- return; -- } -- brcmf_netif_rx(ifp, skb); --} -- -- - static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf) - { - struct msgbuf_rx_event *event; - u32 idx; - u16 buflen; - struct sk_buff *skb; -+ struct brcmf_if *ifp; - - event = (struct msgbuf_rx_event *)buf; - idx = le32_to_cpu(event->msg.request_id); -@@ -1117,7 +1103,19 @@ static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf) - - skb_trim(skb, buflen); - -- brcmf_msgbuf_rx_skb(msgbuf, skb, event->msg.ifidx); -+ ifp = brcmf_get_ifp(msgbuf->drvr, event->msg.ifidx); -+ if (!ifp || !ifp->ndev) { -+ brcmf_err("Received pkt for invalid ifidx %d\n", -+ event->msg.ifidx); -+ goto exit; -+ } -+ -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ -+ brcmf_fweh_process_skb(ifp->drvr, skb, 0); -+ -+exit: -+ brcmu_pkt_buf_free_skb(skb); - } - - -@@ -1129,6 +1127,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - u16 data_offset; - u16 buflen; - u32 idx; -+ struct brcmf_if *ifp; - - brcmf_msgbuf_update_rxbufpost_count(msgbuf, 1); - -@@ -1149,7 +1148,14 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - - skb_trim(skb, buflen); - -- brcmf_msgbuf_rx_skb(msgbuf, skb, rx_complete->msg.ifidx); -+ ifp = brcmf_get_ifp(msgbuf->drvr, rx_complete->msg.ifidx); -+ if (!ifp || !ifp->ndev) { -+ brcmf_err("Received pkt for invalid ifidx %d\n", -+ rx_complete->msg.ifidx); -+ brcmu_pkt_buf_free_skb(skb); -+ return; -+ } -+ brcmf_netif_rx(ifp, skb); - } - - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -index d224b3dd..e6c8b0d5 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -@@ -461,25 +461,23 @@ static int brcmf_p2p_set_firmware(struct brcmf_if *ifp, u8 *p2p_mac) - * @dev_addr: optional device address. - * - * P2P needs mac addresses for P2P device and interface. If no device -- * address it specified, these are derived from the primary net device, ie. -- * the permanent ethernet address of the device. -+ * address it specified, these are derived from a random ethernet -+ * address. - */ - static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr) - { -- struct brcmf_if *pri_ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; -- bool local_admin = false; -+ bool random_addr = false; - -- if (!dev_addr || is_zero_ether_addr(dev_addr)) { -- dev_addr = pri_ifp->mac_addr; -- local_admin = true; -- } -+ if (!dev_addr || is_zero_ether_addr(dev_addr)) -+ random_addr = true; - -- /* Generate the P2P Device Address. This consists of the device's -- * primary MAC address with the locally administered bit set. -+ /* Generate the P2P Device Address obtaining a random ethernet -+ * address with the locally administered bit set. - */ -- memcpy(p2p->dev_addr, dev_addr, ETH_ALEN); -- if (local_admin) -- p2p->dev_addr[0] |= 0x02; -+ if (random_addr) -+ eth_random_addr(p2p->dev_addr); -+ else -+ memcpy(p2p->dev_addr, dev_addr, ETH_ALEN); - - /* Generate the P2P Interface Address. If the discovery and connection - * BSSCFGs need to simultaneously co-exist, then this address must be -@@ -1367,6 +1365,11 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, - u16 mgmt_type; - u8 action; - -+ if (e->datalen < sizeof(*rxframe)) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - ch.chspec = be16_to_cpu(rxframe->chanspec); - cfg->d11inf.decchspec(&ch); - /* Check if wpa_supplicant has registered for this frame */ -@@ -1864,6 +1867,11 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp, - brcmf_dbg(INFO, "Enter: event %d reason %d\n", e->event_code, - e->reason); - -+ if (e->datalen < sizeof(*rxframe)) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - ch.chspec = be16_to_cpu(rxframe->chanspec); - cfg->d11inf.decchspec(&ch); - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -index bcf29bf6..9954e641 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -@@ -1394,6 +1394,17 @@ static inline u8 brcmf_sdio_getdatoffset(u8 *swheader) - return (u8)((hdrvalue & SDPCM_DOFFSET_MASK) >> SDPCM_DOFFSET_SHIFT); - } - -+static inline bool brcmf_sdio_fromevntchan(u8 *swheader) -+{ -+ u32 hdrvalue; -+ u8 ret; -+ -+ hdrvalue = *(u32 *)swheader; -+ ret = (u8)((hdrvalue & SDPCM_CHANNEL_MASK) >> SDPCM_CHANNEL_SHIFT); -+ -+ return (ret == SDPCM_EVENT_CHANNEL); -+} -+ - static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, - struct brcmf_sdio_hdrinfo *rd, - enum brcmf_sdio_frmtype type) -@@ -1754,7 +1765,11 @@ static u8 brcmf_sdio_rxglom(struct brcmf_sdio *bus, u8 rxseq) - pfirst->len, pfirst->next, - pfirst->prev); - skb_unlink(pfirst, &bus->glom); -- brcmf_rx_frame(bus->sdiodev->dev, pfirst); -+ if (brcmf_sdio_fromevntchan(&dptr[SDPCM_HWHDR_LEN])) -+ brcmf_rx_event(bus->sdiodev->dev, pfirst); -+ else -+ brcmf_rx_frame(bus->sdiodev->dev, pfirst, -+ false); - bus->sdcnt.rxglompkts++; - } - -@@ -2081,18 +2096,19 @@ static uint brcmf_sdio_readframes(struct brcmf_sdio *bus, uint maxframes) - __skb_trim(pkt, rd->len); - skb_pull(pkt, rd->dat_offset); - -+ if (pkt->len == 0) -+ brcmu_pkt_buf_free_skb(pkt); -+ else if (rd->channel == SDPCM_EVENT_CHANNEL) -+ brcmf_rx_event(bus->sdiodev->dev, pkt); -+ else -+ brcmf_rx_frame(bus->sdiodev->dev, pkt, -+ false); -+ - /* prepare the descriptor for the next read */ - rd->len = rd->len_nxtfrm << 4; - rd->len_nxtfrm = 0; - /* treat all packet as event if we don't know */ - rd->channel = SDPCM_EVENT_CHANNEL; -- -- if (pkt->len == 0) { -- brcmu_pkt_buf_free_skb(pkt); -- continue; -- } -- -- brcmf_rx_frame(bus->sdiodev->dev, pkt); - } - - rxcount = maxframes - rxleft; -@@ -3401,6 +3417,10 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus, - goto err; - } - -+ /* Allow full data communication using DPC from now on. */ -+ brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA); -+ bcmerror = 0; -+ - err: - brcmf_sdio_clkctl(bus, CLK_SDONLY, false); - sdio_release_host(bus->sdiodev->func[1]); -@@ -4108,9 +4128,6 @@ static void brcmf_sdio_firmware_callback(struct device *dev, - } - - if (err == 0) { -- /* Allow full data communication using DPC from now on. */ -- brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA); -- - err = brcmf_sdiod_intr_register(sdiodev); - if (err != 0) - brcmf_err("intr register failed:%d\n", err); -@@ -4290,6 +4307,13 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus) - brcmf_dbg(TRACE, "Enter\n"); - - if (bus) { -+ /* Stop watchdog task */ -+ if (bus->watchdog_tsk) { -+ send_sig(SIGTERM, bus->watchdog_tsk, 1); -+ kthread_stop(bus->watchdog_tsk); -+ bus->watchdog_tsk = NULL; -+ } -+ - /* De-register interrupt handler */ - brcmf_sdiod_intr_unregister(bus->sdiodev); - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c -index 689e64d0..3002268e 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c -@@ -144,7 +144,7 @@ struct brcmf_usbdev_info { - - struct usb_device *usbdev; - struct device *dev; -- struct mutex dev_init_lock; -+ struct completion dev_init_done; - - int ctl_in_pipe, ctl_out_pipe; - struct urb *ctl_urb; /* URB for control endpoint */ -@@ -502,7 +502,7 @@ static void brcmf_usb_rx_complete(struct urb *urb) - - if (devinfo->bus_pub.state == BRCMFMAC_USB_STATE_UP) { - skb_put(skb, urb->actual_length); -- brcmf_rx_frame(devinfo->dev, skb); -+ brcmf_rx_frame(devinfo->dev, skb, true); - brcmf_usb_rx_refill(devinfo, req); - } else { - brcmu_pkt_buf_free_skb(skb); -@@ -669,12 +669,18 @@ static int brcmf_usb_up(struct device *dev) - - static void brcmf_cancel_all_urbs(struct brcmf_usbdev_info *devinfo) - { -+ int i; -+ - if (devinfo->ctl_urb) - usb_kill_urb(devinfo->ctl_urb); - if (devinfo->bulk_urb) - usb_kill_urb(devinfo->bulk_urb); -- brcmf_usb_free_q(&devinfo->tx_postq, true); -- brcmf_usb_free_q(&devinfo->rx_postq, true); -+ if (devinfo->tx_reqs) -+ for (i = 0; i < devinfo->bus_pub.ntxq; i++) -+ usb_kill_urb(devinfo->tx_reqs[i].urb); -+ if (devinfo->rx_reqs) -+ for (i = 0; i < devinfo->bus_pub.nrxq; i++) -+ usb_kill_urb(devinfo->rx_reqs[i].urb); - } - - static void brcmf_usb_down(struct device *dev) -@@ -1226,11 +1232,11 @@ static void brcmf_usb_probe_phase2(struct device *dev, - if (ret) - goto error; - -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - return; - error: - brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), ret); -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - device_release_driver(dev); - } - -@@ -1268,7 +1274,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) - if (ret) - goto fail; - /* we are done */ -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - return 0; - } - bus->chip = bus_pub->devid; -@@ -1322,11 +1328,10 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) - - devinfo->usbdev = usb; - devinfo->dev = &usb->dev; -- /* Take an init lock, to protect for disconnect while still loading. -+ /* Init completion, to protect for disconnect while still loading. - * Necessary because of the asynchronous firmware load construction - */ -- mutex_init(&devinfo->dev_init_lock); -- mutex_lock(&devinfo->dev_init_lock); -+ init_completion(&devinfo->dev_init_done); - - usb_set_intfdata(intf, devinfo); - -@@ -1402,7 +1407,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) - return 0; - - fail: -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - kfree(devinfo); - usb_set_intfdata(intf, NULL); - return ret; -@@ -1417,7 +1422,7 @@ brcmf_usb_disconnect(struct usb_interface *intf) - devinfo = (struct brcmf_usbdev_info *)usb_get_intfdata(intf); - - if (devinfo) { -- mutex_lock(&devinfo->dev_init_lock); -+ wait_for_completion(&devinfo->dev_init_done); - /* Make sure that devinfo still exists. Firmware probe routines - * may have released the device and cleared the intfdata. - */ -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -index 8eff2753..d493021f 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -@@ -35,9 +35,10 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, - struct brcmf_if *ifp; - const struct brcmf_vndr_dcmd_hdr *cmdhdr = data; - struct sk_buff *reply; -- int ret, payload, ret_len; -+ unsigned int payload, ret_len; - void *dcmd_buf = NULL, *wr_pointer; - u16 msglen, maxmsglen = PAGE_SIZE - 0x100; -+ int ret; - - if (len < sizeof(*cmdhdr)) { - brcmf_err("vendor command too short: %d\n", len); -@@ -65,7 +66,7 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, - brcmf_err("oversize return buffer %d\n", ret_len); - ret_len = BRCMF_DCMD_MAXLEN; - } -- payload = max(ret_len, len) + 1; -+ payload = max_t(unsigned int, ret_len, len) + 1; - dcmd_buf = vzalloc(payload); - if (NULL == dcmd_buf) - return -ENOMEM; -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -index bec2dc1c..61ae2768 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -@@ -818,13 +818,15 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - static int - brcms_ops_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct brcms_info *wl = hw->priv; - struct scb *scb = &wl->wlc->pri_scb; - int status; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u8 buf_size = params->buf_size; - - if (WARN_ON(scb->magic != SCB_MAGIC)) - return -EIDRM; -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -index 99dac9b8..c75bfd3f 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -@@ -14764,8 +14764,8 @@ static void wlc_phy_ipa_restore_tx_digi_filts_nphy(struct brcms_phy *pi) - } - - static void --wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, u8 *events, u8 *dlys, -- u8 len) -+wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, const u8 *events, -+ const u8 *dlys, u8 len) - { - u32 t1_offset, t2_offset; - u8 ctr; -@@ -15240,16 +15240,16 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev5(struct brcms_phy *pi) - static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - { - u16 currband; -- s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 }; -- s8 *lna1_gain_db = NULL; -- s8 *lna1_gain_db_2 = NULL; -- s8 *lna2_gain_db = NULL; -- s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 }; -- s8 *tia_gain_db; -- s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 }; -- s8 *tia_gainbits; -- u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f }; -- u16 *rfseq_init_gain; -+ static const s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 }; -+ const s8 *lna1_gain_db = NULL; -+ const s8 *lna1_gain_db_2 = NULL; -+ const s8 *lna2_gain_db = NULL; -+ static const s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 }; -+ const s8 *tia_gain_db; -+ static const s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 }; -+ const s8 *tia_gainbits; -+ static const u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f }; -+ const u16 *rfseq_init_gain; - u16 init_gaincode; - u16 clip1hi_gaincode; - u16 clip1md_gaincode = 0; -@@ -15310,10 +15310,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - - if ((freq <= 5080) || (freq == 5825)) { - -- s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 11, 17, 22, 25}; -- s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; -+ static const s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 11, 17, 22, 25}; -+ static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; - - crsminu_th = 0x3e; - lna1_gain_db = lna1A_gain_db_rev7; -@@ -15321,10 +15320,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - lna2_gain_db = lna2A_gain_db_rev7; - } else if ((freq >= 5500) && (freq <= 5700)) { - -- s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 12, 18, 22, 26}; -- s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 }; -+ static const s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26}; -+ static const s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 }; - - crsminu_th = 0x45; - clip1md_gaincode_B = 0x14; -@@ -15335,10 +15333,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - lna2_gain_db = lna2A_gain_db_rev7; - } else { - -- s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 12, 18, 22, 26}; -- s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; -+ static const s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26}; -+ static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; - - crsminu_th = 0x41; - lna1_gain_db = lna1A_gain_db_rev7; -@@ -15450,65 +15447,65 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_CLR_HIQ_DIS, - NPHY_RFSEQ_CMD_SET_HPF_BW - }; -- u8 rfseq_updategainu_dlys[] = { 10, 30, 1 }; -- s8 lna1G_gain_db[] = { 7, 11, 16, 23 }; -- s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 }; -- s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 }; -- s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 }; -- s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 }; -- s8 lna1A_gain_db[] = { 7, 11, 17, 23 }; -- s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 }; -- s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 }; -- s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 }; -- s8 *lna1_gain_db = NULL; -- s8 lna2G_gain_db[] = { -5, 6, 10, 14 }; -- s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 }; -- s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 }; -- s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 }; -- s8 lna2A_gain_db[] = { -6, 2, 6, 10 }; -- s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 }; -- s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 }; -- s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 }; -- s8 *lna2_gain_db = NULL; -- s8 tiaG_gain_db[] = { -+ static const u8 rfseq_updategainu_dlys[] = { 10, 30, 1 }; -+ static const s8 lna1G_gain_db[] = { 7, 11, 16, 23 }; -+ static const s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 }; -+ static const s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 }; -+ static const s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 }; -+ static const s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 }; -+ static const s8 lna1A_gain_db[] = { 7, 11, 17, 23 }; -+ static const s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 }; -+ static const s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 }; -+ static const s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 }; -+ const s8 *lna1_gain_db = NULL; -+ static const s8 lna2G_gain_db[] = { -5, 6, 10, 14 }; -+ static const s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 }; -+ static const s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 }; -+ static const s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 }; -+ static const s8 lna2A_gain_db[] = { -6, 2, 6, 10 }; -+ static const s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 }; -+ static const s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 }; -+ static const s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 }; -+ const s8 *lna2_gain_db = NULL; -+ static const s8 tiaG_gain_db[] = { - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A }; -- s8 tiaA_gain_db[] = { -+ static const s8 tiaA_gain_db[] = { - 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 }; -- s8 tiaA_gain_db_rev4[] = { -+ static const s8 tiaA_gain_db_rev4[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 tiaA_gain_db_rev5[] = { -+ static const s8 tiaA_gain_db_rev5[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 tiaA_gain_db_rev6[] = { -+ static const s8 tiaA_gain_db_rev6[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 *tia_gain_db; -- s8 tiaG_gainbits[] = { -+ const s8 *tia_gain_db; -+ static const s8 tiaG_gainbits[] = { - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }; -- s8 tiaA_gainbits[] = { -+ static const s8 tiaA_gainbits[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 }; -- s8 tiaA_gainbits_rev4[] = { -+ static const s8 tiaA_gainbits_rev4[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 tiaA_gainbits_rev5[] = { -+ static const s8 tiaA_gainbits_rev5[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 tiaA_gainbits_rev6[] = { -+ static const s8 tiaA_gainbits_rev6[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 *tia_gainbits; -- s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 }; -- s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 }; -- u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f }; -- u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f }; -- u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f }; -- u16 rfseqG_init_gain_rev5_elna[] = { -+ const s8 *tia_gainbits; -+ static const s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 }; -+ static const s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 }; -+ static const u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f }; -+ static const u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f }; -+ static const u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f }; -+ static const u16 rfseqG_init_gain_rev5_elna[] = { - 0x013f, 0x013f, 0x013f, 0x013f }; -- u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f }; -- u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f }; -- u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f }; -- u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f }; -- u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f }; -- u16 rfseqA_init_gain_rev4_elna[] = { -+ static const u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f }; -+ static const u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f }; -+ static const u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f }; -+ static const u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f }; -+ static const u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f }; -+ static const u16 rfseqA_init_gain_rev4_elna[] = { - 0x314f, 0x314f, 0x314f, 0x314f }; -- u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f }; -- u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f }; -- u16 *rfseq_init_gain; -+ static const u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f }; -+ static const u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f }; -+ const u16 *rfseq_init_gain; - u16 initG_gaincode = 0x627e; - u16 initG_gaincode_rev4 = 0x527e; - u16 initG_gaincode_rev5 = 0x427e; -@@ -15538,10 +15535,10 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - u16 clip1mdA_gaincode_rev6 = 0x2084; - u16 clip1md_gaincode = 0; - u16 clip1loG_gaincode = 0x0074; -- u16 clip1loG_gaincode_rev5[] = { -+ static const u16 clip1loG_gaincode_rev5[] = { - 0x0062, 0x0064, 0x006a, 0x106a, 0x106c, 0x1074, 0x107c, 0x207c - }; -- u16 clip1loG_gaincode_rev6[] = { -+ static const u16 clip1loG_gaincode_rev6[] = { - 0x106a, 0x106c, 0x1074, 0x107c, 0x007e, 0x107e, 0x207e, 0x307e - }; - u16 clip1loG_gaincode_rev6_224B0 = 0x1074; -@@ -16066,7 +16063,7 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - - static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - { -- u8 rfseq_rx2tx_events[] = { -+ static const u8 rfseq_rx2tx_events[] = { - NPHY_RFSEQ_CMD_NOP, - NPHY_RFSEQ_CMD_RXG_FBW, - NPHY_RFSEQ_CMD_TR_SWITCH, -@@ -16076,7 +16073,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_EXT_PA - }; - u8 rfseq_rx2tx_dlys[] = { 8, 6, 6, 2, 4, 60, 1 }; -- u8 rfseq_tx2rx_events[] = { -+ static const u8 rfseq_tx2rx_events[] = { - NPHY_RFSEQ_CMD_NOP, - NPHY_RFSEQ_CMD_EXT_PA, - NPHY_RFSEQ_CMD_TX_GAIN, -@@ -16085,8 +16082,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_RXG_FBW, - NPHY_RFSEQ_CMD_CLR_HIQ_DIS - }; -- u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 }; -- u8 rfseq_tx2rx_events_rev3[] = { -+ static const u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 }; -+ static const u8 rfseq_tx2rx_events_rev3[] = { - NPHY_REV3_RFSEQ_CMD_EXT_PA, - NPHY_REV3_RFSEQ_CMD_INT_PA_PU, - NPHY_REV3_RFSEQ_CMD_TX_GAIN, -@@ -16096,7 +16093,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_REV3_RFSEQ_CMD_CLR_HIQ_DIS, - NPHY_REV3_RFSEQ_CMD_END - }; -- u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 }; -+ static const u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 }; - u8 rfseq_rx2tx_events_rev3[] = { - NPHY_REV3_RFSEQ_CMD_NOP, - NPHY_REV3_RFSEQ_CMD_RXG_FBW, -@@ -16110,7 +16107,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - }; - u8 rfseq_rx2tx_dlys_rev3[] = { 8, 6, 6, 4, 4, 18, 42, 1, 1 }; - -- u8 rfseq_rx2tx_events_rev3_ipa[] = { -+ static const u8 rfseq_rx2tx_events_rev3_ipa[] = { - NPHY_REV3_RFSEQ_CMD_NOP, - NPHY_REV3_RFSEQ_CMD_RXG_FBW, - NPHY_REV3_RFSEQ_CMD_TR_SWITCH, -@@ -16121,15 +16118,15 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_REV3_RFSEQ_CMD_INT_PA_PU, - NPHY_REV3_RFSEQ_CMD_END - }; -- u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 }; -- u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f }; -+ static const u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 }; -+ static const u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f }; - - s16 alpha0, alpha1, alpha2; - s16 beta0, beta1, beta2; - u32 leg_data_weights, ht_data_weights, nss1_data_weights, - stbc_data_weights; - u8 chan_freq_range = 0; -- u16 dac_control = 0x0002; -+ static const u16 dac_control = 0x0002; - u16 aux_adc_vmid_rev7_core0[] = { 0x8e, 0x96, 0x96, 0x96 }; - u16 aux_adc_vmid_rev7_core1[] = { 0x8f, 0x9f, 0x9f, 0x96 }; - u16 aux_adc_vmid_rev4[] = { 0xa2, 0xb4, 0xb4, 0x89 }; -@@ -16139,8 +16136,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - u16 aux_adc_gain_rev4[] = { 0x02, 0x02, 0x02, 0x00 }; - u16 aux_adc_gain_rev3[] = { 0x02, 0x02, 0x02, 0x00 }; - u16 *aux_adc_gain; -- u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 }; -- u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 }; -+ static const u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 }; -+ static const u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 }; - s32 min_nvar_val = 0x18d; - s32 min_nvar_offset_6mbps = 20; - u8 pdetrange; -@@ -16151,9 +16148,9 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - u16 rfseq_rx2tx_lpf_h_hpc_rev7 = 0x77; - u16 rfseq_tx2rx_lpf_h_hpc_rev7 = 0x77; - u16 rfseq_pktgn_lpf_h_hpc_rev7 = 0x77; -- u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 }; -- u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -- u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -+ static const u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 }; -+ static const u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -+ static const u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; - u16 ipalvlshift_3p3_war_en = 0; - u16 rccal_bcap_val, rccal_scap_val; - u16 rccal_tx20_11b_bcap = 0; -@@ -24291,13 +24288,13 @@ static void wlc_phy_update_txcal_ladder_nphy(struct brcms_phy *pi, u16 core) - u16 bbmult; - u16 tblentry; - -- struct nphy_txiqcal_ladder ladder_lo[] = { -+ static const struct nphy_txiqcal_ladder ladder_lo[] = { - {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0}, - {25, 0}, {25, 1}, {25, 2}, {25, 3}, {25, 4}, {25, 5}, - {25, 6}, {25, 7}, {35, 7}, {50, 7}, {71, 7}, {100, 7} - }; - -- struct nphy_txiqcal_ladder ladder_iq[] = { -+ static const struct nphy_txiqcal_ladder ladder_iq[] = { - {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0}, - {25, 0}, {35, 0}, {50, 0}, {71, 0}, {100, 0}, {100, 1}, - {100, 2}, {100, 3}, {100, 4}, {100, 5}, {100, 6}, {100, 7} -@@ -25773,67 +25770,67 @@ wlc_phy_cal_txiqlo_nphy(struct brcms_phy *pi, struct nphy_txgains target_gain, - u16 cal_gain[2]; - struct nphy_iqcal_params cal_params[2]; - u32 tbl_len; -- void *tbl_ptr; -+ const void *tbl_ptr; - bool ladder_updated[2]; - u8 mphase_cal_lastphase = 0; - int bcmerror = 0; - bool phyhang_avoid_state = false; - -- u16 tbl_tx_iqlo_cal_loft_ladder_20[] = { -+ static const u16 tbl_tx_iqlo_cal_loft_ladder_20[] = { - 0x0300, 0x0500, 0x0700, 0x0900, 0x0d00, 0x1100, 0x1900, 0x1901, - 0x1902, - 0x1903, 0x1904, 0x1905, 0x1906, 0x1907, 0x2407, 0x3207, 0x4607, - 0x6407 - }; - -- u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = { -+ static const u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = { - 0x0200, 0x0300, 0x0600, 0x0900, 0x0d00, 0x1100, 0x1900, 0x2400, - 0x3200, - 0x4600, 0x6400, 0x6401, 0x6402, 0x6403, 0x6404, 0x6405, 0x6406, - 0x6407 - }; - -- u16 tbl_tx_iqlo_cal_loft_ladder_40[] = { -+ static const u16 tbl_tx_iqlo_cal_loft_ladder_40[] = { - 0x0200, 0x0300, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1201, - 0x1202, - 0x1203, 0x1204, 0x1205, 0x1206, 0x1207, 0x1907, 0x2307, 0x3207, - 0x4707 - }; - -- u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = { -+ static const u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = { - 0x0100, 0x0200, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1900, - 0x2300, - 0x3200, 0x4700, 0x4701, 0x4702, 0x4703, 0x4704, 0x4705, 0x4706, - 0x4707 - }; - -- u16 tbl_tx_iqlo_cal_startcoefs[] = { -+ static const u16 tbl_tx_iqlo_cal_startcoefs[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000 - }; - -- u16 tbl_tx_iqlo_cal_cmds_fullcal[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_fullcal[] = { - 0x8123, 0x8264, 0x8086, 0x8245, 0x8056, - 0x9123, 0x9264, 0x9086, 0x9245, 0x9056 - }; - -- u16 tbl_tx_iqlo_cal_cmds_recal[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_recal[] = { - 0x8101, 0x8253, 0x8053, 0x8234, 0x8034, - 0x9101, 0x9253, 0x9053, 0x9234, 0x9034 - }; - -- u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000 - }; - -- u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = { - 0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234, - 0x9434, 0x9334, 0x9084, 0x9267, 0x9056, 0x9234 - }; - -- u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = { - 0x8423, 0x8323, 0x8073, 0x8256, 0x8045, 0x8223, - 0x9423, 0x9323, 0x9073, 0x9256, 0x9045, 0x9223 - }; -diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c -index a7400836..63f95e9c 100644 ---- a/drivers/net/wireless/cw1200/cw1200_spi.c -+++ b/drivers/net/wireless/cw1200/cw1200_spi.c -@@ -446,8 +446,7 @@ static int cw1200_spi_disconnect(struct spi_device *func) - return 0; - } - --#ifdef CONFIG_PM --static int cw1200_spi_suspend(struct device *dev) -+static int __maybe_unused cw1200_spi_suspend(struct device *dev) - { - struct hwbus_priv *self = spi_get_drvdata(to_spi_device(dev)); - -@@ -460,16 +459,12 @@ static int cw1200_spi_suspend(struct device *dev) - - static SIMPLE_DEV_PM_OPS(cw1200_pm_ops, cw1200_spi_suspend, NULL); - --#endif -- - static struct spi_driver spi_driver = { - .probe = cw1200_spi_probe, - .remove = cw1200_spi_disconnect, - .driver = { - .name = "cw1200_wlan_spi", --#ifdef CONFIG_PM -- .pm = &cw1200_pm_ops, --#endif -+ .pm = IS_ENABLED(CONFIG_PM) ? &cw1200_pm_ops : NULL, - }, - }; - -diff --git a/drivers/net/wireless/cw1200/main.c b/drivers/net/wireless/cw1200/main.c -index 0e51e27d..317daa96 100644 ---- a/drivers/net/wireless/cw1200/main.c -+++ b/drivers/net/wireless/cw1200/main.c -@@ -345,6 +345,11 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, - mutex_init(&priv->wsm_cmd_mux); - mutex_init(&priv->conf_mutex); - priv->workqueue = create_singlethread_workqueue("cw1200_wq"); -+ if (!priv->workqueue) { -+ ieee80211_free_hw(hw); -+ return NULL; -+ } -+ - sema_init(&priv->scan.lock, 1); - INIT_WORK(&priv->scan.work, cw1200_scan_work); - INIT_DELAYED_WORK(&priv->scan.probe_work, cw1200_probe_work); -diff --git a/drivers/net/wireless/cw1200/pm.h b/drivers/net/wireless/cw1200/pm.h -index 3ed90ff2..53454847 100644 ---- a/drivers/net/wireless/cw1200/pm.h -+++ b/drivers/net/wireless/cw1200/pm.h -@@ -31,13 +31,18 @@ int cw1200_pm_init(struct cw1200_pm_state *pm, - void cw1200_pm_deinit(struct cw1200_pm_state *pm); - int cw1200_wow_suspend(struct ieee80211_hw *hw, - struct cfg80211_wowlan *wowlan); --int cw1200_wow_resume(struct ieee80211_hw *hw); - int cw1200_can_suspend(struct cw1200_common *priv); -+int cw1200_wow_resume(struct ieee80211_hw *hw); - void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, - unsigned long tmo); - #else - static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, -- unsigned long tmo) { -+ unsigned long tmo) -+{ -+} -+static inline int cw1200_can_suspend(struct cw1200_common *priv) -+{ -+ return 0; - } - #endif - #endif -diff --git a/drivers/net/wireless/cw1200/scan.c b/drivers/net/wireless/cw1200/scan.c -index bff81b8d..2ce01936 100644 ---- a/drivers/net/wireless/cw1200/scan.c -+++ b/drivers/net/wireless/cw1200/scan.c -@@ -78,27 +78,30 @@ int cw1200_hw_scan(struct ieee80211_hw *hw, - if (req->n_ssids > WSM_SCAN_MAX_NUM_OF_SSIDS) - return -EINVAL; - -+ /* will be unlocked in cw1200_scan_work() */ -+ down(&priv->scan.lock); -+ mutex_lock(&priv->conf_mutex); -+ - frame.skb = ieee80211_probereq_get(hw, priv->vif->addr, NULL, 0, - req->ie_len); -- if (!frame.skb) -+ if (!frame.skb) { -+ mutex_unlock(&priv->conf_mutex); -+ up(&priv->scan.lock); - return -ENOMEM; -+ } - - if (req->ie_len) - memcpy(skb_put(frame.skb, req->ie_len), req->ie, req->ie_len); - -- /* will be unlocked in cw1200_scan_work() */ -- down(&priv->scan.lock); -- mutex_lock(&priv->conf_mutex); -- - ret = wsm_set_template_frame(priv, &frame); - if (!ret) { - /* Host want to be the probe responder. */ - ret = wsm_set_probe_responder(priv, true); - } - if (ret) { -+ dev_kfree_skb(frame.skb); - mutex_unlock(&priv->conf_mutex); - up(&priv->scan.lock); -- dev_kfree_skb(frame.skb); - return ret; - } - -@@ -120,10 +123,9 @@ int cw1200_hw_scan(struct ieee80211_hw *hw, - ++priv->scan.n_ssids; - } - -- mutex_unlock(&priv->conf_mutex); -- - if (frame.skb) - dev_kfree_skb(frame.skb); -+ mutex_unlock(&priv->conf_mutex); - queue_work(priv->workqueue, &priv->scan.work); - return 0; - } -diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c -index 95a7fdb3..c602a1e6 100644 ---- a/drivers/net/wireless/cw1200/sta.c -+++ b/drivers/net/wireless/cw1200/sta.c -@@ -2135,9 +2135,7 @@ void cw1200_mcast_timeout(unsigned long arg) - - int cw1200_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - /* Aggregation is implemented fully in firmware, - * including block ack negotiation. Do not allow -diff --git a/drivers/net/wireless/cw1200/sta.h b/drivers/net/wireless/cw1200/sta.h -index bebb3379..a0bacaa3 100644 ---- a/drivers/net/wireless/cw1200/sta.h -+++ b/drivers/net/wireless/cw1200/sta.h -@@ -109,9 +109,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, - u32 changed); - int cw1200_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - - void cw1200_suspend_resume(struct cw1200_common *priv, - struct wsm_suspend_resume *arg); -diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c -index 9e0ca304..5a595f9f 100644 ---- a/drivers/net/wireless/cw1200/wsm.c -+++ b/drivers/net/wireless/cw1200/wsm.c -@@ -379,7 +379,6 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, - { - int ret; - int count; -- int i; - - count = WSM_GET32(buf); - if (WARN_ON(count <= 0)) -@@ -395,11 +394,10 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, - } - - cw1200_debug_txed_multi(priv, count); -- for (i = 0; i < count; ++i) { -+ do { - ret = wsm_tx_confirm(priv, buf, link_id); -- if (ret) -- return ret; -- } -+ } while (!ret && --count); -+ - return ret; - - underflow: -@@ -1807,16 +1805,18 @@ static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size) - { - size_t pos = buf->data - buf->begin; - size_t size = pos + extra_size; -+ u8 *tmp; - - size = round_up(size, FWLOAD_BLOCK_SIZE); - -- buf->begin = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); -- if (buf->begin) { -- buf->data = &buf->begin[pos]; -- buf->end = &buf->begin[size]; -- return 0; -- } else { -- buf->end = buf->data = buf->begin; -+ tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); -+ if (!tmp) { -+ wsm_buf_deinit(buf); - return -ENOMEM; - } -+ -+ buf->begin = tmp; -+ buf->data = &buf->begin[pos]; -+ buf->end = &buf->begin[size]; -+ return 0; - } -diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c -index 6df3ee56..515aa3f9 100644 ---- a/drivers/net/wireless/hostap/hostap_hw.c -+++ b/drivers/net/wireless/hostap/hostap_hw.c -@@ -836,25 +836,30 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len, - spin_lock_bh(&local->baplock); - - res = hfa384x_setup_bap(dev, BAP0, rid, 0); -- if (!res) -- res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); -+ if (res) -+ goto unlock; -+ -+ res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); -+ if (res) -+ goto unlock; - - if (le16_to_cpu(rec.len) == 0) { - /* RID not available */ - res = -ENODATA; -+ goto unlock; - } - - rlen = (le16_to_cpu(rec.len) - 1) * 2; -- if (!res && exact_len && rlen != len) { -+ if (exact_len && rlen != len) { - printk(KERN_DEBUG "%s: hfa384x_get_rid - RID len mismatch: " - "rid=0x%04x, len=%d (expected %d)\n", - dev->name, rid, rlen, len); - res = -ENODATA; - } - -- if (!res) -- res = hfa384x_from_bap(dev, BAP0, buf, len); -+ res = hfa384x_from_bap(dev, BAP0, buf, len); - -+unlock: - spin_unlock_bh(&local->baplock); - mutex_unlock(&local->rid_bap_mtx); - -diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c -index 6656215a..04b0349a 100644 ---- a/drivers/net/wireless/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/iwlegacy/4965-mac.c -@@ -5982,12 +5982,14 @@ il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - - int - il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 * ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct il_priv *il = hw->priv; - int ret = -EINVAL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - D_HT("A-MPDU action on addr %pM tid %d\n", sta->addr, tid); - -diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h -index 8ab8706f..e432715e 100644 ---- a/drivers/net/wireless/iwlegacy/4965.h -+++ b/drivers/net/wireless/iwlegacy/4965.h -@@ -182,9 +182,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, - struct ieee80211_sta *sta, u32 iv32, - u16 *phase1key); - int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 * ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int il4965_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta); - void -diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c -index b3ad34e8..1eb1a823 100644 ---- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c -+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c -@@ -729,12 +729,15 @@ static inline bool iwl_enable_tx_ampdu(const struct iwl_cfg *cfg) - - static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); - int ret = -EINVAL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - struct iwl_station_priv *sta_priv = (void *) sta->drv_priv; - - IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", -diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -index d8298491..95b82cc1 100644 ---- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -+++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -@@ -73,6 +73,7 @@ - /* NVM offsets (in words) definitions */ - enum wkp_nvm_offsets { - /* NVM HW-Section offset (in words) definitions */ -+ SUBSYSTEM_ID = 0x0A, - HW_ADDR = 0x15, - - /* NVM SW-Section offset (in words) definitions */ -@@ -257,13 +258,12 @@ static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, bool is_5ghz, - static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - struct iwl_nvm_data *data, - const __le16 * const nvm_ch_flags, -- bool lar_supported) -+ bool lar_supported, bool no_wide_in_5ghz) - { - int ch_idx; - int n_channels = 0; - struct ieee80211_channel *channel; - u16 ch_flags; -- bool is_5ghz; - int num_of_ch, num_2ghz_channels; - const u8 *nvm_chan; - -@@ -278,12 +278,20 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - } - - for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { -+ bool is_5ghz = (ch_idx >= num_2ghz_channels); -+ - ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx); - -- if (ch_idx >= num_2ghz_channels && -- !data->sku_cap_band_52GHz_enable) -+ if (is_5ghz && !data->sku_cap_band_52GHz_enable) - continue; - -+ /* workaround to disable wide channels in 5GHz */ -+ if (no_wide_in_5ghz && is_5ghz) { -+ ch_flags &= ~(NVM_CHANNEL_40MHZ | -+ NVM_CHANNEL_80MHZ | -+ NVM_CHANNEL_160MHZ); -+ } -+ - if (!lar_supported && !(ch_flags & NVM_CHANNEL_VALID)) { - /* - * Channels might become valid later if lar is -@@ -303,8 +311,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - n_channels++; - - channel->hw_value = nvm_chan[ch_idx]; -- channel->band = (ch_idx < num_2ghz_channels) ? -- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; -+ channel->band = is_5ghz ? -+ IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; - channel->center_freq = - ieee80211_channel_to_frequency( - channel->hw_value, channel->band); -@@ -316,7 +324,6 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - * is not used in mvm, and is used for backwards compatibility - */ - channel->max_power = IWL_DEFAULT_MAX_TX_POWER; -- is_5ghz = channel->band == IEEE80211_BAND_5GHZ; - - /* don't put limitations in case we're using LAR */ - if (!lar_supported) -@@ -405,7 +412,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, - static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, - struct iwl_nvm_data *data, - const __le16 *ch_section, -- u8 tx_chains, u8 rx_chains, bool lar_supported) -+ u8 tx_chains, u8 rx_chains, bool lar_supported, -+ bool no_wide_in_5ghz) - { - int n_channels; - int n_used = 0; -@@ -414,12 +422,14 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, - if (cfg->device_family != IWL_DEVICE_FAMILY_8000) - n_channels = iwl_init_channel_map( - dev, cfg, data, -- &ch_section[NVM_CHANNELS], lar_supported); -+ &ch_section[NVM_CHANNELS], lar_supported, -+ no_wide_in_5ghz); - else - n_channels = iwl_init_channel_map( - dev, cfg, data, - &ch_section[NVM_CHANNELS_FAMILY_8000], -- lar_supported); -+ lar_supported, -+ no_wide_in_5ghz); - - sband = &data->bands[IEEE80211_BAND_2GHZ]; - sband->band = IEEE80211_BAND_2GHZ; -@@ -582,6 +592,39 @@ static void iwl_set_hw_address_family_8000(struct device *dev, - - #define IWL_4165_DEVICE_ID 0x5501 - -+static bool -+iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg, -+ const __le16 *nvm_hw) -+{ -+ /* -+ * Workaround a bug in Indonesia SKUs where the regulatory in -+ * some 7000-family OTPs erroneously allow wide channels in -+ * 5GHz. To check for Indonesia, we take the SKU value from -+ * bits 1-4 in the subsystem ID and check if it is either 5 or -+ * 9. In those cases, we need to force-disable wide channels -+ * in 5GHz otherwise the FW will throw a sysassert when we try -+ * to use them. -+ */ -+ if (cfg->device_family == IWL_DEVICE_FAMILY_7000) { -+ /* -+ * Unlike the other sections in the NVM, the hw -+ * section uses big-endian. -+ */ -+ u16 subsystem_id = be16_to_cpup((const __be16 *)nvm_hw -+ + SUBSYSTEM_ID); -+ u8 sku = (subsystem_id & 0x1e) >> 1; -+ -+ if (sku == 5 || sku == 9) { -+ IWL_DEBUG_EEPROM(dev, -+ "disabling wide channels in 5GHz (0x%0x %d)\n", -+ subsystem_id, sku); -+ return true; -+ } -+ } -+ -+ return false; -+} -+ - struct iwl_nvm_data * - iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - const __le16 *nvm_hw, const __le16 *nvm_sw, -@@ -591,6 +634,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - u32 mac_addr0, u32 mac_addr1, u32 hw_id) - { - struct iwl_nvm_data *data; -+ bool no_wide_in_5ghz = iwl_nvm_no_wide_in_5ghz(dev, cfg, nvm_hw); - u32 sku; - u32 radio_cfg; - u16 lar_config; -@@ -657,7 +701,8 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - iwl_set_hw_address(cfg, data, nvm_hw); - - iwl_init_sbands(dev, cfg, data, nvm_sw, -- tx_chains, rx_chains, lar_fw_supported); -+ tx_chains, rx_chains, lar_fw_supported, -+ no_wide_in_5ghz); - } else { - u16 lar_offset = data->nvm_version < 0xE39 ? - NVM_LAR_OFFSET_FAMILY_8000_OLD : -@@ -673,7 +718,8 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - - iwl_init_sbands(dev, cfg, data, regulatory, - tx_chains, rx_chains, -- lar_fw_supported && data->lar_enabled); -+ lar_fw_supported && data->lar_enabled, -+ no_wide_in_5ghz); - } - - data->calib_version = 255; -diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c -index ce12717e..7b2a7d84 100644 ---- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c -+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c -@@ -322,8 +322,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, - goto out; - } - -- if (changed) -- *changed = (resp->status == MCC_RESP_NEW_CHAN_PROFILE); -+ if (changed) { -+ u32 status = le32_to_cpu(resp->status); -+ -+ *changed = (status == MCC_RESP_NEW_CHAN_PROFILE || -+ status == MCC_RESP_ILLEGAL); -+ } - - regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, - __le32_to_cpu(resp->n_channels), -@@ -826,13 +830,16 @@ iwl_mvm_ampdu_check_trigger(struct iwl_mvm *mvm, struct ieee80211_vif *vif, - - static int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); - int ret; - bool tx_agg_ref = false; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - - IWL_DEBUG_HT(mvm, "A-MPDU action on addr %pM tid %d: action %d\n", - sta->addr, tid, action); -@@ -1903,6 +1910,11 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac, - struct iwl_mvm_mc_iter_data *data = _data; - struct iwl_mvm *mvm = data->mvm; - struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd; -+ struct iwl_host_cmd hcmd = { -+ .id = MCAST_FILTER_CMD, -+ .flags = CMD_ASYNC, -+ .dataflags[0] = IWL_HCMD_DFL_NOCOPY, -+ }; - int ret, len; - - /* if we don't have free ports, mcast frames will be dropped */ -@@ -1917,7 +1929,10 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac, - memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); - len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); - -- ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd); -+ hcmd.len[0] = len; -+ hcmd.data[0] = cmd; -+ -+ ret = iwl_mvm_send_cmd(mvm, &hcmd); - if (ret) - IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret); - } -@@ -4039,10 +4054,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, - struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); - -- if (!fw_has_capa(&mvm->fw->ucode_capa, -- IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) -- return; -- - /* if beacon filtering isn't on mac80211 does it anyway */ - if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) - return; -diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c -index 2ee0f6fe..5509c502 100644 ---- a/drivers/net/wireless/iwlwifi/mvm/nvm.c -+++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c -@@ -667,9 +667,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2, - - n_channels = __le32_to_cpu(mcc_resp->n_channels); - IWL_DEBUG_LAR(mvm, -- "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n", -- status, mcc, mcc >> 8, mcc & 0xff, -- !!(status == MCC_RESP_NEW_CHAN_PROFILE), n_channels); -+ "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n", -+ status, mcc, mcc >> 8, mcc & 0xff, n_channels); - - resp_len = sizeof(*mcc_resp) + n_channels * sizeof(__le32); - resp_cp = kmemdup(mcc_resp, resp_len, GFP_KERNEL); -diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c -index e06591f6..d6f9858f 100644 ---- a/drivers/net/wireless/iwlwifi/pcie/rx.c -+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c -@@ -713,6 +713,8 @@ int iwl_pcie_rx_init(struct iwl_trans *trans) - WQ_HIGHPRI | WQ_UNBOUND, 1); - INIT_WORK(&rba->rx_alloc, iwl_pcie_rx_allocator_work); - -+ cancel_work_sync(&rba->rx_alloc); -+ - spin_lock(&rba->lock); - atomic_set(&rba->req_pending, 0); - atomic_set(&rba->req_ready, 0); -diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c -index 0cd95120..0f582117 100644 ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -699,16 +699,21 @@ static int hwsim_fops_ps_write(void *dat, u64 val) - val != PS_MANUAL_POLL) - return -EINVAL; - -- old_ps = data->ps; -- data->ps = val; -- -- local_bh_disable(); - if (val == PS_MANUAL_POLL) { -+ if (data->ps != PS_ENABLED) -+ return -EINVAL; -+ local_bh_disable(); - ieee80211_iterate_active_interfaces_atomic( - data->hw, IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_ps_poll, data); -- data->ps_poll_pending = true; -- } else if (old_ps == PS_DISABLED && val != PS_DISABLED) { -+ local_bh_enable(); -+ return 0; -+ } -+ old_ps = data->ps; -+ data->ps = val; -+ -+ local_bh_disable(); -+ if (old_ps == PS_DISABLED && val != PS_DISABLED) { - ieee80211_iterate_active_interfaces_atomic( - data->hw, IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_nullfunc_ps, data); -@@ -1817,10 +1822,12 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw, - - static int mac80211_hwsim_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ - switch (action) { - case IEEE80211_AMPDU_TX_START: - ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); -@@ -2446,9 +2453,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - IEEE80211_VHT_CAP_SHORT_GI_80 | - IEEE80211_VHT_CAP_SHORT_GI_160 | - IEEE80211_VHT_CAP_TXSTBC | -- IEEE80211_VHT_CAP_RXSTBC_1 | -- IEEE80211_VHT_CAP_RXSTBC_2 | -- IEEE80211_VHT_CAP_RXSTBC_3 | - IEEE80211_VHT_CAP_RXSTBC_4 | - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; - sband->vht_cap.vht_mcs.rx_mcs_map = -@@ -2511,6 +2515,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - if (param->no_vif) - ieee80211_hw_set(hw, NO_AUTO_VIF); - -+ tasklet_hrtimer_init(&data->beacon_timer, -+ mac80211_hwsim_beacon, -+ CLOCK_MONOTONIC, HRTIMER_MODE_ABS); -+ - err = ieee80211_register_hw(hw); - if (err < 0) { - printk(KERN_DEBUG "mac80211_hwsim: ieee80211_register_hw failed (%d)\n", -@@ -2535,16 +2543,11 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - data->debugfs, - data, &hwsim_simulate_radar); - -- tasklet_hrtimer_init(&data->beacon_timer, -- mac80211_hwsim_beacon, -- CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS); -- - spin_lock_bh(&hwsim_radio_lock); - list_add_tail(&data->list, &hwsim_radios); - spin_unlock_bh(&hwsim_radio_lock); - -- if (idx > 0) -- hwsim_mcast_new_radio(idx, info, param); -+ hwsim_mcast_new_radio(idx, info, param); - - return idx; - -@@ -2882,6 +2885,8 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2, - static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - { - struct hwsim_new_radio_params param = { 0 }; -+ const char *hwname = NULL; -+ int ret; - - param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG]; - param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE]; -@@ -2895,8 +2900,14 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (info->attrs[HWSIM_ATTR_NO_VIF]) - param.no_vif = true; - -- if (info->attrs[HWSIM_ATTR_RADIO_NAME]) -- param.hwname = nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); -+ if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { -+ hwname = kasprintf(GFP_KERNEL, "%.*s", -+ nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), -+ (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); -+ if (!hwname) -+ return -ENOMEM; -+ param.hwname = hwname; -+ } - - if (info->attrs[HWSIM_ATTR_USE_CHANCTX]) - param.use_chanctx = true; -@@ -2910,12 +2921,16 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (info->attrs[HWSIM_ATTR_REG_CUSTOM_REG]) { - u32 idx = nla_get_u32(info->attrs[HWSIM_ATTR_REG_CUSTOM_REG]); - -- if (idx >= ARRAY_SIZE(hwsim_world_regdom_custom)) -+ if (idx >= ARRAY_SIZE(hwsim_world_regdom_custom)) { -+ kfree(hwname); - return -EINVAL; -+ } - param.regd = hwsim_world_regdom_custom[idx]; - } - -- return mac80211_hwsim_new_radio(info, ¶m); -+ ret = mac80211_hwsim_new_radio(info, ¶m); -+ kfree(hwname); -+ return ret; - } - - static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) -@@ -2924,11 +2939,15 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - s64 idx = -1; - const char *hwname = NULL; - -- if (info->attrs[HWSIM_ATTR_RADIO_ID]) -+ if (info->attrs[HWSIM_ATTR_RADIO_ID]) { - idx = nla_get_u32(info->attrs[HWSIM_ATTR_RADIO_ID]); -- else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) -- hwname = (void *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); -- else -+ } else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { -+ hwname = kasprintf(GFP_KERNEL, "%.*s", -+ nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), -+ (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); -+ if (!hwname) -+ return -ENOMEM; -+ } else - return -EINVAL; - - spin_lock_bh(&hwsim_radio_lock); -@@ -2937,7 +2956,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (data->idx != idx) - continue; - } else { -- if (strcmp(hwname, wiphy_name(data->hw->wiphy))) -+ if (!hwname || -+ strcmp(hwname, wiphy_name(data->hw->wiphy))) - continue; - } - -@@ -2945,10 +2965,12 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - spin_unlock_bh(&hwsim_radio_lock); - mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), - info); -+ kfree(hwname); - return 0; - } - spin_unlock_bh(&hwsim_radio_lock); - -+ kfree(hwname); - return -ENODEV; - } - -@@ -2980,7 +3002,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info) - goto out_err; - } - -- genlmsg_reply(skb, info); -+ res = genlmsg_reply(skb, info); - break; - } - -@@ -3173,16 +3195,16 @@ static int __init init_mac80211_hwsim(void) - if (err) - return err; - -+ err = hwsim_init_netlink(); -+ if (err) -+ goto out_unregister_driver; -+ - hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim"); - if (IS_ERR(hwsim_class)) { - err = PTR_ERR(hwsim_class); -- goto out_unregister_driver; -+ goto out_exit_netlink; - } - -- err = hwsim_init_netlink(); -- if (err < 0) -- goto out_unregister_driver; -- - for (i = 0; i < radios; i++) { - struct hwsim_new_radio_params param = { 0 }; - -@@ -3288,6 +3310,8 @@ out_free_mon: - free_netdev(hwsim_mon); - out_free_radios: - mac80211_hwsim_free(); -+out_exit_netlink: -+ hwsim_exit_netlink(); - out_unregister_driver: - platform_driver_unregister(&mac80211_hwsim_driver); - return err; -diff --git a/drivers/net/wireless/mediatek/mt7601u/eeprom.h b/drivers/net/wireless/mediatek/mt7601u/eeprom.h -index 662d1270..57b503ae 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/eeprom.h -+++ b/drivers/net/wireless/mediatek/mt7601u/eeprom.h -@@ -17,7 +17,7 @@ - - struct mt7601u_dev; - --#define MT7601U_EE_MAX_VER 0x0c -+#define MT7601U_EE_MAX_VER 0x0d - #define MT7601U_EEPROM_SIZE 256 - - #define MT7601U_DEFAULT_TX_POWER 6 -diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c -index f715eee3..e70dd952 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/main.c -+++ b/drivers/net/wireless/mediatek/mt7601u/main.c -@@ -334,11 +334,13 @@ static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, u32 value) - - static int - mt76_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct mt7601u_dev *dev = hw->priv; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv; - - WARN_ON(msta->wcid.idx > GROUP_WCID(0)); -diff --git a/drivers/net/wireless/mediatek/mt7601u/mcu.c b/drivers/net/wireless/mediatek/mt7601u/mcu.c -index fbb1986e..686b1b5d 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/mcu.c -+++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c -@@ -66,8 +66,10 @@ mt7601u_mcu_msg_alloc(struct mt7601u_dev *dev, const void *data, int len) - WARN_ON(len % 4); /* if length is not divisible by 4 we need to pad */ - - skb = alloc_skb(len + MT_DMA_HDR_LEN + 4, GFP_KERNEL); -- skb_reserve(skb, MT_DMA_HDR_LEN); -- memcpy(skb_put(skb, len), data, len); -+ if (skb) { -+ skb_reserve(skb, MT_DMA_HDR_LEN); -+ memcpy(skb_put(skb, len), data, len); -+ } - - return skb; - } -@@ -170,6 +172,8 @@ static int mt7601u_mcu_function_select(struct mt7601u_dev *dev, - }; - - skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg)); -+ if (!skb) -+ return -ENOMEM; - return mt7601u_mcu_msg_send(dev, skb, CMD_FUN_SET_OP, func == 5); - } - -@@ -205,6 +209,8 @@ mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val) - }; - - skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg)); -+ if (!skb) -+ return -ENOMEM; - return mt7601u_mcu_msg_send(dev, skb, CMD_CALIBRATION_OP, true); - } - -diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c -index aa498e0d..49f3e17c 100644 ---- a/drivers/net/wireless/mwifiex/11n_aggr.c -+++ b/drivers/net/wireless/mwifiex/11n_aggr.c -@@ -101,13 +101,6 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, - { - struct txpd *local_tx_pd; - struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); -- unsigned int pad; -- int headroom = (priv->adapter->iface_type == -- MWIFIEX_USB) ? 0 : INTF_HEADER_LEN; -- -- pad = ((void *)skb->data - sizeof(*local_tx_pd) - -- headroom - NULL) & (MWIFIEX_DMA_ALIGN_SZ - 1); -- skb_push(skb, pad); - - skb_push(skb, sizeof(*local_tx_pd)); - -@@ -121,12 +114,10 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, - local_tx_pd->bss_num = priv->bss_num; - local_tx_pd->bss_type = priv->bss_type; - /* Always zero as the data is followed by struct txpd */ -- local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd) + -- pad); -+ local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd)); - local_tx_pd->tx_pkt_type = cpu_to_le16(PKT_TYPE_AMSDU); - local_tx_pd->tx_pkt_length = cpu_to_le16(skb->len - -- sizeof(*local_tx_pd) - -- pad); -+ sizeof(*local_tx_pd)); - - if (tx_info->flags & MWIFIEX_BUF_FLAG_TDLS_PKT) - local_tx_pd->flags |= MWIFIEX_TXPD_FLAGS_TDLS_PACKET; -@@ -190,7 +181,11 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, - ra_list_flags); - return -1; - } -- skb_reserve(skb_aggr, MWIFIEX_MIN_DATA_HEADER_LEN); -+ -+ /* skb_aggr->data already 64 byte align, just reserve bus interface -+ * header and txpd. -+ */ -+ skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); - tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); - - memset(tx_info_aggr, 0, sizeof(*tx_info_aggr)); -diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c -index 4073116e..1e074eaf 100644 ---- a/drivers/net/wireless/mwifiex/cfg80211.c -+++ b/drivers/net/wireless/mwifiex/cfg80211.c -@@ -1150,6 +1150,12 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, - priv->adapter->curr_iface_comb.p2p_intf--; - priv->adapter->curr_iface_comb.sta_intf++; - dev->ieee80211_ptr->iftype = type; -+ if (mwifiex_deinit_priv_params(priv)) -+ return -1; -+ if (mwifiex_init_new_priv_params(priv, dev, type)) -+ return -1; -+ if (mwifiex_sta_init_cmd(priv, false, false)) -+ return -1; - break; - case NL80211_IFTYPE_ADHOC: - if (mwifiex_cfg80211_deinit_p2p(priv)) -@@ -2144,8 +2150,9 @@ done: - is_scanning_required = 1; - } else { - mwifiex_dbg(priv->adapter, MSG, -- "info: trying to associate to '%s' bssid %pM\n", -- (char *)req_ssid.ssid, bss->bssid); -+ "info: trying to associate to '%.*s' bssid %pM\n", -+ req_ssid.ssid_len, (char *)req_ssid.ssid, -+ bss->bssid); - memcpy(&priv->cfg_bssid, bss->bssid, ETH_ALEN); - break; - } -@@ -2202,8 +2209,8 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, - } - - mwifiex_dbg(adapter, INFO, -- "info: Trying to associate to %s and bssid %pM\n", -- (char *)sme->ssid, sme->bssid); -+ "info: Trying to associate to %.*s and bssid %pM\n", -+ (int)sme->ssid_len, (char *)sme->ssid, sme->bssid); - - ret = mwifiex_cfg80211_assoc(priv, sme->ssid_len, sme->ssid, sme->bssid, - priv->bss_mode, sme->channel, sme, 0); -@@ -2333,8 +2340,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, - } - - mwifiex_dbg(priv->adapter, MSG, -- "info: trying to join to %s and bssid %pM\n", -- (char *)params->ssid, params->bssid); -+ "info: trying to join to %.*s and bssid %pM\n", -+ params->ssid_len, (char *)params->ssid, params->bssid); - - mwifiex_set_ibss_params(priv, params); - -@@ -2838,8 +2845,10 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) - - mwifiex_stop_net_dev_queue(priv->netdev, adapter); - -- skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { -+ skb_unlink(skb, &priv->bypass_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - - if (netif_carrier_ok(priv->netdev)) - netif_carrier_off(priv->netdev); -@@ -3739,7 +3748,7 @@ int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter) - if (adapter->config_bands & BAND_A) - n_channels_a = mwifiex_band_5ghz.n_channels; - -- adapter->num_in_chan_stats = max_t(u32, n_channels_bg, n_channels_a); -+ adapter->num_in_chan_stats = n_channels_bg + n_channels_a; - adapter->chan_stats = vmalloc(sizeof(*adapter->chan_stats) * - adapter->num_in_chan_stats); - -diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c -index 3ddb8ec6..6dd331df 100644 ---- a/drivers/net/wireless/mwifiex/cfp.c -+++ b/drivers/net/wireless/mwifiex/cfp.c -@@ -533,5 +533,8 @@ u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv, - rate_index = (rx_rate > MWIFIEX_RATE_INDEX_OFDM0) ? - rx_rate - 1 : rx_rate; - -+ if (rate_index >= MWIFIEX_MAX_AC_RX_RATES) -+ rate_index = MWIFIEX_MAX_AC_RX_RATES - 1; -+ - return rate_index; - } -diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c -index 9824d8dd..45d97b64 100644 ---- a/drivers/net/wireless/mwifiex/debugfs.c -+++ b/drivers/net/wireless/mwifiex/debugfs.c -@@ -115,7 +115,8 @@ mwifiex_info_read(struct file *file, char __user *ubuf, - if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) { - p += sprintf(p, "multicast_count=\"%d\"\n", - netdev_mc_count(netdev)); -- p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); -+ p += sprintf(p, "essid=\"%.*s\"\n", info.ssid.ssid_len, -+ info.ssid.ssid); - p += sprintf(p, "bssid=\"%pM\"\n", info.bssid); - p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); - p += sprintf(p, "country_code = \"%s\"\n", info.country_code); -diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c -index 21192b6f..268e50ba 100644 ---- a/drivers/net/wireless/mwifiex/pcie.c -+++ b/drivers/net/wireless/mwifiex/pcie.c -@@ -947,6 +947,7 @@ static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter) - if (card && card->cmd_buf) { - mwifiex_unmap_pci_memory(adapter, card->cmd_buf, - PCI_DMA_TODEVICE); -+ dev_kfree_skb_any(card->cmd_buf); - } - return 0; - } -@@ -1513,6 +1514,11 @@ mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) - return -1; - - card->cmd_buf = skb; -+ /* -+ * Need to keep a reference, since core driver might free up this -+ * buffer before we've unmapped it. -+ */ -+ skb_get(skb); - - /* To send a command, the driver will: - 1. Write the 64bit physical address of the data buffer to -@@ -1610,6 +1616,7 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter) - if (card->cmd_buf) { - mwifiex_unmap_pci_memory(adapter, card->cmd_buf, - PCI_DMA_TODEVICE); -+ dev_kfree_skb_any(card->cmd_buf); - card->cmd_buf = NULL; - } - -diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c -index c20017ce..fb98f42c 100644 ---- a/drivers/net/wireless/mwifiex/scan.c -+++ b/drivers/net/wireless/mwifiex/scan.c -@@ -2170,6 +2170,12 @@ mwifiex_update_chan_statistics(struct mwifiex_private *priv, - sizeof(struct mwifiex_chan_stats); - - for (i = 0 ; i < num_chan; i++) { -+ if (adapter->survey_idx >= adapter->num_in_chan_stats) { -+ mwifiex_dbg(adapter, WARN, -+ "FW reported too many channel results (max %d)\n", -+ adapter->num_in_chan_stats); -+ return; -+ } - chan_stats.chan_num = fw_chan_stats->chan_num; - chan_stats.bandcfg = fw_chan_stats->bandcfg; - chan_stats.flags = fw_chan_stats->flags; -diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c -index d6c4f0f6..6cfa2969 100644 ---- a/drivers/net/wireless/mwifiex/sta_ioctl.c -+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c -@@ -1098,8 +1098,6 @@ int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp, - encrypt_key.is_rx_seq_valid = true; - } - } else { -- if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) -- return 0; - encrypt_key.key_disable = true; - if (mac_addr) - memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); -diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c -index e43aff93..1a1b1de8 100644 ---- a/drivers/net/wireless/mwifiex/usb.c -+++ b/drivers/net/wireless/mwifiex/usb.c -@@ -624,6 +624,9 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) - MWIFIEX_FUNC_SHUTDOWN); - } - -+ if (adapter->workqueue) -+ flush_workqueue(adapter->workqueue); -+ - mwifiex_usb_free(card); - - mwifiex_dbg(adapter, FATAL, -diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c -index 0cec8a64..eb5ffa5b 100644 ---- a/drivers/net/wireless/mwifiex/util.c -+++ b/drivers/net/wireless/mwifiex/util.c -@@ -702,12 +702,14 @@ void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr, - s8 nflr) - { - struct mwifiex_histogram_data *phist_data = priv->hist_data; -+ s8 nf = -nflr; -+ s8 rssi = snr - nflr; - - atomic_inc(&phist_data->num_samples); - atomic_inc(&phist_data->rx_rate[rx_rate]); -- atomic_inc(&phist_data->snr[snr]); -- atomic_inc(&phist_data->noise_flr[128 + nflr]); -- atomic_inc(&phist_data->sig_str[nflr - snr]); -+ atomic_inc(&phist_data->snr[snr + 128]); -+ atomic_inc(&phist_data->noise_flr[nf + 128]); -+ atomic_inc(&phist_data->sig_str[rssi + 128]); - } - - /* function to reset histogram data during init/reset */ -diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c -index acccd673..ed8b69d1 100644 ---- a/drivers/net/wireless/mwifiex/wmm.c -+++ b/drivers/net/wireless/mwifiex/wmm.c -@@ -501,8 +501,10 @@ mwifiex_wmm_del_pkts_in_ralist_node(struct mwifiex_private *priv, - struct mwifiex_adapter *adapter = priv->adapter; - struct sk_buff *skb, *tmp; - -- skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) -+ skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) { -+ skb_unlink(skb, &ra_list->skb_head); - mwifiex_write_data_complete(adapter, skb, 0, -1); -+ } - } - - /* -@@ -598,11 +600,15 @@ mwifiex_clean_txrx(struct mwifiex_private *priv) - priv->adapter->if_ops.clean_pcie_ring(priv->adapter); - spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); - -- skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) { -+ skb_unlink(skb, &priv->tdls_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - -- skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { -+ skb_unlink(skb, &priv->bypass_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - atomic_set(&priv->adapter->bypass_tx_pending, 0); - - idr_for_each(&priv->ack_status_frames, mwifiex_free_ack_frame, NULL); -diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c -index 30e3aaae..088429d0 100644 ---- a/drivers/net/wireless/mwl8k.c -+++ b/drivers/net/wireless/mwl8k.c -@@ -5421,11 +5421,13 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, - - static int - mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -- -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - int i, rc = 0; - struct mwl8k_priv *priv = hw->priv; - struct mwl8k_ampdu_stream *stream; -diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c -index 257a9ead..4ac6764f 100644 ---- a/drivers/net/wireless/p54/fwio.c -+++ b/drivers/net/wireless/p54/fwio.c -@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell) - - entry += sizeof(__le16); - chan->pa_points_per_curve = 8; -- memset(chan->curve_data, 0, sizeof(*chan->curve_data)); -+ memset(chan->curve_data, 0, sizeof(chan->curve_data)); - memcpy(chan->curve_data, entry, - sizeof(struct p54_pa_curve_data_sample) * - min((u8)8, curve_data->points_per_channel)); -diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c -index 0881ba85..c78abfc7 100644 ---- a/drivers/net/wireless/ray_cs.c -+++ b/drivers/net/wireless/ray_cs.c -@@ -247,7 +247,10 @@ static const UCHAR b4_default_startup_parms[] = { - 0x04, 0x08, /* Noise gain, limit offset */ - 0x28, 0x28, /* det rssi, med busy offsets */ - 7, /* det sync thresh */ -- 0, 2, 2 /* test mode, min, max */ -+ 0, 2, 2, /* test mode, min, max */ -+ 0, /* rx/tx delay */ -+ 0, 0, 0, 0, 0, 0, /* current BSS id */ -+ 0 /* hop set */ - }; - - /*===========================================================================*/ -@@ -598,7 +601,7 @@ static void init_startup_params(ray_dev_t *local) - * a_beacon_period = hops a_beacon_period = KuS - *//* 64ms = 010000 */ - if (local->fw_ver == 0x55) { -- memcpy((UCHAR *) &local->sparm.b4, b4_default_startup_parms, -+ memcpy(&local->sparm.b4, b4_default_startup_parms, - sizeof(struct b4_startup_params)); - /* Translate sane kus input values to old build 4/5 format */ - /* i = hop time in uS truncated to 3 bytes */ -diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -index b7f72f9c..b3691712 100644 ---- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -@@ -1454,6 +1454,7 @@ static int rtl8187_probe(struct usb_interface *intf, - goto err_free_dev; - } - mutex_init(&priv->io_mutex); -+ mutex_init(&priv->conf_mutex); - - SET_IEEE80211_DEV(dev, &intf->dev); - usb_set_intfdata(intf, dev); -@@ -1627,7 +1628,6 @@ static int rtl8187_probe(struct usb_interface *intf, - printk(KERN_ERR "rtl8187: Cannot register device\n"); - goto err_free_dmabuf; - } -- mutex_init(&priv->conf_mutex); - skb_queue_head_init(&priv->b_tx_status.queue); - - wiphy_info(dev->wiphy, "hwaddr %pM, %s V%d + %s, rfkill mask %d\n", -diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -index 6aed923a..7d820c39 100644 ---- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -@@ -5375,13 +5375,13 @@ static int rtl8xxxu_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - - static int - rtl8xxxu_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct rtl8xxxu_priv *priv = hw->priv; - struct device *dev = &priv->udev->dev; - u8 ampdu_factor, ampdu_density; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; - - switch (action) { - case IEEE80211_AMPDU_TX_START: -diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c -index 7a40d8df..5013d8c1 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/base.c -+++ b/drivers/net/wireless/realtek/rtlwifi/base.c -@@ -466,6 +466,11 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) - /* <2> work queue */ - rtlpriv->works.hw = hw; - rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); -+ if (unlikely(!rtlpriv->works.rtl_wq)) { -+ pr_err("Failed to allocate work queue\n"); -+ return; -+ } -+ - INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq, - (void *)rtl_watchdog_wq_callback); - INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq, -@@ -1303,12 +1308,13 @@ EXPORT_SYMBOL_GPL(rtl_action_proc); - - static void setup_arp_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc) - { -+ struct ieee80211_hw *hw = rtlpriv->hw; -+ - rtlpriv->ra.is_special_data = true; - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_special_packet_notify( - rtlpriv, 1); -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - ppsc->last_delaylps_stamp_jiffies = jiffies; - } - -@@ -1381,8 +1387,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, - - if (is_tx) { - rtlpriv->ra.is_special_data = true; -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - ppsc->last_delaylps_stamp_jiffies = jiffies; - } - -diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c -index c925a4df..8006f097 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/core.c -+++ b/drivers/net/wireless/realtek/rtlwifi/core.c -@@ -135,7 +135,6 @@ found_alt: - firmware->size); - rtlpriv->rtlhal.wowlan_fwsize = firmware->size; - } -- rtlpriv->rtlhal.fwsize = firmware->size; - release_firmware(firmware); - } - -@@ -1153,10 +1152,8 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, - } else { - mstatus = RT_MEDIA_DISCONNECT; - -- if (mac->link_state == MAC80211_LINKED) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ if (mac->link_state == MAC80211_LINKED) -+ rtl_lps_leave(hw); - if (ppsc->p2p_ps_info.p2p_ps_mode > P2P_PS_NONE) - rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE); - mac->link_state = MAC80211_NOLINK; -@@ -1371,11 +1368,13 @@ static void rtl_op_sta_notify(struct ieee80211_hw *hw, - - static int rtl_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - switch (action) { - case IEEE80211_AMPDU_TX_START: -@@ -1432,8 +1431,7 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, - } - - if (mac->link_state == MAC80211_LINKED) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - mac->link_state = MAC80211_LINKED_SCANNING; - } else { - rtl_ips_nic_on(hw); -diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c -index 5b404804..b51815ec 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/pci.c -+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c -@@ -664,11 +664,9 @@ tx_status_ok: - } - - if (((rtlpriv->link_info.num_rx_inperiod + -- rtlpriv->link_info.num_tx_inperiod) > 8) || -- (rtlpriv->link_info.num_rx_inperiod > 2)) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ rtlpriv->link_info.num_tx_inperiod) > 8) || -+ (rtlpriv->link_info.num_rx_inperiod > 2)) -+ rtl_lps_leave(hw); - } - - static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, -@@ -919,10 +917,8 @@ new_trx_end: - } - if (((rtlpriv->link_info.num_rx_inperiod + - rtlpriv->link_info.num_tx_inperiod) > 8) || -- (rtlpriv->link_info.num_rx_inperiod > 2)) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ (rtlpriv->link_info.num_rx_inperiod > 2)) -+ rtl_lps_leave(hw); - skb = new_skb; - no_new: - if (rtlpriv->use_new_trx_flow) { -@@ -1576,7 +1572,14 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) - dev_kfree_skb_irq(skb); - ring->idx = (ring->idx + 1) % ring->entries; - } -+ -+ if (rtlpriv->use_new_trx_flow) { -+ rtlpci->tx_ring[i].cur_tx_rp = 0; -+ rtlpci->tx_ring[i].cur_tx_wp = 0; -+ } -+ - ring->idx = 0; -+ ring->entries = rtlpci->txringcount[i]; - } - } - spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); -@@ -2273,7 +2276,7 @@ int rtl_pci_probe(struct pci_dev *pdev, - /* find adapter */ - if (!_rtl_pci_find_adapter(pdev, hw)) { - err = -ENODEV; -- goto fail3; -+ goto fail2; - } - - /* Init IO handler */ -@@ -2343,10 +2346,10 @@ fail3: - pci_set_drvdata(pdev, NULL); - rtl_deinit_core(hw); - -+fail2: - if (rtlpriv->io.pci_mem_start != 0) - pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start); - --fail2: - pci_release_regions(pdev); - complete(&rtlpriv->firmware_loading_complete); - -diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h -index 5da67039..672f81ea 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/pci.h -+++ b/drivers/net/wireless/realtek/rtlwifi/pci.h -@@ -275,10 +275,10 @@ struct mp_adapter { - }; - - struct rtl_pci_priv { -+ struct bt_coexist_info bt_coexist; -+ struct rtl_led_ctl ledctl; - struct rtl_pci dev; - struct mp_adapter ndis_adapter; -- struct rtl_led_ctl ledctl; -- struct bt_coexist_info bt_coexist; - }; - - #define rtl_pcipriv(hw) (((struct rtl_pci_priv *)(rtl_priv(hw))->priv)) -diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c -index b69321d4..626ff300 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/ps.c -+++ b/drivers/net/wireless/realtek/rtlwifi/ps.c -@@ -414,8 +414,8 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) - } - } - --/*Enter the leisure power save mode.*/ --void rtl_lps_enter(struct ieee80211_hw *hw) -+/* Interrupt safe routine to enter the leisure power save mode.*/ -+static void rtl_lps_enter_core(struct ieee80211_hw *hw) - { - struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); - struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); -@@ -455,10 +455,9 @@ void rtl_lps_enter(struct ieee80211_hw *hw) - - spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag); - } --EXPORT_SYMBOL(rtl_lps_enter); - --/*Leave the leisure power save mode.*/ --void rtl_lps_leave(struct ieee80211_hw *hw) -+/* Interrupt safe routine to leave the leisure power save mode.*/ -+static void rtl_lps_leave_core(struct ieee80211_hw *hw) - { - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); -@@ -488,7 +487,6 @@ void rtl_lps_leave(struct ieee80211_hw *hw) - } - spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag); - } --EXPORT_SYMBOL(rtl_lps_leave); - - /* For sw LPS*/ - void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) -@@ -681,12 +679,34 @@ void rtl_lps_change_work_callback(struct work_struct *work) - struct rtl_priv *rtlpriv = rtl_priv(hw); - - if (rtlpriv->enter_ps) -- rtl_lps_enter(hw); -+ rtl_lps_enter_core(hw); - else -- rtl_lps_leave(hw); -+ rtl_lps_leave_core(hw); - } - EXPORT_SYMBOL_GPL(rtl_lps_change_work_callback); - -+void rtl_lps_enter(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ -+ if (!in_interrupt()) -+ return rtl_lps_enter_core(hw); -+ rtlpriv->enter_ps = true; -+ schedule_work(&rtlpriv->works.lps_change_work); -+} -+EXPORT_SYMBOL_GPL(rtl_lps_enter); -+ -+void rtl_lps_leave(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ -+ if (!in_interrupt()) -+ return rtl_lps_leave_core(hw); -+ rtlpriv->enter_ps = false; -+ schedule_work(&rtlpriv->works.lps_change_work); -+} -+EXPORT_SYMBOL_GPL(rtl_lps_leave); -+ - void rtl_swlps_wq_callback(void *data) - { - struct rtl_works *rtlworks = container_of_dwork_rtl(data, -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -index 5624ade9..c2a156a8 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -@@ -304,9 +304,6 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, - writeVal = 0x00000000; - if (rtlpriv->dm.dynamic_txhighpower_lvl == TXHIGHPWRLEVEL_BT1) - writeVal = writeVal - 0x06060606; -- else if (rtlpriv->dm.dynamic_txhighpower_lvl == -- TXHIGHPWRLEVEL_BT2) -- writeVal = writeVal; - *(p_outwriteval + rf) = writeVal; - } - } -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -index 0708eedd..1c69e814 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -@@ -664,7 +664,7 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); - struct sk_buff *skb = NULL; -- -+ bool rtstatus; - u32 totalpacketlen; - u8 u1rsvdpageloc[5] = { 0 }; - bool b_dlok = false; -@@ -727,7 +727,9 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) - memcpy((u8 *)skb_put(skb, totalpacketlen), - &reserved_page_packet, totalpacketlen); - -- b_dlok = true; -+ rtstatus = rtl_cmd_send_packet(hw, skb); -+ if (rtstatus) -+ b_dlok = true; - - if (b_dlok) { - RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD , -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -index 5f14308e..b1601441 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -@@ -1003,7 +1003,7 @@ static void _rtl92ee_hw_configure(struct ieee80211_hw *hw) - rtl_write_word(rtlpriv, REG_SIFS_TRX, 0x100a); - - /* Note Data sheet don't define */ -- rtl_write_word(rtlpriv, 0x4C7, 0x80); -+ rtl_write_byte(rtlpriv, 0x4C7, 0x80); - - rtl_write_byte(rtlpriv, REG_RX_PKT_LIMIT, 0x20); - -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -index 5a3df919..89515f02 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -@@ -1123,7 +1123,8 @@ static void _rtl8723be_enable_aspm_back_door(struct ieee80211_hw *hw) - - /* Configuration Space offset 0x70f BIT7 is used to control L0S */ - tmp8 = _rtl8723be_dbi_read(rtlpriv, 0x70f); -- _rtl8723be_dbi_write(rtlpriv, 0x70f, tmp8 | BIT(7)); -+ _rtl8723be_dbi_write(rtlpriv, 0x70f, tmp8 | BIT(7) | -+ ASPM_L1_LATENCY << 3); - - /* Configuration Space offset 0x719 Bit3 is for L1 - * BIT4 is for clock request -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -index b57cfd96..7b13962e 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -@@ -2488,9 +2488,9 @@ void rtl8821ae_dm_txpower_tracking_callback_thermalmeter( - for (p = RF90_PATH_A; p < MAX_PATH_NUM_8821A; p++) - rtldm->swing_idx_ofdm_base[p] = rtldm->swing_idx_ofdm[p]; - -- RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, -- "pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n", -- rtldm->thermalvalue, thermal_value); -+ RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, -+ "pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n", -+ rtldm->thermalvalue, thermal_value); - /*Record last Power Tracking Thermal Value*/ - rtldm->thermalvalue = thermal_value; - } -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -index bbb789f8..348ed1b0 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -@@ -1127,7 +1127,7 @@ static u8 _rtl8821ae_dbi_read(struct rtl_priv *rtlpriv, u16 addr) - } - if (0 == tmp) { - read_addr = REG_DBI_RDATA + addr % 4; -- ret = rtl_read_word(rtlpriv, read_addr); -+ ret = rtl_read_byte(rtlpriv, read_addr); - } - return ret; - } -@@ -1169,7 +1169,8 @@ static void _rtl8821ae_enable_aspm_back_door(struct ieee80211_hw *hw) - } - - tmp = _rtl8821ae_dbi_read(rtlpriv, 0x70f); -- _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7)); -+ _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7) | -+ ASPM_L1_LATENCY << 3); - - tmp = _rtl8821ae_dbi_read(rtlpriv, 0x719); - _rtl8821ae_dbi_write(rtlpriv, 0x719, tmp | BIT(3) | BIT(4)); -@@ -1377,6 +1378,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) - - ppsc->wakeup_reason = 0; - -+ do_gettimeofday(&ts); - rtlhal->last_suspend_sec = ts.tv_sec; - - switch (fw_reason) { -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -index 9b4d8a63..4b354918 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -@@ -359,6 +359,107 @@ bool rtl8821ae_phy_rf_config(struct ieee80211_hw *hw) - return rtl8821ae_phy_rf6052_config(hw); - } - -+static void _rtl8812ae_phy_set_rfe_reg_24g(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); -+ u8 tmp; -+ -+ switch (rtlhal->rfe_type) { -+ case 3: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x54337770); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x54337770); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, 0x900, 0x00000303, 0x1); -+ break; -+ case 4: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x001); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x001); -+ break; -+ case 5: -+ rtl_write_byte(rtlpriv, RA_RFE_PINMUX + 2, 0x77); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ tmp = rtl_read_byte(rtlpriv, RA_RFE_INV + 3); -+ rtl_write_byte(rtlpriv, RA_RFE_INV + 3, tmp & ~0x1); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ case 1: -+ if (rtlpriv->btcoexist.bt_coexistence) { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, 0xffffff, 0x777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, 0x33f00000, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ } -+ case 0: -+ case 2: -+ default: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ } -+} -+ -+static void _rtl8812ae_phy_set_rfe_reg_5g(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); -+ u8 tmp; -+ -+ switch (rtlhal->rfe_type) { -+ case 0: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ case 1: -+ if (rtlpriv->btcoexist.bt_coexistence) { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, 0xffffff, 0x337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, 0x33f00000, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ } else { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ } -+ break; -+ case 3: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x54337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x54337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, 0x900, 0x00000303, 0x1); -+ break; -+ case 5: -+ rtl_write_byte(rtlpriv, RA_RFE_PINMUX + 2, 0x33); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ tmp = rtl_read_byte(rtlpriv, RA_RFE_INV + 3); -+ rtl_write_byte(rtlpriv, RA_RFE_INV + 3, tmp | 0x1); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ case 2: -+ case 4: -+ default: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ } -+} -+ - u32 phy_get_tx_swing_8812A(struct ieee80211_hw *hw, u8 band, - u8 rf_path) - { -@@ -553,14 +654,9 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) - /* 0x82C[1:0] = 2b'00 */ - rtl_set_bbreg(hw, 0x82c, 0x3, 0); - } -- if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { -- rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -- 0x77777777); -- rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -- 0x77777777); -- rtl_set_bbreg(hw, RA_RFE_INV, 0x3ff00000, 0x000); -- rtl_set_bbreg(hw, RB_RFE_INV, 0x3ff00000, 0x000); -- } -+ -+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) -+ _rtl8812ae_phy_set_rfe_reg_24g(hw); - - rtl_set_bbreg(hw, RTXPATH, 0xf0, 0x1); - rtl_set_bbreg(hw, RCCK_RX, 0x0f000000, 0x1); -@@ -615,14 +711,8 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) - /* 0x82C[1:0] = 2'b00 */ - rtl_set_bbreg(hw, 0x82c, 0x3, 1); - -- if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { -- rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -- 0x77337777); -- rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -- 0x77337777); -- rtl_set_bbreg(hw, RA_RFE_INV, 0x3ff00000, 0x010); -- rtl_set_bbreg(hw, RB_RFE_INV, 0x3ff00000, 0x010); -- } -+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) -+ _rtl8812ae_phy_set_rfe_reg_5g(hw); - - rtl_set_bbreg(hw, RTXPATH, 0xf0, 0); - rtl_set_bbreg(hw, RCCK_RX, 0x0f000000, 0xf); -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -index 1d6110f9..ed69dbe1 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -@@ -2424,6 +2424,7 @@ - #define BMASKH4BITS 0xf0000000 - #define BMASKOFDM_D 0xffc00000 - #define BMASKCCK 0x3f3f3f3f -+#define BMASKRFEINV 0x3ff00000 - - #define BRFREGOFFSETMASK 0xfffff - -diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c -index aac1ed3f..ad8390d2 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/usb.c -+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c -@@ -834,12 +834,30 @@ static void rtl_usb_stop(struct ieee80211_hw *hw) - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); - struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); -+ struct urb *urb; - - /* should after adapter start and interrupt enable. */ - set_hal_stop(rtlhal); - cancel_work_sync(&rtlpriv->works.fill_h2c_cmd); - /* Enable software */ - SET_USB_STOP(rtlusb); -+ -+ /* free pre-allocated URBs from rtl_usb_start() */ -+ usb_kill_anchored_urbs(&rtlusb->rx_submitted); -+ -+ tasklet_kill(&rtlusb->rx_work_tasklet); -+ cancel_work_sync(&rtlpriv->works.lps_change_work); -+ -+ flush_workqueue(rtlpriv->works.rtl_wq); -+ -+ skb_queue_purge(&rtlusb->rx_queue); -+ -+ while ((urb = usb_get_from_anchor(&rtlusb->rx_cleanup_urbs))) { -+ usb_free_coherent(urb->dev, urb->transfer_buffer_length, -+ urb->transfer_buffer, urb->transfer_dma); -+ usb_free_urb(urb); -+ } -+ - rtlpriv->cfg->ops->hw_disable(hw); - } - -@@ -1073,6 +1091,7 @@ int rtl_usb_probe(struct usb_interface *intf, - return -ENOMEM; - } - rtlpriv = hw->priv; -+ rtlpriv->hw = hw; - rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32), - GFP_KERNEL); - if (!rtlpriv->usb_data) -diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h b/drivers/net/wireless/realtek/rtlwifi/usb.h -index 685273ca..441c4412 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/usb.h -+++ b/drivers/net/wireless/realtek/rtlwifi/usb.h -@@ -150,8 +150,9 @@ struct rtl_usb { - }; - - struct rtl_usb_priv { -- struct rtl_usb dev; -+ struct bt_coexist_info bt_coexist; - struct rtl_led_ctl ledctl; -+ struct rtl_usb dev; - }; - - #define rtl_usbpriv(hw) (((struct rtl_usb_priv *)(rtl_priv(hw))->priv)) -diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h -index b6faf624..d676d055 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/wifi.h -+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h -@@ -99,6 +99,7 @@ - #define RTL_USB_MAX_RX_COUNT 100 - #define QBSS_LOAD_SIZE 5 - #define MAX_WMMELE_LENGTH 64 -+#define ASPM_L1_LATENCY 7 - - #define TOTAL_CAM_ENTRY 32 - -diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c -index a13d1f2b..c76e0cfb 100644 ---- a/drivers/net/wireless/rndis_wlan.c -+++ b/drivers/net/wireless/rndis_wlan.c -@@ -2919,6 +2919,8 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev, - - while (buflen >= sizeof(*auth_req)) { - auth_req = (void *)buf; -+ if (buflen < le32_to_cpu(auth_req->length)) -+ return; - type = "unknown"; - flags = le32_to_cpu(auth_req->flags); - pairwise_error = false; -@@ -3425,6 +3427,10 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) - - /* because rndis_command() sleeps we need to use workqueue */ - priv->workqueue = create_singlethread_workqueue("rndis_wlan"); -+ if (!priv->workqueue) { -+ wiphy_free(wiphy); -+ return -ENOMEM; -+ } - INIT_WORK(&priv->work, rndis_wlan_worker); - INIT_DELAYED_WORK(&priv->dev_poller_work, rndis_device_poller); - INIT_DELAYED_WORK(&priv->scan_work, rndis_get_scan_results); -diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c -index b5bcc933..4df992de 100644 ---- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c -+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c -@@ -659,29 +659,24 @@ static int rsi_mac80211_set_key(struct ieee80211_hw *hw, - * informs the f/w regarding this. - * @hw: Pointer to the ieee80211_hw structure. - * @vif: Pointer to the ieee80211_vif structure. -- * @action: ieee80211_ampdu_mlme_action enum. -- * @sta: Pointer to the ieee80211_sta structure. -- * @tid: Traffic identifier. -- * @ssn: Pointer to ssn value. -- * @buf_size: Buffer size (for kernel version > 2.6.38). -- * @amsdu: is AMSDU in AMPDU allowed -+ * @params: Pointer to A-MPDU action parameters - * - * Return: status: 0 on success, negative error code on failure. - */ - static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- unsigned short tid, -- unsigned short *ssn, -- unsigned char buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - int status = -EOPNOTSUPP; - struct rsi_hw *adapter = hw->priv; - struct rsi_common *common = adapter->priv; - u16 seq_no = 0; - u8 ii = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - - for (ii = 0; ii < RSI_MAX_VIFS; ii++) { - if (vif == adapter->vifs[ii]) -diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c -index 84288582..fc895b46 100644 ---- a/drivers/net/wireless/rsi/rsi_91x_sdio.c -+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c -@@ -155,7 +155,6 @@ static void rsi_reset_card(struct sdio_func *pfunction) - int err; - struct mmc_card *card = pfunction->card; - struct mmc_host *host = card->host; -- s32 bit = (fls(host->ocr_avail) - 1); - u8 cmd52_resp; - u32 clock, resp, i; - u16 rca; -@@ -175,7 +174,6 @@ static void rsi_reset_card(struct sdio_func *pfunction) - msleep(20); - - /* Initialize the SDIO card */ -- 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; -diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h -index d3fbe33d..a13f08fd 100644 ---- a/drivers/net/wireless/rsi/rsi_common.h -+++ b/drivers/net/wireless/rsi/rsi_common.h -@@ -75,7 +75,6 @@ static inline int rsi_kill_thread(struct rsi_thread *handle) - atomic_inc(&handle->thread_done); - rsi_set_event(&handle->event); - -- wait_for_completion(&handle->completion); - return kthread_stop(handle->task); - } - -diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c -index 9733b31a..69c1c096 100644 ---- a/drivers/net/wireless/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/rt2x00/rt2800lib.c -@@ -7935,10 +7935,11 @@ u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - EXPORT_SYMBOL_GPL(rt2800_get_tsf); - - int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - struct rt2x00_sta *sta_priv = (struct rt2x00_sta *)sta->drv_priv; - int ret = 0; - -diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h -index 440790b9..83f1a44f 100644 ---- a/drivers/net/wireless/rt2x00/rt2800lib.h -+++ b/drivers/net/wireless/rt2x00/rt2800lib.h -@@ -218,9 +218,7 @@ int rt2800_conf_tx(struct ieee80211_hw *hw, - const struct ieee80211_tx_queue_params *params); - u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif); - int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int rt2800_get_survey(struct ieee80211_hw *hw, int idx, - struct survey_info *survey); - void rt2800_disable_wpdma(struct rt2x00_dev *rt2x00dev); -diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c -index cd477795..869411f5 100644 ---- a/drivers/net/wireless/ti/wl1251/main.c -+++ b/drivers/net/wireless/ti/wl1251/main.c -@@ -1196,8 +1196,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, - WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS); - - enable = bss_conf->arp_addr_cnt == 1 && bss_conf->assoc; -- wl1251_acx_arp_ip_filter(wl, enable, addr); -- -+ ret = wl1251_acx_arp_ip_filter(wl, enable, addr); - if (ret < 0) - goto out_sleep; - } -@@ -1567,6 +1566,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) - - wl->state = WL1251_STATE_OFF; - mutex_init(&wl->mutex); -+ spin_lock_init(&wl->wl_lock); - - wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE; - wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE; -diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c -index 09c7e098..085ef5c8 100644 ---- a/drivers/net/wireless/ti/wl18xx/event.c -+++ b/drivers/net/wireless/ti/wl18xx/event.c -@@ -206,5 +206,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl) - mbox->sc_pwd_len, - mbox->sc_pwd); - -+ if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) { -+ struct wl12xx_vif *wlvif; -+ struct ieee80211_vif *vif; -+ struct ieee80211_sta *sta; -+ u8 link_id = mbox->rx_ba_link_id; -+ u8 win_size = mbox->rx_ba_win_size; -+ const u8 *addr; -+ -+ wlvif = wl->links[link_id].wlvif; -+ vif = wl12xx_wlvif_to_vif(wlvif); -+ -+ /* Update RX aggregation window size and call -+ * MAC routine to stop active RX aggregations for this link -+ */ -+ if (wlvif->bss_type != BSS_TYPE_AP_BSS) -+ addr = vif->bss_conf.bssid; -+ else -+ addr = wl->links[link_id].addr; -+ -+ sta = ieee80211_find_sta(vif, addr); -+ if (sta) { -+ sta->max_rx_aggregation_subframes = win_size; -+ ieee80211_stop_rx_ba_session(vif, -+ wl->links[link_id].ba_bitmap, -+ addr); -+ } -+ } -+ - return 0; - } -diff --git a/drivers/net/wireless/ti/wl18xx/event.h b/drivers/net/wireless/ti/wl18xx/event.h -index f3d4f133..9495fadc 100644 ---- a/drivers/net/wireless/ti/wl18xx/event.h -+++ b/drivers/net/wireless/ti/wl18xx/event.h -@@ -38,6 +38,7 @@ enum { - REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18), - DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19), - PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20), -+ RX_BA_WIN_SIZE_CHANGE_EVENT_ID = BIT(21), - SMART_CONFIG_SYNC_EVENT_ID = BIT(22), - SMART_CONFIG_DECODE_EVENT_ID = BIT(23), - TIME_SYNC_EVENT_ID = BIT(24), -diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c -index 50cce420..47f355e9 100644 ---- a/drivers/net/wireless/ti/wl18xx/main.c -+++ b/drivers/net/wireless/ti/wl18xx/main.c -@@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl) - DFS_CHANNELS_CONFIG_COMPLETE_EVENT | - SMART_CONFIG_SYNC_EVENT_ID | - SMART_CONFIG_DECODE_EVENT_ID | -- TIME_SYNC_EVENT_ID; -+ TIME_SYNC_EVENT_ID | -+ RX_BA_WIN_SIZE_CHANGE_EVENT_ID; - - wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID; - -diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c -index f28fa3b5..0646c9b6 100644 ---- a/drivers/net/wireless/ti/wlcore/acx.c -+++ b/drivers/net/wireless/ti/wlcore/acx.c -@@ -1419,7 +1419,8 @@ out: - - /* setup BA session receiver setting in the FW. */ - int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, -- u16 ssn, bool enable, u8 peer_hlid) -+ u16 ssn, bool enable, u8 peer_hlid, -+ u8 win_size) - { - struct wl1271_acx_ba_receiver_setup *acx; - int ret; -@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, - acx->hlid = peer_hlid; - acx->tid = tid_index; - acx->enable = enable; -- acx->win_size = wl->conf.ht.rx_ba_win_size; -+ acx->win_size = win_size; - acx->ssn = ssn; - - ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, -diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h -index 954d57ec..524aea49 100644 ---- a/drivers/net/wireless/ti/wlcore/acx.h -+++ b/drivers/net/wireless/ti/wlcore/acx.h -@@ -1112,7 +1112,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl, - int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, - struct wl12xx_vif *wlvif); - int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, -- u16 ssn, bool enable, u8 peer_hlid); -+ u16 ssn, bool enable, u8 peer_hlid, -+ u8 win_size); - int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, - u64 *mactime); - int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, -diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c -index 9fd3c6af..e92f2639 100644 ---- a/drivers/net/wireless/ti/wlcore/init.c -+++ b/drivers/net/wireless/ti/wlcore/init.c -@@ -549,11 +549,6 @@ static int wl12xx_init_ap_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) - { - int ret; - -- /* Disable filtering */ -- ret = wl1271_acx_group_address_tbl(wl, wlvif, false, NULL, 0); -- if (ret < 0) -- return ret; -- - ret = wl1271_acx_ap_max_tx_retry(wl, wlvif); - if (ret < 0) - return ret; -diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c -index ec7f6af3..cc10b726 100644 ---- a/drivers/net/wireless/ti/wlcore/main.c -+++ b/drivers/net/wireless/ti/wlcore/main.c -@@ -1123,8 +1123,11 @@ static int wl12xx_chip_wakeup(struct wl1271 *wl, bool plt) - goto out; - - ret = wl12xx_fetch_firmware(wl, plt); -- if (ret < 0) -- goto out; -+ if (ret < 0) { -+ kfree(wl->fw_status); -+ kfree(wl->raw_fw_status); -+ kfree(wl->tx_res_if); -+ } - - out: - return ret; -@@ -5261,14 +5264,16 @@ out: - - static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct wl1271 *wl = hw->priv; - struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); - int ret; - u8 hlid, *ba_bitmap; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - wl1271_debug(DEBUG_MAC80211, "mac80211 ampdu action %d tid %d", action, - tid); -@@ -5326,7 +5331,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - } - - ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true, -- hlid); -+ hlid, -+ params->buf_size); -+ - if (!ret) { - *ba_bitmap |= BIT(tid); - wl->ba_rx_session_count++; -@@ -5347,7 +5354,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - } - - ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false, -- hlid); -+ hlid, 0); - if (!ret) { - *ba_bitmap &= ~BIT(tid); - wl->ba_rx_session_count--; -diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c -index c172da56..e4a8280c 100644 ---- a/drivers/net/wireless/ti/wlcore/sdio.c -+++ b/drivers/net/wireless/ti/wlcore/sdio.c -@@ -388,6 +388,11 @@ static int wl1271_suspend(struct device *dev) - mmc_pm_flag_t sdio_flags; - int ret = 0; - -+ if (!wl) { -+ dev_err(dev, "no wilink module was probed\n"); -+ goto out; -+ } -+ - dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n", - wl->wow_enabled); - -diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c -index 44f059f7..9ebe00ea 100644 ---- a/drivers/net/wireless/ti/wlcore/spi.c -+++ b/drivers/net/wireless/ti/wlcore/spi.c -@@ -71,7 +71,7 @@ - * only support SPI for 12xx - this code should be reworked when 18xx - * support is introduced - */ --#define SPI_AGGR_BUFFER_SIZE (4 * PAGE_SIZE) -+#define SPI_AGGR_BUFFER_SIZE (4 * SZ_4K) - - /* Maximum number of SPI write chunks */ - #define WSPI_MAX_NUM_OF_CHUNKS \ -diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c -index 3cdb40fe..f5cedbbc 100644 ---- a/drivers/staging/rtl8188eu/core/rtw_ap.c -+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c -@@ -894,7 +894,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) - return _FAIL; - - -- if (len > MAX_IE_SZ) -+ if (len < 0 || len > MAX_IE_SZ) - return _FAIL; - - pbss_network->IELength = len; -diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c -index 110b8c0b..0f2fe34e 100644 ---- a/drivers/staging/rtl8188eu/core/rtw_recv.c -+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c -@@ -1405,6 +1405,9 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) - ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); - } - -+ if (!ptr) -+ return _FAIL; -+ - memcpy(ptr, pattrib->dst, ETH_ALEN); - memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN); - -diff --git a/drivers/staging/rtl8188eu/include/rtw_debug.h b/drivers/staging/rtl8188eu/include/rtw_debug.h -index 971bf457..e75a3863 100644 ---- a/drivers/staging/rtl8188eu/include/rtw_debug.h -+++ b/drivers/staging/rtl8188eu/include/rtw_debug.h -@@ -75,7 +75,7 @@ extern u32 GlobalDebugLevel; - #define DBG_88E_LEVEL(_level, fmt, arg...) \ - do { \ - if (_level <= GlobalDebugLevel) \ -- pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg); \ -+ pr_info(DRIVER_PREFIX fmt, ##arg); \ - } while (0) - - #define DBG_88E(...) \ -diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -index a076ede5..ec90f278 100644 ---- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -@@ -1399,19 +1399,13 @@ static int rtw_wx_get_essid(struct net_device *dev, - if ((check_fwstate(pmlmepriv, _FW_LINKED)) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { - len = pcur_bss->Ssid.SsidLength; -- -- wrqu->essid.length = len; -- - memcpy(extra, pcur_bss->Ssid.Ssid, len); -- -- wrqu->essid.flags = 1; - } else { -- ret = -1; -- goto exit; -+ len = 0; -+ *extra = 0; - } -- --exit: -- -+ wrqu->essid.length = len; -+ wrqu->essid.flags = 1; - - return ret; - } -diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c -index 82a7c27c..951f2226 100644 ---- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c -+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c -@@ -47,7 +47,10 @@ static struct usb_device_id rtw_usb_id_tbl[] = { - {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ - {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ - {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ -+ {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ -+ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ - {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ -+ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ - {} /* Terminating entry */ - }; - -diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -index e9c4f973..7a8ceb96 100644 ---- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -@@ -97,8 +97,9 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) - - switch (variable) { - case HW_VAR_BSSID: -- rtl92e_writel(dev, BSSIDR, ((u32 *)(val))[0]); -- rtl92e_writew(dev, BSSIDR+2, ((u16 *)(val+2))[0]); -+ /* BSSIDR 2 byte alignment */ -+ rtl92e_writew(dev, BSSIDR, *(u16 *)val); -+ rtl92e_writel(dev, BSSIDR + 2, *(u32 *)(val + 2)); - break; - - case HW_VAR_MEDIA_STATUS: -@@ -626,7 +627,7 @@ void rtl92e_get_eeprom_size(struct net_device *dev) - struct r8192_priv *priv = rtllib_priv(dev); - - RT_TRACE(COMP_INIT, "===========>%s()\n", __func__); -- curCR = rtl92e_readl(dev, EPROM_CMD); -+ curCR = rtl92e_readw(dev, EPROM_CMD); - RT_TRACE(COMP_INIT, "read from Reg Cmd9346CR(%x):%x\n", EPROM_CMD, - curCR); - priv->epromtype = (curCR & EPROM_CMD_9356SEL) ? EEPROM_93C56 : -@@ -963,8 +964,8 @@ static void _rtl92e_net_update(struct net_device *dev) - rtl92e_config_rate(dev, &rate_config); - priv->dot11CurrentPreambleMode = PREAMBLE_AUTO; - priv->basic_rate = rate_config &= 0x15f; -- rtl92e_writel(dev, BSSIDR, ((u32 *)net->bssid)[0]); -- rtl92e_writew(dev, BSSIDR+4, ((u16 *)net->bssid)[2]); -+ rtl92e_writew(dev, BSSIDR, *(u16 *)net->bssid); -+ rtl92e_writel(dev, BSSIDR + 2, *(u32 *)(net->bssid + 2)); - - if (priv->rtllib->iw_mode == IW_MODE_ADHOC) { - rtl92e_writew(dev, ATIMWND, 2); -@@ -1184,8 +1185,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - struct cb_desc *cb_desc, struct sk_buff *skb) - { - struct r8192_priv *priv = rtllib_priv(dev); -- dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, -- PCI_DMA_TODEVICE); -+ dma_addr_t mapping; - struct tx_fwinfo_8190pci *pTxFwInfo = NULL; - - pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data; -@@ -1196,8 +1196,6 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - pTxFwInfo->Short = _rtl92e_query_is_short(pTxFwInfo->TxHT, - pTxFwInfo->TxRate, cb_desc); - -- if (pci_dma_mapping_error(priv->pdev, mapping)) -- netdev_err(dev, "%s(): DMA Mapping error\n", __func__); - if (cb_desc->bAMPDUEnable) { - pTxFwInfo->AllowAggregation = 1; - pTxFwInfo->RxMF = cb_desc->ampdu_factor; -@@ -1232,6 +1230,14 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - } - - memset((u8 *)pdesc, 0, 12); -+ -+ mapping = pci_map_single(priv->pdev, skb->data, skb->len, -+ PCI_DMA_TODEVICE); -+ if (pci_dma_mapping_error(priv->pdev, mapping)) { -+ netdev_err(dev, "%s(): DMA Mapping error\n", __func__); -+ return; -+ } -+ - pdesc->LINIP = 0; - pdesc->CmdInit = 1; - pdesc->Offset = sizeof(struct tx_fwinfo_8190pci) + 8; -diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c -index e06864f6..0f6bc6b8 100644 ---- a/drivers/staging/rtl8192u/r8192U_core.c -+++ b/drivers/staging/rtl8192u/r8192U_core.c -@@ -1749,6 +1749,8 @@ static short rtl8192_usb_initendpoints(struct net_device *dev) - - priv->rx_urb[16] = usb_alloc_urb(0, GFP_KERNEL); - priv->oldaddr = kmalloc(16, GFP_KERNEL); -+ if (!priv->oldaddr) -+ return -ENOMEM; - oldaddr = priv->oldaddr; - align = ((long)oldaddr) & 3; - if (align) { -diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h -index d374824c..7b16c05b 100644 ---- a/drivers/staging/rtl8712/ieee80211.h -+++ b/drivers/staging/rtl8712/ieee80211.h -@@ -143,52 +143,52 @@ struct ieee_ibss_seq { - }; - - struct ieee80211_hdr { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -+ __le16 seq_ctl; - u8 addr4[ETH_ALEN]; --} __packed; -+} __packed __aligned(2); - - struct ieee80211_hdr_3addr { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; --} __packed; -+ __le16 seq_ctl; -+} __packed __aligned(2); - - - struct ieee80211_hdr_qos { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -+ __le16 seq_ctl; - u8 addr4[ETH_ALEN]; -- u16 qc; --} __packed; -+ __le16 qc; -+} __packed __aligned(2); - - struct ieee80211_hdr_3addr_qos { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -- u16 qc; -+ __le16 seq_ctl; -+ __le16 qc; - } __packed; - - struct eapol { - u8 snap[6]; -- u16 ethertype; -+ __be16 ethertype; - u8 version; - u8 type; -- u16 length; -+ __le16 length; - } __packed; - - -@@ -528,13 +528,13 @@ struct ieee80211_security { - */ - - struct ieee80211_header_data { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[6]; - u8 addr2[6]; - u8 addr3[6]; -- u16 seq_ctrl; --}; -+ __le16 seq_ctrl; -+} __packed __aligned(2); - - #define BEACON_PROBE_SSID_ID_POSITION 12 - -@@ -566,18 +566,18 @@ struct ieee80211_info_element { - /* - * These are the data types that can make up management packets - * -- u16 auth_algorithm; -- u16 auth_sequence; -- u16 beacon_interval; -- u16 capability; -+ __le16 auth_algorithm; -+ __le16 auth_sequence; -+ __le16 beacon_interval; -+ __le16 capability; - u8 current_ap[ETH_ALEN]; -- u16 listen_interval; -+ __le16 listen_interval; - struct { - u16 association_id:14, reserved:2; - } __packed; -- u32 time_stamp[2]; -- u16 reason; -- u16 status; -+ __le32 time_stamp[2]; -+ __le16 reason; -+ __le16 status; - */ - - #define IEEE80211_DEFAULT_TX_ESSID "Penguin" -@@ -585,16 +585,16 @@ struct ieee80211_info_element { - - struct ieee80211_authentication { - struct ieee80211_header_data header; -- u16 algorithm; -- u16 transaction; -- u16 status; -+ __le16 algorithm; -+ __le16 transaction; -+ __le16 status; - } __packed; - - struct ieee80211_probe_response { - struct ieee80211_header_data header; -- u32 time_stamp[2]; -- u16 beacon_interval; -- u16 capability; -+ __le32 time_stamp[2]; -+ __le16 beacon_interval; -+ __le16 capability; - struct ieee80211_info_element info_element; - } __packed; - -@@ -604,16 +604,16 @@ struct ieee80211_probe_request { - - struct ieee80211_assoc_request_frame { - struct ieee80211_hdr_3addr header; -- u16 capability; -- u16 listen_interval; -+ __le16 capability; -+ __le16 listen_interval; - struct ieee80211_info_element_hdr info_element; - } __packed; - - struct ieee80211_assoc_response_frame { - struct ieee80211_hdr_3addr header; -- u16 capability; -- u16 status; -- u16 aid; -+ __le16 capability; -+ __le16 status; -+ __le16 aid; - } __packed; - - struct ieee80211_txb { -diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -index edfc6805..2b348439 100644 ---- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -@@ -199,7 +199,7 @@ static inline char *translate_scan(struct _adapter *padapter, - iwe.cmd = SIOCGIWMODE; - memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs), - 2); -- cap = le16_to_cpu(cap); -+ le16_to_cpus(&cap); - if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) { - if (cap & WLAN_CAPABILITY_BSS) - iwe.u.mode = (u32)IW_MODE_MASTER; -diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c -index 4ff53015..04ac23cc 100644 ---- a/drivers/staging/rtl8712/rtl871x_recv.c -+++ b/drivers/staging/rtl8712/rtl871x_recv.c -@@ -641,11 +641,16 @@ sint r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe) - /* append rx status for mp test packets */ - ptr = recvframe_pull(precvframe, (rmv_len - - sizeof(struct ethhdr) + 2) - 24); -+ if (!ptr) -+ return _FAIL; - memcpy(ptr, get_rxmem(precvframe), 24); - ptr += 24; -- } else -+ } else { - ptr = recvframe_pull(precvframe, (rmv_len - - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); -+ if (!ptr) -+ return _FAIL; -+ } - - memcpy(ptr, pattrib->dst, ETH_ALEN); - memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); -diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c -index 68d65d23..d3ad89c7 100644 ---- a/drivers/staging/rtl8712/rtl871x_xmit.c -+++ b/drivers/staging/rtl8712/rtl871x_xmit.c -@@ -339,7 +339,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, - /* if in MP_STATE, update pkt_attrib from mp_txcmd, and overwrite - * some settings above.*/ - if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) -- pattrib->priority = (txdesc.txdw1 >> QSEL_SHT) & 0x1f; -+ pattrib->priority = -+ (le32_to_cpu(txdesc.txdw1) >> QSEL_SHT) & 0x1f; - return _SUCCESS; - } - -@@ -479,7 +480,7 @@ static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr, - struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct qos_priv *pqospriv = &pmlmepriv->qospriv; -- u16 *fctrl = &pwlanhdr->frame_ctl; -+ __le16 *fctrl = &pwlanhdr->frame_ctl; - - memset(hdr, 0, WLANHDR_OFFSET); - SetFrameSubType(fctrl, pattrib->subtype); -@@ -568,7 +569,7 @@ static sint r8712_put_snap(u8 *data, u16 h_proto) - snap->oui[0] = oui[0]; - snap->oui[1] = oui[1]; - snap->oui[2] = oui[2]; -- *(u16 *)(data + SNAP_SIZE) = htons(h_proto); -+ *(__be16 *)(data + SNAP_SIZE) = htons(h_proto); - return SNAP_SIZE + sizeof(u16); - } - -diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c -index a9c1e0ba..e35fbece 100644 ---- a/drivers/staging/wlan-ng/p80211netdev.c -+++ b/drivers/staging/wlan-ng/p80211netdev.c -@@ -232,7 +232,7 @@ static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb) - struct p80211_hdr_a3 *hdr; - - hdr = (struct p80211_hdr_a3 *) skb->data; -- if (p80211_rx_typedrop(wlandev, hdr->fc)) -+ if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc))) - return CONV_TO_ETHER_SKIPPED; - - /* perform mcast filtering: allow my local address through but reject -diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c -index 013a6240..c1ad0aea 100644 ---- a/drivers/staging/wlan-ng/prism2mgmt.c -+++ b/drivers/staging/wlan-ng/prism2mgmt.c -@@ -169,7 +169,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) - hw->ident_sta_fw.variant) > - HFA384x_FIRMWARE_VERSION(1, 5, 0)) { - if (msg->scantype.data != P80211ENUM_scantype_active) -- word = cpu_to_le16(msg->maxchanneltime.data); -+ word = msg->maxchanneltime.data; - else - word = 0; - -diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h -index 83430f2e..e0325706 100644 ---- a/include/linux/mmc/sdio_ids.h -+++ b/include/linux/mmc/sdio_ids.h -@@ -33,6 +33,7 @@ - #define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d - #define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335 - #define SDIO_DEVICE_ID_BROADCOM_43362 0xa962 -+#define SDIO_DEVICE_ID_BROADCOM_43364 0xa9a4 - #define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6 - #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345 - #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 -diff --git a/include/linux/nospec.h b/include/linux/nospec.h -new file mode 100644 -index 00000000..0c5ef54f ---- /dev/null -+++ b/include/linux/nospec.h -@@ -0,0 +1,68 @@ -+// SPDX-License-Identifier: GPL-2.0 -+// Copyright(c) 2018 Linus Torvalds. All rights reserved. -+// Copyright(c) 2018 Alexei Starovoitov. All rights reserved. -+// Copyright(c) 2018 Intel Corporation. All rights reserved. -+ -+#ifndef _LINUX_NOSPEC_H -+#define _LINUX_NOSPEC_H -+#include -+ -+struct task_struct; -+ -+/** -+ * array_index_mask_nospec() - generate a ~0 mask when index < size, 0 otherwise -+ * @index: array element index -+ * @size: number of elements in array -+ * -+ * When @index is out of bounds (@index >= @size), the sign bit will be -+ * set. Extend the sign bit to all bits and invert, giving a result of -+ * zero for an out of bounds index, or ~0 if within bounds [0, @size). -+ */ -+#ifndef array_index_mask_nospec -+static inline unsigned long array_index_mask_nospec(unsigned long index, -+ unsigned long size) -+{ -+ /* -+ * Always calculate and emit the mask even if the compiler -+ * thinks the mask is not needed. The compiler does not take -+ * into account the value of @index under speculation. -+ */ -+ OPTIMIZER_HIDE_VAR(index); -+ return ~(long)(index | (size - 1UL - index)) >> (BITS_PER_LONG - 1); -+} -+#endif -+ -+/* -+ * array_index_nospec - sanitize an array index after a bounds check -+ * -+ * For a code sequence like: -+ * -+ * if (index < size) { -+ * index = array_index_nospec(index, size); -+ * val = array[index]; -+ * } -+ * -+ * ...if the CPU speculates past the bounds check then -+ * array_index_nospec() will clamp the index within the range of [0, -+ * size). -+ */ -+#define array_index_nospec(index, size) \ -+({ \ -+ typeof(index) _i = (index); \ -+ typeof(size) _s = (size); \ -+ unsigned long _mask = array_index_mask_nospec(_i, _s); \ -+ \ -+ BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \ -+ BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \ -+ \ -+ (typeof(_i)) (_i & _mask); \ -+}) -+ -+/* Speculation control prctl */ -+int arch_prctl_spec_ctrl_get(struct task_struct *task, unsigned long which); -+int arch_prctl_spec_ctrl_set(struct task_struct *task, unsigned long which, -+ unsigned long ctrl); -+/* Speculation control for seccomp enforced mitigation */ -+void arch_seccomp_spec_mitigate(struct task_struct *task); -+ -+#endif /* _LINUX_NOSPEC_H */ -diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h -index 2c7bdb81..c05748cc 100644 ---- a/include/net/cfg80211.h -+++ b/include/net/cfg80211.h -@@ -933,9 +933,9 @@ enum rate_info_flags { - * @RATE_INFO_BW_160: 160 MHz bandwidth - */ - enum rate_info_bw { -+ RATE_INFO_BW_20 = 0, - RATE_INFO_BW_5, - RATE_INFO_BW_10, -- RATE_INFO_BW_20, - RATE_INFO_BW_40, - RATE_INFO_BW_80, - RATE_INFO_BW_160, -@@ -4257,6 +4257,17 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, - */ - void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss); - -+/** -+ * cfg80211_abandon_assoc - notify cfg80211 of abandoned association attempt -+ * @dev: network device -+ * @bss: The BSS entry with which association was abandoned. -+ * -+ * Call this whenever - for reasons reported through other API, like deauth RX, -+ * an association attempt was abandoned. -+ * This function may sleep. The caller must hold the corresponding wdev's mutex. -+ */ -+void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss); -+ - /** - * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame - * @dev: network device -diff --git a/include/net/mac80211.h b/include/net/mac80211.h -index 760bc4d5..ec11cb1c 100644 ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -975,7 +975,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. - * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, - * verification has been done by the hardware. -- * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. -+ * @RX_FLAG_IV_STRIPPED: The IV and ICV are stripped from this frame. - * If this flag is set, the stack cannot do any replay detection - * hence the driver or hardware will have to do that. - * @RX_FLAG_PN_VALIDATED: Currently only valid for CCMP/GCMP frames, this -@@ -1013,6 +1013,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * on this subframe - * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC - * is stored in the @ampdu_delimiter_crc field) -+ * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was -+ * done by the hardware - * @RX_FLAG_LDPC: LDPC was used - * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 - * @RX_FLAG_10MHZ: 10 MHz (half channel) was used -@@ -1029,6 +1031,11 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * @RX_FLAG_RADIOTAP_VENDOR_DATA: This frame contains vendor-specific - * radiotap data in the skb->data (before the frame) as described by - * the &struct ieee80211_vendor_radiotap. -+ * @RX_FLAG_ALLOW_SAME_PN: Allow the same PN as same packet before. -+ * This is used for AMSDU subframes which can have the same PN as -+ * the first subframe. -+ * @RX_FLAG_ICV_STRIPPED: The ICV is stripped from this frame. CRC checking must -+ * be done in the hardware. - */ - enum mac80211_rx_flags { - RX_FLAG_MMIC_ERROR = BIT(0), -@@ -1059,6 +1066,9 @@ enum mac80211_rx_flags { - RX_FLAG_5MHZ = BIT(29), - RX_FLAG_AMSDU_MORE = BIT(30), - RX_FLAG_RADIOTAP_VENDOR_DATA = BIT(31), -+ RX_FLAG_MIC_STRIPPED = BIT_ULL(32), -+ RX_FLAG_ALLOW_SAME_PN = BIT_ULL(33), -+ RX_FLAG_ICV_STRIPPED = BIT_ULL(34), - }; - - #define RX_FLAG_STBC_SHIFT 26 -@@ -1113,7 +1123,7 @@ struct ieee80211_rx_status { - u64 mactime; - u32 device_timestamp; - u32 ampdu_reference; -- u32 flag; -+ u64 flag; - u16 freq; - u8 vht_flag; - u8 rate_idx; -@@ -1662,6 +1672,9 @@ struct ieee80211_sta_rates { - * @supp_rates: Bitmap of supported rates (per band) - * @ht_cap: HT capabilities of this STA; restricted to our own capabilities - * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities -+ * @max_rx_aggregation_subframes: maximal amount of frames in a single AMPDU -+ * that this station is allowed to transmit to us. -+ * Can be modified by driver. - * @wme: indicates whether the STA supports QoS/WME (if local devices does, - * otherwise always false) - * @drv_priv: data area for driver use, will always be aligned to -@@ -1688,6 +1701,7 @@ struct ieee80211_sta { - u16 aid; - struct ieee80211_sta_ht_cap ht_cap; - struct ieee80211_sta_vht_cap vht_cap; -+ u8 max_rx_aggregation_subframes; - bool wme; - u8 uapsd_queues; - u8 max_sp; -@@ -2673,6 +2687,33 @@ enum ieee80211_ampdu_mlme_action { - IEEE80211_AMPDU_TX_OPERATIONAL, - }; - -+/** -+ * struct ieee80211_ampdu_params - AMPDU action parameters -+ * -+ * @action: the ampdu action, value from %ieee80211_ampdu_mlme_action. -+ * @sta: peer of this AMPDU session -+ * @tid: tid of the BA session -+ * @ssn: start sequence number of the session. TX/RX_STOP can pass 0. When -+ * action is set to %IEEE80211_AMPDU_RX_START the driver passes back the -+ * actual ssn value used to start the session and writes the value here. -+ * @buf_size: reorder buffer size (number of subframes). Valid only when the -+ * action is set to %IEEE80211_AMPDU_RX_START or -+ * %IEEE80211_AMPDU_TX_OPERATIONAL -+ * @amsdu: indicates the peer's ability to receive A-MSDU within A-MPDU. -+ * valid when the action is set to %IEEE80211_AMPDU_TX_OPERATIONAL -+ * @timeout: BA session timeout. Valid only when the action is set to -+ * %IEEE80211_AMPDU_RX_START -+ */ -+struct ieee80211_ampdu_params { -+ enum ieee80211_ampdu_mlme_action action; -+ struct ieee80211_sta *sta; -+ u16 tid; -+ u16 ssn; -+ u8 buf_size; -+ bool amsdu; -+ u16 timeout; -+}; -+ - /** - * enum ieee80211_frame_release_type - frame release reason - * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll -@@ -3017,13 +3058,9 @@ enum ieee80211_reconfig_type { - * @ampdu_action: Perform a certain A-MPDU action - * The RA/TID combination determines the destination and TID we want - * the ampdu action to be performed for. The action is defined through -- * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) -- * is the first frame we expect to perform the action on. Notice -- * that TX/RX_STOP can pass NULL for this parameter. -- * The @buf_size parameter is only valid when the action is set to -- * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder -- * buffer size (number of subframes) for this session -- the driver -- * may neither send aggregates containing more subframes than this -+ * ieee80211_ampdu_mlme_action. -+ * When the action is set to %IEEE80211_AMPDU_TX_OPERATIONAL the driver -+ * may neither send aggregates containing more subframes than @buf_size - * nor send aggregates in a way that lost frames would exceed the - * buffer size. If just limiting the aggregate size, this would be - * possible with a buf_size of 8: -@@ -3034,9 +3071,6 @@ enum ieee80211_reconfig_type { - * buffer size of 8. Correct ways to retransmit #1 would be: - * - TX: 1 or 18 or 81 - * Even "189" would be wrong since 1 could be lost again. -- * The @amsdu parameter is valid when the action is set to -- * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's ability -- * to receive A-MSDU within A-MPDU. - * - * Returns a negative error code on failure. - * The callback can sleep. -@@ -3378,9 +3412,7 @@ struct ieee80211_ops { - int (*tx_last_beacon)(struct ieee80211_hw *hw); - int (*ampdu_action)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int (*get_survey)(struct ieee80211_hw *hw, int idx, - struct survey_info *survey); - void (*rfkill_poll)(struct ieee80211_hw *hw); -@@ -3866,7 +3898,7 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, - * The TX headroom reserved by mac80211 for its own tx_status functions. - * This is enough for the radiotap header. - */ --#define IEEE80211_TX_STATUS_HEADROOM 14 -+#define IEEE80211_TX_STATUS_HEADROOM ALIGN(14, 4) - - /** - * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames -diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h -index 1f0b4cf5..d3aea4f1 100644 ---- a/include/uapi/linux/nl80211.h -+++ b/include/uapi/linux/nl80211.h -@@ -2195,6 +2195,8 @@ enum nl80211_attrs { - #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS - #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS - -+#define NL80211_WIPHY_NAME_MAXLEN 64 -+ - #define NL80211_MAX_SUPP_RATES 32 - #define NL80211_MAX_SUPP_HT_RATES 77 - #define NL80211_MAX_SUPP_REG_RULES 64 -diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c -index 367784be..a830356b 100644 ---- a/net/mac80211/agg-rx.c -+++ b/net/mac80211/agg-rx.c -@@ -7,6 +7,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007, Michael Wu - * Copyright 2007-2010, Intel Corporation -+ * Copyright(c) 2015 Intel Deutschland GmbH - * - * 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 -@@ -61,6 +62,14 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, - { - struct ieee80211_local *local = sta->local; - struct tid_ampdu_rx *tid_rx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_RX_STOP, -+ .tid = tid, -+ .amsdu = false, -+ .timeout = 0, -+ .ssn = 0, -+ }; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); - -@@ -78,8 +87,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, - initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", - (int)reason); - -- if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, -- &sta->sta, tid, NULL, 0, false)) -+ if (drv_ampdu_action(local, sta->sdata, ¶ms)) - sdata_info(sta->sdata, - "HW problem - can not stop rx aggregation for %pM tid %d\n", - sta->sta.addr, tid); -@@ -237,6 +245,15 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - { - struct ieee80211_local *local = sta->sdata->local; - struct tid_ampdu_rx *tid_agg_rx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_RX_START, -+ .tid = tid, -+ .amsdu = false, -+ .timeout = timeout, -+ .ssn = start_seq_num, -+ }; -+ - int i, ret = -EOPNOTSUPP; - u16 status = WLAN_STATUS_REQUEST_DECLINED; - -@@ -273,8 +290,12 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - buf_size = IEEE80211_MAX_AMPDU_BUF; - - /* make sure the size doesn't exceed the maximum supported by the hw */ -- if (buf_size > local->hw.max_rx_aggregation_subframes) -- buf_size = local->hw.max_rx_aggregation_subframes; -+ if (buf_size > sta->sta.max_rx_aggregation_subframes) -+ buf_size = sta->sta.max_rx_aggregation_subframes; -+ params.buf_size = buf_size; -+ -+ ht_dbg(sta->sdata, "AddBA Req buf_size=%d for %pM\n", -+ buf_size, sta->sta.addr); - - /* examine state machine */ - mutex_lock(&sta->ampdu_mlme.mtx); -@@ -322,8 +343,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - for (i = 0; i < buf_size; i++) - __skb_queue_head_init(&tid_agg_rx->reorder_buf[i]); - -- ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, -- &sta->sta, tid, &start_seq_num, 0, false); -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - ht_dbg(sta->sdata, "Rx A-MPDU request on %pM tid %d result %d\n", - sta->sta.addr, tid, ret); - if (ret) { -diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c -index ff757181..4932e9f2 100644 ---- a/net/mac80211/agg-tx.c -+++ b/net/mac80211/agg-tx.c -@@ -7,6 +7,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007, Michael Wu - * Copyright 2007-2010, Intel Corporation -+ * Copyright(c) 2015 Intel Deutschland GmbH - * - * 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 -@@ -295,7 +296,14 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - { - struct ieee80211_local *local = sta->local; - struct tid_ampdu_tx *tid_tx; -- enum ieee80211_ampdu_mlme_action action; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .tid = tid, -+ .buf_size = 0, -+ .amsdu = false, -+ .timeout = 0, -+ .ssn = 0, -+ }; - int ret; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); -@@ -304,10 +312,10 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - case AGG_STOP_DECLINED: - case AGG_STOP_LOCAL_REQUEST: - case AGG_STOP_PEER_REQUEST: -- action = IEEE80211_AMPDU_TX_STOP_CONT; -+ params.action = IEEE80211_AMPDU_TX_STOP_CONT; - break; - case AGG_STOP_DESTROY_STA: -- action = IEEE80211_AMPDU_TX_STOP_FLUSH; -+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH; - break; - default: - WARN_ON_ONCE(1); -@@ -330,9 +338,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - spin_unlock_bh(&sta->lock); - if (reason != AGG_STOP_DESTROY_STA) - return -EALREADY; -- ret = drv_ampdu_action(local, sta->sdata, -- IEEE80211_AMPDU_TX_STOP_FLUSH_CONT, -- &sta->sta, tid, NULL, 0, false); -+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH_CONT; -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - WARN_ON_ONCE(ret); - return 0; - } -@@ -381,8 +388,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - WLAN_BACK_INITIATOR; - tid_tx->tx_stop = reason == AGG_STOP_LOCAL_REQUEST; - -- ret = drv_ampdu_action(local, sta->sdata, action, -- &sta->sta, tid, NULL, 0, false); -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - - /* HW shall not deny going back to legacy */ - if (WARN_ON(ret)) { -@@ -445,7 +451,14 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - struct tid_ampdu_tx *tid_tx; - struct ieee80211_local *local = sta->local; - struct ieee80211_sub_if_data *sdata = sta->sdata; -- u16 start_seq_num; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_TX_START, -+ .tid = tid, -+ .buf_size = 0, -+ .amsdu = false, -+ .timeout = 0, -+ }; - int ret; - - tid_tx = rcu_dereference_protected_tid_tx(sta, tid); -@@ -467,10 +480,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - */ - synchronize_net(); - -- start_seq_num = sta->tid_seq[tid] >> 4; -- -- ret = drv_ampdu_action(local, sdata, IEEE80211_AMPDU_TX_START, -- &sta->sta, tid, &start_seq_num, 0, false); -+ params.ssn = sta->tid_seq[tid] >> 4; -+ ret = drv_ampdu_action(local, sdata, ¶ms); - if (ret) { - ht_dbg(sdata, - "BA request denied - HW unavailable for %pM tid %d\n", -@@ -499,7 +510,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - - /* send AddBA request */ - ieee80211_send_addba_request(sdata, sta->sta.addr, tid, -- tid_tx->dialog_token, start_seq_num, -+ tid_tx->dialog_token, params.ssn, - IEEE80211_MAX_AMPDU_BUF, - tid_tx->timeout); - } -@@ -684,18 +695,24 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local, - struct sta_info *sta, u16 tid) - { - struct tid_ampdu_tx *tid_tx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_TX_OPERATIONAL, -+ .tid = tid, -+ .timeout = 0, -+ .ssn = 0, -+ }; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); - - tid_tx = rcu_dereference_protected_tid_tx(sta, tid); -+ params.buf_size = tid_tx->buf_size; -+ params.amsdu = tid_tx->amsdu; - - ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n", - sta->sta.addr, tid); - -- drv_ampdu_action(local, sta->sdata, -- IEEE80211_AMPDU_TX_OPERATIONAL, -- &sta->sta, tid, NULL, tid_tx->buf_size, -- tid_tx->amsdu); -+ drv_ampdu_action(local, sta->sdata, ¶ms); - - /* - * synchronize with TX path, while splicing the TX path -diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c -index 19322c04..7349bf26 100644 ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -219,7 +219,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, - case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_AP_VLAN: - /* Keys without a station are used for TX only */ -- if (key->sta && test_sta_flag(key->sta, WLAN_STA_MFP)) -+ if (sta && test_sta_flag(sta, WLAN_STA_MFP)) - key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT; - break; - case NL80211_IFTYPE_ADHOC: -@@ -286,7 +286,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, - goto out_unlock; - } - -- ieee80211_key_free(key, true); -+ ieee80211_key_free(key, sdata->vif.type == NL80211_IFTYPE_STATION); - - ret = 0; - out_unlock: -@@ -1228,6 +1228,10 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, - if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) - sta->sta.tdls = true; - -+ if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION && -+ !sdata->u.mgd.associated) -+ return -EINVAL; -+ - err = sta_apply_parameters(local, sta, params); - if (err) { - sta_info_free(local, sta); -@@ -2877,7 +2881,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) - } - if (beacon->probe_resp_len) { - new_beacon->probe_resp_len = beacon->probe_resp_len; -- beacon->probe_resp = pos; -+ new_beacon->probe_resp = pos; - memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); - pos += beacon->probe_resp_len; - } -diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c -index 4d2aaebd..e546a987 100644 ---- a/net/mac80211/debugfs.c -+++ b/net/mac80211/debugfs.c -@@ -91,7 +91,7 @@ static const struct file_operations reset_ops = { - }; - #endif - --static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { -+static const char *hw_flag_names[] = { - #define FLAG(F) [IEEE80211_HW_##F] = #F - FLAG(HAS_RATE_CONTROL), - FLAG(RX_INCLUDES_FCS), -@@ -125,9 +125,6 @@ static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { - FLAG(TDLS_WIDER_BW), - FLAG(SUPPORTS_AMSDU_IN_AMPDU), - FLAG(BEACON_TX_STATUS), -- -- /* keep last for the build bug below */ -- (void *)0x1 - #undef FLAG - }; - -@@ -147,7 +144,7 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf, - /* fail compilation if somebody adds or removes - * a flag without updating the name array above - */ -- BUILD_BUG_ON(hw_flag_names[NUM_IEEE80211_HW_FLAGS] != (void *)0x1); -+ BUILD_BUG_ON(ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS); - - for (i = 0; i < NUM_IEEE80211_HW_FLAGS; i++) { - if (test_bit(i, local->hw.flags)) -diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c -index ca1fe557..c258f104 100644 ---- a/net/mac80211/driver-ops.c -+++ b/net/mac80211/driver-ops.c -@@ -284,9 +284,7 @@ int drv_switch_vif_chanctx(struct ieee80211_local *local, - - int drv_ampdu_action(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - int ret = -EOPNOTSUPP; - -@@ -296,12 +294,10 @@ int drv_ampdu_action(struct ieee80211_local *local, - if (!check_sdata_in_driver(sdata)) - return -EIO; - -- trace_drv_ampdu_action(local, sdata, action, sta, tid, -- ssn, buf_size, amsdu); -+ trace_drv_ampdu_action(local, sdata, params); - - if (local->ops->ampdu_action) -- ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action, -- sta, tid, ssn, buf_size, amsdu); -+ ret = local->ops->ampdu_action(&local->hw, &sdata->vif, params); - - trace_drv_return_int(local, ret); - -diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h -index 154ce4b1..6019988b 100644 ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -585,9 +585,7 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local) - - int drv_ampdu_action(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - - static inline int drv_get_survey(struct ieee80211_local *local, int idx, - struct survey_info *survey) -@@ -1159,6 +1157,9 @@ static inline void drv_wake_tx_queue(struct ieee80211_local *local, - { - struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif); - -+ if (local->in_reconfig) -+ return; -+ - if (!check_sdata_in_driver(sdata)) - return; - -diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c -index 980e9e9b..f2af1967 100644 ---- a/net/mac80211/ibss.c -+++ b/net/mac80211/ibss.c -@@ -66,6 +66,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata, - 2 + (IEEE80211_MAX_SUPP_RATES - 8) + - 2 + sizeof(struct ieee80211_ht_cap) + - 2 + sizeof(struct ieee80211_ht_operation) + -+ 2 + sizeof(struct ieee80211_vht_cap) + -+ 2 + sizeof(struct ieee80211_vht_operation) + - ifibss->ie_len; - presp = kzalloc(sizeof(*presp) + frame_len, GFP_KERNEL); - if (!presp) -@@ -486,14 +488,14 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata, - struct beacon_data *presp, *old_presp; - struct cfg80211_bss *cbss; - const struct cfg80211_bss_ies *ies; -- u16 capability = 0; -+ u16 capability = WLAN_CAPABILITY_IBSS; - u64 tsf; - int ret = 0; - - sdata_assert_lock(sdata); - - if (ifibss->privacy) -- capability = WLAN_CAPABILITY_PRIVACY; -+ capability |= WLAN_CAPABILITY_PRIVACY; - - cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, - ifibss->bssid, ifibss->ssid, -@@ -946,8 +948,8 @@ static void ieee80211_rx_mgmt_deauth_ibss(struct ieee80211_sub_if_data *sdata, - if (len < IEEE80211_DEAUTH_FRAME_LEN) - return; - -- ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, reason); -+ ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (reason: %d)\n", mgmt->bssid, reason); - sta_info_destroy_addr(sdata, mgmt->sa); - } - -@@ -965,9 +967,9 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata, - auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg); - auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction); - -- ibss_dbg(sdata, -- "RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=%d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, auth_transaction); -+ ibss_dbg(sdata, "RX Auth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (auth_transaction=%d)\n", -+ mgmt->bssid, auth_transaction); - - if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1) - return; -@@ -1172,10 +1174,10 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, - rx_timestamp = drv_get_tsf(local, sdata); - } - -- ibss_dbg(sdata, -- "RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n", -+ ibss_dbg(sdata, "RX beacon SA=%pM BSSID=%pM TSF=0x%llx\n", - mgmt->sa, mgmt->bssid, -- (unsigned long long)rx_timestamp, -+ (unsigned long long)rx_timestamp); -+ ibss_dbg(sdata, "\tBCN=0x%llx diff=%lld @%lu\n", - (unsigned long long)beacon_timestamp, - (unsigned long long)(rx_timestamp - beacon_timestamp), - jiffies); -@@ -1534,9 +1536,9 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, - - tx_last_beacon = drv_tx_last_beacon(local); - -- ibss_dbg(sdata, -- "RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, tx_last_beacon); -+ ibss_dbg(sdata, "RX ProbeReq SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (tx_last_beacon=%d)\n", -+ mgmt->bssid, tx_last_beacon); - - if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da)) - return; -diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h -index 6837a46c..7b271f3d 100644 ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -682,7 +682,6 @@ struct ieee80211_if_mesh { - const struct ieee80211_mesh_sync_ops *sync_ops; - s64 sync_offset_clockdrift_max; - spinlock_t sync_offset_lock; -- bool adjusting_tbtt; - /* mesh power save */ - enum nl80211_mesh_power_mode nonpeer_pm; - int ps_peers_light_sleep; -diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c -index bcb0a1b6..519def0e 100644 ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -987,6 +987,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, - if (local->open_count == 0) - ieee80211_clear_tx_pending(local); - -+ sdata->vif.bss_conf.beacon_int = 0; -+ - /* - * If the interface goes down while suspended, presumably because - * the device was unplugged and that happens before our resume, -@@ -1441,7 +1443,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, - break; - case NL80211_IFTYPE_UNSPECIFIED: - case NUM_NL80211_IFTYPES: -- BUG(); -+ WARN_ON(1); - break; - } - -diff --git a/net/mac80211/key.c b/net/mac80211/key.c -index 44388d6a..91a4e606 100644 ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -4,6 +4,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007-2008 Johannes Berg - * Copyright 2013-2014 Intel Mobile Communications GmbH -+ * Copyright 2017 Intel Deutschland GmbH - * - * 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 -@@ -18,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include "ieee80211_i.h" - #include "driver-ops.h" -@@ -606,20 +608,54 @@ void ieee80211_key_free_unused(struct ieee80211_key *key) - ieee80211_key_free_common(key); - } - -+static bool ieee80211_key_identical(struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_key *old, -+ struct ieee80211_key *new) -+{ -+ u8 tkip_old[WLAN_KEY_LEN_TKIP], tkip_new[WLAN_KEY_LEN_TKIP]; -+ u8 *tk_old, *tk_new; -+ -+ if (!old || new->conf.keylen != old->conf.keylen) -+ return false; -+ -+ tk_old = old->conf.key; -+ tk_new = new->conf.key; -+ -+ /* -+ * In station mode, don't compare the TX MIC key, as it's never used -+ * and offloaded rekeying may not care to send it to the host. This -+ * is the case in iwlwifi, for example. -+ */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ new->conf.cipher == WLAN_CIPHER_SUITE_TKIP && -+ new->conf.keylen == WLAN_KEY_LEN_TKIP && -+ !(new->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) { -+ memcpy(tkip_old, tk_old, WLAN_KEY_LEN_TKIP); -+ memcpy(tkip_new, tk_new, WLAN_KEY_LEN_TKIP); -+ memset(tkip_old + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ memset(tkip_new + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ tk_old = tkip_old; -+ tk_new = tkip_new; -+ } -+ -+ return !crypto_memneq(tk_old, tk_new, new->conf.keylen); -+} -+ - int ieee80211_key_link(struct ieee80211_key *key, - struct ieee80211_sub_if_data *sdata, - struct sta_info *sta) - { - struct ieee80211_local *local = sdata->local; - struct ieee80211_key *old_key; -- int idx, ret; -- bool pairwise; -- -- pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; -- idx = key->conf.keyidx; -- key->local = sdata->local; -- key->sdata = sdata; -- key->sta = sta; -+ int idx = key->conf.keyidx; -+ bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; -+ /* -+ * We want to delay tailroom updates only for station - in that -+ * case it helps roaming speed, but in other cases it hurts and -+ * can cause warnings to appear. -+ */ -+ bool delay_tailroom = sdata->vif.type == NL80211_IFTYPE_STATION; -+ int ret; - - mutex_lock(&sdata->local->key_mtx); - -@@ -630,21 +666,36 @@ int ieee80211_key_link(struct ieee80211_key *key, - else - old_key = key_mtx_dereference(sdata->local, sdata->keys[idx]); - -+ /* -+ * Silently accept key re-installation without really installing the -+ * new version of the key to avoid nonce reuse or replay issues. -+ */ -+ if (ieee80211_key_identical(sdata, old_key, key)) { -+ ieee80211_key_free_unused(key); -+ ret = 0; -+ goto out; -+ } -+ -+ key->local = sdata->local; -+ key->sdata = sdata; -+ key->sta = sta; -+ - increment_tailroom_need_count(sdata); - - ieee80211_key_replace(sdata, sta, pairwise, old_key, key); -- ieee80211_key_destroy(old_key, true); -+ ieee80211_key_destroy(old_key, delay_tailroom); - - ieee80211_debugfs_key_add(key); - - if (!local->wowlan) { - ret = ieee80211_key_enable_hw_accel(key); - if (ret) -- ieee80211_key_free(key, true); -+ ieee80211_key_free(key, delay_tailroom); - } else { - ret = 0; - } - -+ out: - mutex_unlock(&sdata->local->key_mtx); - - return ret; -@@ -827,7 +878,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local, - ieee80211_key_replace(key->sdata, key->sta, - key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, - key, NULL); -- __ieee80211_key_destroy(key, true); -+ __ieee80211_key_destroy(key, key->sdata->vif.type == -+ NL80211_IFTYPE_STATION); - } - - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { -@@ -837,7 +889,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local, - ieee80211_key_replace(key->sdata, key->sta, - key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, - key, NULL); -- __ieee80211_key_destroy(key, true); -+ __ieee80211_key_destroy(key, key->sdata->vif.type == -+ NL80211_IFTYPE_STATION); - } - - mutex_unlock(&local->key_mtx); -diff --git a/net/mac80211/main.c b/net/mac80211/main.c -index 175ffcf7..15d23aee 100644 ---- a/net/mac80211/main.c -+++ b/net/mac80211/main.c -@@ -253,8 +253,27 @@ static void ieee80211_restart_work(struct work_struct *work) - "%s called with hardware scan in progress\n", __func__); - - rtnl_lock(); -- list_for_each_entry(sdata, &local->interfaces, list) -+ list_for_each_entry(sdata, &local->interfaces, list) { -+ /* -+ * XXX: there may be more work for other vif types and even -+ * for station mode: a good thing would be to run most of -+ * the iface type's dependent _stop (ieee80211_mg_stop, -+ * ieee80211_ibss_stop) etc... -+ * For now, fix only the specific bug that was seen: race -+ * between csa_connection_drop_work and us. -+ */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION) { -+ /* -+ * This worker is scheduled from the iface worker that -+ * runs on mac80211's workqueue, so we can't be -+ * scheduling this worker after the cancel right here. -+ * The exception is ieee80211_chswitch_done. -+ * Then we can have a race... -+ */ -+ cancel_work_sync(&sdata->u.mgd.csa_connection_drop_work); -+ } - flush_delayed_work(&sdata->dec_tailroom_needed_wk); -+ } - ieee80211_scan_cancel(local); - ieee80211_reconfig(local); - rtnl_unlock(); -@@ -460,10 +479,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = { - cpu_to_le32(IEEE80211_VHT_CAP_RXLDPC | - IEEE80211_VHT_CAP_SHORT_GI_80 | - IEEE80211_VHT_CAP_SHORT_GI_160 | -- IEEE80211_VHT_CAP_RXSTBC_1 | -- IEEE80211_VHT_CAP_RXSTBC_2 | -- IEEE80211_VHT_CAP_RXSTBC_3 | -- IEEE80211_VHT_CAP_RXSTBC_4 | -+ IEEE80211_VHT_CAP_RXSTBC_MASK | - IEEE80211_VHT_CAP_TXSTBC | - IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | - IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | -@@ -891,12 +907,17 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) - supp_ht = supp_ht || sband->ht_cap.ht_supported; - supp_vht = supp_vht || sband->vht_cap.vht_supported; - -- if (sband->ht_cap.ht_supported) -- local->rx_chains = -- max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), -- local->rx_chains); -+ if (!sband->ht_cap.ht_supported) -+ continue; - - /* TODO: consider VHT for RX chains, hopefully it's the same */ -+ local->rx_chains = -+ max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), -+ local->rx_chains); -+ -+ /* no need to mask, SM_PS_DISABLED has all bits set */ -+ sband->ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED << -+ IEEE80211_HT_CAP_SM_PS_SHIFT; - } - - /* if low-level driver supports AP, we also support VLAN */ -diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c -index f7bb6829..1cbc7bd2 100644 ---- a/net/mac80211/mesh.c -+++ b/net/mac80211/mesh.c -@@ -295,10 +295,6 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, - /* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */ - *pos |= ifmsh->ps_peers_deep_sleep ? - IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL : 0x00; -- *pos++ |= ifmsh->adjusting_tbtt ? -- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING : 0x00; -- *pos++ = 0x00; -- - return 0; - } - -@@ -355,7 +351,7 @@ int mesh_add_vendor_ies(struct ieee80211_sub_if_data *sdata, - /* fast-forward to vendor IEs */ - offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0); - -- if (offset) { -+ if (offset < ifmsh->ie_len) { - len = ifmsh->ie_len - offset; - data = ifmsh->ie + offset; - if (skb_tailroom(skb) < len) -@@ -866,7 +862,6 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) - ifmsh->mesh_cc_id = 0; /* Disabled */ - /* register sync ops from extensible synchronization framework */ - ifmsh->sync_ops = ieee80211_mesh_sync_ops_get(ifmsh->mesh_sp_id); -- ifmsh->adjusting_tbtt = false; - ifmsh->sync_offset_clockdrift_max = 0; - set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); - ieee80211_mesh_root_setup(ifmsh); -diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c -index b6dc2d7c..466922f0 100644 ---- a/net/mac80211/mesh_hwmp.c -+++ b/net/mac80211/mesh_hwmp.c -@@ -552,6 +552,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, - forward = false; - reply = true; - target_metric = 0; -+ -+ if (SN_GT(target_sn, ifmsh->sn)) -+ ifmsh->sn = target_sn; -+ - if (time_after(jiffies, ifmsh->last_sn_update + - net_traversal_jiffies(sdata)) || - time_before(jiffies, ifmsh->last_sn_update)) { -@@ -776,7 +780,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - struct mesh_path *mpath; - u8 ttl, flags, hopcount; - const u8 *orig_addr; -- u32 orig_sn, metric, metric_txsta, interval; -+ u32 orig_sn, new_metric, orig_metric, last_hop_metric, interval; - bool root_is_gate; - - ttl = rann->rann_ttl; -@@ -787,7 +791,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - interval = le32_to_cpu(rann->rann_interval); - hopcount = rann->rann_hopcount; - hopcount++; -- metric = le32_to_cpu(rann->rann_metric); -+ orig_metric = le32_to_cpu(rann->rann_metric); - - /* Ignore our own RANNs */ - if (ether_addr_equal(orig_addr, sdata->vif.addr)) -@@ -804,7 +808,10 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - return; - } - -- metric_txsta = airtime_link_metric_get(local, sta); -+ last_hop_metric = airtime_link_metric_get(local, sta); -+ new_metric = orig_metric + last_hop_metric; -+ if (new_metric < orig_metric) -+ new_metric = MAX_METRIC; - - mpath = mesh_path_lookup(sdata, orig_addr); - if (!mpath) { -@@ -817,7 +824,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - } - - if (!(SN_LT(mpath->sn, orig_sn)) && -- !(mpath->sn == orig_sn && metric < mpath->rann_metric)) { -+ !(mpath->sn == orig_sn && new_metric < mpath->rann_metric)) { - rcu_read_unlock(); - return; - } -@@ -835,7 +842,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - } - - mpath->sn = orig_sn; -- mpath->rann_metric = metric + metric_txsta; -+ mpath->rann_metric = new_metric; - mpath->is_root = true; - /* Recording RANNs sender address to send individually - * addressed PREQs destined for root mesh STA */ -@@ -855,7 +862,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, - orig_sn, 0, NULL, 0, broadcast_addr, - hopcount, ttl, interval, -- metric + metric_txsta, 0, sdata); -+ new_metric, 0, sdata); - } - - rcu_read_unlock(); -diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c -index bd3d55eb..9f02e54a 100644 ---- a/net/mac80211/mesh_plink.c -+++ b/net/mac80211/mesh_plink.c -@@ -495,12 +495,14 @@ mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *addr, - - /* Userspace handles station allocation */ - if (sdata->u.mesh.user_mpm || -- sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) -- cfg80211_notify_new_peer_candidate(sdata->dev, addr, -- elems->ie_start, -- elems->total_len, -- GFP_KERNEL); -- else -+ sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) { -+ if (mesh_peer_accepts_plinks(elems) && -+ mesh_plink_availables(sdata)) -+ cfg80211_notify_new_peer_candidate(sdata->dev, addr, -+ elems->ie_start, -+ elems->total_len, -+ GFP_KERNEL); -+ } else - sta = __mesh_sta_info_alloc(sdata, addr); - - return sta; -diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c -index 64bc22ad..16ed43fe 100644 ---- a/net/mac80211/mesh_sync.c -+++ b/net/mac80211/mesh_sync.c -@@ -119,7 +119,6 @@ static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, - */ - - if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) { -- clear_sta_flag(sta, WLAN_STA_TOFFSET_KNOWN); - msync_dbg(sdata, "STA %pM : is adjusting TBTT\n", - sta->sta.addr); - goto no_sync; -@@ -168,11 +167,9 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, - struct beacon_data *beacon) - { - struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; -- u8 cap; - - WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET); - WARN_ON(!rcu_read_lock_held()); -- cap = beacon->meshconf->meshconf_cap; - - spin_lock_bh(&ifmsh->sync_offset_lock); - -@@ -186,21 +183,13 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, - "TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n", - ifmsh->sync_offset_clockdrift_max); - set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags); -- -- ifmsh->adjusting_tbtt = true; - } else { - msync_dbg(sdata, - "TBTT : max clockdrift=%lld; too small to adjust\n", - (long long)ifmsh->sync_offset_clockdrift_max); - ifmsh->sync_offset_clockdrift_max = 0; -- -- ifmsh->adjusting_tbtt = false; - } - spin_unlock_bh(&ifmsh->sync_offset_lock); -- -- beacon->meshconf->meshconf_cap = ifmsh->adjusting_tbtt ? -- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING | cap : -- ~IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING & cap; - } - - static const struct sync_method sync_methods[] = { -diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c -index 83097c38..08384dbf 100644 ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -1021,6 +1021,10 @@ static void ieee80211_chswitch_work(struct work_struct *work) - */ - - if (sdata->reserved_chanctx) { -+ struct ieee80211_supported_band *sband = NULL; -+ struct sta_info *mgd_sta = NULL; -+ enum ieee80211_sta_rx_bandwidth bw = IEEE80211_STA_RX_BW_20; -+ - /* - * with multi-vif csa driver may call ieee80211_csa_finish() - * many times while waiting for other interfaces to use their -@@ -1029,6 +1033,48 @@ static void ieee80211_chswitch_work(struct work_struct *work) - if (sdata->reserved_ready) - goto out; - -+ if (sdata->vif.bss_conf.chandef.width != -+ sdata->csa_chandef.width) { -+ /* -+ * For managed interface, we need to also update the AP -+ * station bandwidth and align the rate scale algorithm -+ * on the bandwidth change. Here we only consider the -+ * bandwidth of the new channel definition (as channel -+ * switch flow does not have the full HT/VHT/HE -+ * information), assuming that if additional changes are -+ * required they would be done as part of the processing -+ * of the next beacon from the AP. -+ */ -+ switch (sdata->csa_chandef.width) { -+ case NL80211_CHAN_WIDTH_20_NOHT: -+ case NL80211_CHAN_WIDTH_20: -+ default: -+ bw = IEEE80211_STA_RX_BW_20; -+ break; -+ case NL80211_CHAN_WIDTH_40: -+ bw = IEEE80211_STA_RX_BW_40; -+ break; -+ case NL80211_CHAN_WIDTH_80: -+ bw = IEEE80211_STA_RX_BW_80; -+ break; -+ case NL80211_CHAN_WIDTH_80P80: -+ case NL80211_CHAN_WIDTH_160: -+ bw = IEEE80211_STA_RX_BW_160; -+ break; -+ } -+ -+ mgd_sta = sta_info_get(sdata, ifmgd->bssid); -+ sband = -+ local->hw.wiphy->bands[sdata->csa_chandef.chan->band]; -+ } -+ -+ if (sdata->vif.bss_conf.chandef.width > -+ sdata->csa_chandef.width) { -+ mgd_sta->sta.bandwidth = bw; -+ rate_control_rate_update(local, sband, mgd_sta, -+ IEEE80211_RC_BW_CHANGED); -+ } -+ - ret = ieee80211_vif_use_reserved_context(sdata); - if (ret) { - sdata_info(sdata, -@@ -1039,6 +1085,13 @@ static void ieee80211_chswitch_work(struct work_struct *work) - goto out; - } - -+ if (sdata->vif.bss_conf.chandef.width < -+ sdata->csa_chandef.width) { -+ mgd_sta->sta.bandwidth = bw; -+ rate_control_rate_update(local, sband, mgd_sta, -+ IEEE80211_RC_BW_CHANGED); -+ } -+ - goto out; - } - -@@ -1051,9 +1104,6 @@ static void ieee80211_chswitch_work(struct work_struct *work) - goto out; - } - -- /* XXX: shouldn't really modify cfg80211-owned data! */ -- ifmgd->associated->channel = sdata->csa_chandef.chan; -- - ifmgd->csa_waiting_bcn = true; - - ieee80211_sta_reset_beacon_monitor(sdata); -@@ -1833,7 +1883,8 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, - params[ac].acm = acm; - params[ac].uapsd = uapsd; - -- if (params[ac].cw_min > params[ac].cw_max) { -+ if (params[ac].cw_min == 0 || -+ params[ac].cw_min > params[ac].cw_max) { - sdata_info(sdata, - "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n", - params[ac].cw_min, params[ac].cw_max, aci); -@@ -2517,7 +2568,7 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata, - } - - static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, -- bool assoc) -+ bool assoc, bool abandon) - { - struct ieee80211_mgd_assoc_data *assoc_data = sdata->u.mgd.assoc_data; - -@@ -2539,6 +2590,9 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, - mutex_lock(&sdata->local->mtx); - ieee80211_vif_release_channel(sdata); - mutex_unlock(&sdata->local->mtx); -+ -+ if (abandon) -+ cfg80211_abandon_assoc(sdata->dev, assoc_data->bss); - } - - kfree(assoc_data); -@@ -2768,7 +2822,7 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, - bssid, reason_code, - ieee80211_get_reason_code_string(reason_code)); - -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - - cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len); - return; -@@ -3173,14 +3227,14 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, - if (status_code != WLAN_STATUS_SUCCESS) { - sdata_info(sdata, "%pM denied association (code=%d)\n", - mgmt->sa, status_code); -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - event.u.mlme.status = MLME_DENIED; - event.u.mlme.reason = status_code; - drv_event_callback(sdata->local, sdata, &event); - } else { - if (!ieee80211_assoc_success(sdata, bss, mgmt, len)) { - /* oops -- internal error -- send timeout for now */ -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - return; - } -@@ -3193,7 +3247,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, - * recalc after assoc_data is NULL but before associated - * is set can cause the interface to go idle - */ -- ieee80211_destroy_assoc_data(sdata, true); -+ ieee80211_destroy_assoc_data(sdata, true, false); - - /* get uapsd queues configuration */ - uapsd_queues = 0; -@@ -3888,7 +3942,7 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) - .u.mlme.status = MLME_TIMEOUT, - }; - -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - drv_event_callback(sdata->local, sdata, &event); - } -@@ -4029,7 +4083,7 @@ void ieee80211_mgd_quiesce(struct ieee80211_sub_if_data *sdata) - WLAN_REASON_DEAUTH_LEAVING, - false, frame_buf); - if (ifmgd->assoc_data) -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - if (ifmgd->auth_data) - ieee80211_destroy_auth_data(sdata, false); - cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf, -@@ -4323,6 +4377,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, - if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data)) - return -EINVAL; - -+ /* If a reconfig is happening, bail out */ -+ if (local->in_reconfig) -+ return -EBUSY; -+ - if (assoc) { - rcu_read_lock(); - have_sta = sta_info_get(sdata, cbss->bssid); -@@ -4905,7 +4963,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, - IEEE80211_STYPE_DEAUTH, - req->reason_code, tx, - frame_buf); -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - ieee80211_report_disconnect(sdata, frame_buf, - sizeof(frame_buf), true, - req->reason_code); -@@ -4980,7 +5038,7 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) - sdata_lock(sdata); - if (ifmgd->assoc_data) { - struct cfg80211_bss *bss = ifmgd->assoc_data->bss; -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - } - if (ifmgd->auth_data) -diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c -index 04401037..b6be5194 100644 ---- a/net/mac80211/offchannel.c -+++ b/net/mac80211/offchannel.c -@@ -469,6 +469,8 @@ void ieee80211_roc_purge(struct ieee80211_local *local, - struct ieee80211_roc_work *roc, *tmp; - LIST_HEAD(tmp_list); - -+ flush_work(&local->hw_roc_start); -+ - mutex_lock(&local->mtx); - list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { - if (sdata && roc->sdata != sdata) -diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c -index 00a43a70..0402fa45 100644 ---- a/net/mac80211/pm.c -+++ b/net/mac80211/pm.c -@@ -168,6 +168,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) - break; - } - -+ flush_delayed_work(&sdata->dec_tailroom_needed_wk); - drv_remove_interface(local, sdata); - } - -diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c -index 2b528389..833ad779 100644 ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -149,6 +149,9 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local, - /* allocate extra bitmaps */ - if (status->chains) - len += 4 * hweight8(status->chains); -+ /* vendor presence bitmap */ -+ if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) -+ len += 4; - - if (ieee80211_have_rx_timestamp(status)) { - len = ALIGN(len, 8); -@@ -185,8 +188,6 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local, - if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) { - struct ieee80211_vendor_radiotap *rtap = (void *)skb->data; - -- /* vendor presence bitmap */ -- len += 4; - /* alignment for fixed 6-byte vendor data header */ - len = ALIGN(len, 2); - /* vendor data header */ -@@ -1109,6 +1110,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx) - return RX_CONTINUE; - - if (ieee80211_is_ctl(hdr->frame_control) || -+ ieee80211_is_nullfunc(hdr->frame_control) || - ieee80211_is_qos_nullfunc(hdr->frame_control) || - is_multicast_ether_addr(hdr->addr1)) - return RX_CONTINUE; -@@ -1455,12 +1457,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) - */ - if (!ieee80211_hw_check(&sta->local->hw, AP_LINK_PS) && - !ieee80211_has_morefrags(hdr->frame_control) && -+ !ieee80211_is_back_req(hdr->frame_control) && - !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) && - (rx->sdata->vif.type == NL80211_IFTYPE_AP || - rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) && -- /* PM bit is only checked in frames where it isn't reserved, -+ /* -+ * PM bit is only checked in frames where it isn't reserved, - * in AP mode it's reserved in non-bufferable management frames - * (cf. IEEE 802.11-2012 8.2.4.1.7 Power Management field) -+ * BAR frames should be ignored as specified in -+ * IEEE 802.11-2012 10.2.1.2. - */ - (!ieee80211_is_mgmt(hdr->frame_control) || - ieee80211_is_bufferable_mmpdu(hdr->frame_control))) { -@@ -2334,7 +2340,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) - skb_set_queue_mapping(skb, q); - - if (!--mesh_hdr->ttl) { -- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl); -+ if (!is_multicast_ether_addr(hdr->addr1)) -+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, -+ dropped_frames_ttl); - goto out; - } - -@@ -3363,6 +3371,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) - } - return true; - case NL80211_IFTYPE_MESH_POINT: -+ if (ether_addr_equal(sdata->vif.addr, hdr->addr2)) -+ return false; - if (multicast) - return true; - return ether_addr_equal(sdata->vif.addr, hdr->addr1); -@@ -3396,6 +3406,27 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) - !ether_addr_equal(bssid, hdr->addr1)) - return false; - } -+ -+ /* -+ * 802.11-2016 Table 9-26 says that for data frames, A1 must be -+ * the BSSID - we've checked that already but may have accepted -+ * the wildcard (ff:ff:ff:ff:ff:ff). -+ * -+ * It also says: -+ * The BSSID of the Data frame is determined as follows: -+ * a) If the STA is contained within an AP or is associated -+ * with an AP, the BSSID is the address currently in use -+ * by the STA contained in the AP. -+ * -+ * So we should not accept data frames with an address that's -+ * multicast. -+ * -+ * Accepting it also opens a security problem because stations -+ * could encrypt it with the GTK and inject traffic that way. -+ */ -+ if (ieee80211_is_data(hdr->frame_control) && multicast) -+ return false; -+ - return true; - case NL80211_IFTYPE_WDS: - if (bssid || !ieee80211_is_data(hdr->frame_control)) -diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c -index 67066d04..7e7b9ef2 100644 ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -329,6 +329,9 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, - - memcpy(sta->addr, addr, ETH_ALEN); - memcpy(sta->sta.addr, addr, ETH_ALEN); -+ sta->sta.max_rx_aggregation_subframes = -+ local->hw.max_rx_aggregation_subframes; -+ - sta->local = local; - sta->sdata = sdata; - sta->rx_stats.last_rx = jiffies; -@@ -658,7 +661,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) - } - - /* No need to do anything if the driver does all */ -- if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) -+ if (ieee80211_hw_check(&local->hw, AP_LINK_PS) && !local->ops->set_tim) - return; - - if (sta->dead) -diff --git a/net/mac80211/status.c b/net/mac80211/status.c -index 5bad05e9..d221300e 100644 ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -194,6 +194,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) - } - - if (ieee80211_is_action(mgmt->frame_control) && -+ !ieee80211_has_protected(mgmt->frame_control) && - mgmt->u.action.category == WLAN_CATEGORY_HT && - mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS && - ieee80211_sdata_running(sdata)) { -@@ -465,11 +466,6 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, - if (!skb) - return; - -- if (dropped) { -- dev_kfree_skb_any(skb); -- return; -- } -- - if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { - u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; - struct ieee80211_sub_if_data *sdata; -@@ -490,6 +486,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, - } - rcu_read_unlock(); - -+ dev_kfree_skb_any(skb); -+ } else if (dropped) { - dev_kfree_skb_any(skb); - } else { - /* consumes skb */ -@@ -650,6 +648,8 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw, - /* Track when last TDLS packet was ACKed */ - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) - sta->status_stats.last_tdls_pkt_time = jiffies; -+ } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { -+ return; - } else { - ieee80211_lost_packet(sta, info); - } -diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h -index 56c6d6cf..913e959b 100644 ---- a/net/mac80211/trace.h -+++ b/net/mac80211/trace.h -@@ -80,7 +80,23 @@ - #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d" - #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx - -- -+#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \ -+ ieee80211_ampdu_mlme_action) \ -+ STA_ENTRY \ -+ __field(u16, tid) \ -+ __field(u16, ssn) \ -+ __field(u8, buf_size) \ -+ __field(bool, amsdu) \ -+ __field(u16, timeout) -+#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \ -+ __entry->tid = params->tid; \ -+ __entry->ssn = params->ssn; \ -+ __entry->buf_size = params->buf_size; \ -+ __entry->amsdu = params->amsdu; \ -+ __entry->timeout = params->timeout; -+#define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d" -+#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \ -+ __entry->buf_size, __entry->amsdu, __entry->timeout - - /* - * Tracing for driver callbacks. -@@ -970,38 +986,25 @@ DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, - TRACE_EVENT(drv_ampdu_action, - TP_PROTO(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu), -+ struct ieee80211_ampdu_params *params), - -- TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size, amsdu), -+ TP_ARGS(local, sdata, params), - - TP_STRUCT__entry( - LOCAL_ENTRY -- STA_ENTRY -- __field(u32, action) -- __field(u16, tid) -- __field(u16, ssn) -- __field(u8, buf_size) -- __field(bool, amsdu) - VIF_ENTRY -+ AMPDU_ACTION_ENTRY - ), - - TP_fast_assign( - LOCAL_ASSIGN; - VIF_ASSIGN; -- STA_ASSIGN; -- __entry->action = action; -- __entry->tid = tid; -- __entry->ssn = ssn ? *ssn : 0; -- __entry->buf_size = buf_size; -- __entry->amsdu = amsdu; -+ AMPDU_ACTION_ASSIGN; - ), - - TP_printk( -- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d amsdu:%d", -- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, -- __entry->tid, __entry->buf_size, __entry->amsdu -+ LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT, -+ LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG - ) - ); - -diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c -index e1225b39..41f3eb56 100644 ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -431,8 +431,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) - if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) - info->hw_queue = tx->sdata->vif.cab_queue; - -- /* no stations in PS mode */ -- if (!atomic_read(&ps->num_sta_ps)) -+ /* no stations in PS mode and no buffered packets */ -+ if (!atomic_read(&ps->num_sta_ps) && skb_queue_empty(&ps->bc_buf)) - return TX_CONTINUE; - - info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM; -@@ -1599,9 +1599,16 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, - int head_need, bool may_encrypt) - { - struct ieee80211_local *local = sdata->local; -+ struct ieee80211_hdr *hdr; -+ bool enc_tailroom; - int tail_need = 0; - -- if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) { -+ hdr = (struct ieee80211_hdr *) skb->data; -+ enc_tailroom = may_encrypt && -+ (sdata->crypto_tx_tailroom_needed_cnt || -+ ieee80211_is_mgmt(hdr->frame_control)); -+ -+ if (enc_tailroom) { - tail_need = IEEE80211_ENCRYPT_TAILROOM; - tail_need -= skb_tailroom(skb); - tail_need = max_t(int, tail_need, 0); -@@ -1609,8 +1616,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, - - if (skb_cloned(skb) && - (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || -- !skb_clone_writable(skb, ETH_HLEN) || -- (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt))) -+ !skb_clone_writable(skb, ETH_HLEN) || enc_tailroom)) - I802_DEBUG_INC(local->tx_expand_skb_head_cloned); - else if (head_need || tail_need) - I802_DEBUG_INC(local->tx_expand_skb_head); -@@ -2699,7 +2705,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, - int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); - int hw_headroom = sdata->local->hw.extra_tx_headroom; - struct ethhdr eth; -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ struct ieee80211_tx_info *info; - struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; - struct ieee80211_tx_data tx; - ieee80211_tx_result r; -@@ -2761,6 +2767,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, - memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); - memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); - -+ info = IEEE80211_SKB_CB(skb); - memset(info, 0, sizeof(*info)); - info->band = fast_tx->band; - info->control.vif = &sdata->vif; -diff --git a/net/mac80211/util.c b/net/mac80211/util.c -index 33344f5a..2214c77d 100644 ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -2006,7 +2006,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) - if (!sta->uploaded) - continue; - -- if (sta->sdata->vif.type != NL80211_IFTYPE_AP) -+ if (sta->sdata->vif.type != NL80211_IFTYPE_AP && -+ sta->sdata->vif.type != NL80211_IFTYPE_AP_VLAN) - continue; - - for (state = IEEE80211_STA_NOTEXIST; -@@ -2663,8 +2664,9 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, - - rate = cfg80211_calculate_bitrate(&ri); - if (WARN_ONCE(!rate, -- "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n", -- status->flag, status->rate_idx, status->vht_nss)) -+ "Invalid bitrate: flags=0x%llx, idx=%d, vht_nss=%d\n", -+ (unsigned long long)status->flag, status->rate_idx, -+ status->vht_nss)) - return 0; - - /* rewind from end of MPDU */ -diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c -index efa3f48f..73e8f347 100644 ---- a/net/mac80211/wep.c -+++ b/net/mac80211/wep.c -@@ -293,7 +293,8 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) - return RX_DROP_UNUSABLE; - ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); - /* remove ICV */ -- if (pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) -+ if (!(status->flag & RX_FLAG_ICV_STRIPPED) && -+ pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) - return RX_DROP_UNUSABLE; - } - -diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c -index d824c389..cb439e06 100644 ---- a/net/mac80211/wpa.c -+++ b/net/mac80211/wpa.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include "ieee80211_i.h" - #include "michael.h" -@@ -152,7 +153,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) - data_len = skb->len - hdrlen - MICHAEL_MIC_LEN; - key = &rx->key->conf.key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY]; - michael_mic(key, hdr, data, data_len, mic); -- if (memcmp(mic, data + data_len, MICHAEL_MIC_LEN) != 0) -+ if (crypto_memneq(mic, data + data_len, MICHAEL_MIC_LEN)) - goto mic_fail; - - /* remove Michael MIC from payload */ -@@ -297,7 +298,8 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx) - return RX_DROP_UNUSABLE; - - /* Trim ICV */ -- skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); -+ if (!(status->flag & RX_FLAG_ICV_STRIPPED)) -+ skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); - - /* Remove IV */ - memmove(skb->data + IEEE80211_TKIP_IV_LEN, skb->data, hdrlen); -@@ -507,25 +509,31 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx, - !ieee80211_is_robust_mgmt_frame(skb)) - return RX_CONTINUE; - -- data_len = skb->len - hdrlen - IEEE80211_CCMP_HDR_LEN - mic_len; -- if (!rx->sta || data_len < 0) -- return RX_DROP_UNUSABLE; -- - if (status->flag & RX_FLAG_DECRYPTED) { - if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_CCMP_HDR_LEN)) - return RX_DROP_UNUSABLE; -+ if (status->flag & RX_FLAG_MIC_STRIPPED) -+ mic_len = 0; - } else { - if (skb_linearize(rx->skb)) - return RX_DROP_UNUSABLE; - } - -+ data_len = skb->len - hdrlen - IEEE80211_CCMP_HDR_LEN - mic_len; -+ if (!rx->sta || data_len < 0) -+ return RX_DROP_UNUSABLE; -+ - if (!(status->flag & RX_FLAG_PN_VALIDATED)) { -+ int res; -+ - ccmp_hdr2pn(pn, skb->data + hdrlen); - - queue = rx->security_idx; - -- if (memcmp(pn, key->u.ccmp.rx_pn[queue], -- IEEE80211_CCMP_PN_LEN) <= 0) { -+ res = memcmp(pn, key->u.ccmp.rx_pn[queue], -+ IEEE80211_CCMP_PN_LEN); -+ if (res < 0 || -+ (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) { - key->u.ccmp.replays++; - return RX_DROP_UNUSABLE; - } -@@ -723,8 +731,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - struct sk_buff *skb = rx->skb; - struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); - u8 pn[IEEE80211_GCMP_PN_LEN]; -- int data_len; -- int queue; -+ int data_len, queue, mic_len = IEEE80211_GCMP_MIC_LEN; - - hdrlen = ieee80211_hdrlen(hdr->frame_control); - -@@ -732,26 +739,31 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - !ieee80211_is_robust_mgmt_frame(skb)) - return RX_CONTINUE; - -- data_len = skb->len - hdrlen - IEEE80211_GCMP_HDR_LEN - -- IEEE80211_GCMP_MIC_LEN; -- if (!rx->sta || data_len < 0) -- return RX_DROP_UNUSABLE; -- - if (status->flag & RX_FLAG_DECRYPTED) { - if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_GCMP_HDR_LEN)) - return RX_DROP_UNUSABLE; -+ if (status->flag & RX_FLAG_MIC_STRIPPED) -+ mic_len = 0; - } else { - if (skb_linearize(rx->skb)) - return RX_DROP_UNUSABLE; - } - -+ data_len = skb->len - hdrlen - IEEE80211_GCMP_HDR_LEN - mic_len; -+ if (!rx->sta || data_len < 0) -+ return RX_DROP_UNUSABLE; -+ - if (!(status->flag & RX_FLAG_PN_VALIDATED)) { -+ int res; -+ - gcmp_hdr2pn(pn, skb->data + hdrlen); - - queue = rx->security_idx; - -- if (memcmp(pn, key->u.gcmp.rx_pn[queue], -- IEEE80211_GCMP_PN_LEN) <= 0) { -+ res = memcmp(pn, key->u.gcmp.rx_pn[queue], -+ IEEE80211_GCMP_PN_LEN); -+ if (res < 0 || -+ (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) { - key->u.gcmp.replays++; - return RX_DROP_UNUSABLE; - } -@@ -775,7 +787,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - } - - /* Remove GCMP header and MIC */ -- if (pskb_trim(skb, skb->len - IEEE80211_GCMP_MIC_LEN)) -+ if (pskb_trim(skb, skb->len - mic_len)) - return RX_DROP_UNUSABLE; - memmove(skb->data + IEEE80211_GCMP_HDR_LEN, skb->data, hdrlen); - skb_pull(skb, IEEE80211_GCMP_HDR_LEN); -@@ -1044,7 +1056,7 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx) - bip_aad(skb, aad); - ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, - skb->data + 24, skb->len - 24, mic); -- if (memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_cmac.icverrors++; - return RX_DROP_UNUSABLE; - } -@@ -1094,7 +1106,7 @@ ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx) - bip_aad(skb, aad); - ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, - skb->data + 24, skb->len - 24, mic); -- if (memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_cmac.icverrors++; - return RX_DROP_UNUSABLE; - } -@@ -1198,7 +1210,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx) - if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, - skb->data + 24, skb->len - 24, - mic) < 0 || -- memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_gmac.icverrors++; - return RX_DROP_UNUSABLE; - } -diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig -index 44c3be9d..598d374f 100644 ---- a/net/rfkill/Kconfig -+++ b/net/rfkill/Kconfig -@@ -10,11 +10,6 @@ menuconfig RFKILL - To compile this driver as a module, choose M here: the - module will be called rfkill. - --config RFKILL_PM -- bool "Power off on suspend" -- depends on RFKILL && PM -- default y -- - # LED trigger support - config RFKILL_LEDS - bool -diff --git a/net/rfkill/core.c b/net/rfkill/core.c -index d778d993..cf5b69ab 100644 ---- a/net/rfkill/core.c -+++ b/net/rfkill/core.c -@@ -802,7 +802,7 @@ void rfkill_resume_polling(struct rfkill *rfkill) - } - EXPORT_SYMBOL(rfkill_resume_polling); - --#ifdef CONFIG_RFKILL_PM -+#ifdef CONFIG_PM_SLEEP - static int rfkill_suspend(struct device *dev) - { - struct rfkill *rfkill = to_rfkill(dev); -@@ -838,9 +838,7 @@ static struct class rfkill_class = { - .dev_release = rfkill_release, - .dev_groups = rfkill_dev_groups, - .dev_uevent = rfkill_dev_uevent, --#ifdef CONFIG_RFKILL_PM - .pm = RFKILL_PM_OPS, --#endif - }; - - bool rfkill_blocked(struct rfkill *rfkill) -diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c -index 93127220..e6e249cc 100644 ---- a/net/rfkill/rfkill-gpio.c -+++ b/net/rfkill/rfkill-gpio.c -@@ -140,13 +140,18 @@ static int rfkill_gpio_probe(struct platform_device *pdev) - - ret = rfkill_register(rfkill->rfkill_dev); - if (ret < 0) -- return ret; -+ goto err_destroy; - - platform_set_drvdata(pdev, rfkill); - - dev_info(&pdev->dev, "%s device registered.\n", rfkill->name); - - return 0; -+ -+err_destroy: -+ rfkill_destroy(rfkill->rfkill_dev); -+ -+ return ret; - } - - static int rfkill_gpio_remove(struct platform_device *pdev) -diff --git a/net/wireless/core.c b/net/wireless/core.c -index 8f0bac7e..a1e909ae 100644 ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -94,6 +94,9 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev, - - ASSERT_RTNL(); - -+ if (strlen(newname) > NL80211_WIPHY_NAME_MAXLEN) -+ return -EINVAL; -+ - /* prohibit calling the thing phy%d when %d is not its number */ - sscanf(newname, PHY_NAME "%d%n", &wiphy_idx, &taken); - if (taken == strlen(newname) && wiphy_idx != rdev->wiphy_idx) { -@@ -390,6 +393,8 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv, - if (rv) - goto use_default_name; - } else { -+ int rv; -+ - use_default_name: - /* NOTE: This is *probably* safe w/out holding rtnl because of - * the restrictions on phy names. Probably this call could -@@ -397,7 +402,11 @@ use_default_name: - * phyX. But, might should add some locking and check return - * value, and use a different name if this one exists? - */ -- dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); -+ rv = dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); -+ if (rv < 0) { -+ kfree(rdev); -+ return NULL; -+ } - } - - INIT_LIST_HEAD(&rdev->wdev_list); -diff --git a/net/wireless/core.h b/net/wireless/core.h -index a618b4b8..47ea169a 100644 ---- a/net/wireless/core.h -+++ b/net/wireless/core.h -@@ -72,6 +72,7 @@ struct cfg80211_registered_device { - struct list_head bss_list; - struct rb_root bss_tree; - u32 bss_generation; -+ u32 bss_entries; - struct cfg80211_scan_request *scan_req; /* protected by RTNL */ - struct sk_buff *scan_msg; - struct cfg80211_sched_scan_request __rcu *sched_scan_req; -@@ -397,6 +398,7 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev); - void cfg80211_sme_deauth(struct wireless_dev *wdev); - void cfg80211_sme_auth_timeout(struct wireless_dev *wdev); - void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev); -+void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev); - - /* internal helpers */ - bool cfg80211_supported_cipher_suite(struct wiphy *wiphy, u32 cipher); -diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c -index fb44fa3b..c0e02f72 100644 ---- a/net/wireless/mlme.c -+++ b/net/wireless/mlme.c -@@ -149,6 +149,18 @@ void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss) - } - EXPORT_SYMBOL(cfg80211_assoc_timeout); - -+void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss) -+{ -+ struct wireless_dev *wdev = dev->ieee80211_ptr; -+ struct wiphy *wiphy = wdev->wiphy; -+ -+ cfg80211_sme_abandon_assoc(wdev); -+ -+ cfg80211_unhold_bss(bss_from_pub(bss)); -+ cfg80211_put_bss(wiphy, bss); -+} -+EXPORT_SYMBOL(cfg80211_abandon_assoc); -+ - void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len) - { - struct wireless_dev *wdev = dev->ieee80211_ptr; -diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c -index bf65f31b..1968998e 100644 ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -302,8 +303,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { - [NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 }, - [NL80211_ATTR_PID] = { .type = NLA_U32 }, - [NL80211_ATTR_4ADDR] = { .type = NLA_U8 }, -- [NL80211_ATTR_PMKID] = { .type = NLA_BINARY, -- .len = WLAN_PMKID_LEN }, -+ [NL80211_ATTR_PMKID] = { .len = WLAN_PMKID_LEN }, - [NL80211_ATTR_DURATION] = { .type = NLA_U32 }, - [NL80211_ATTR_COOKIE] = { .type = NLA_U64 }, - [NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED }, -@@ -359,6 +359,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { - [NL80211_ATTR_SCAN_FLAGS] = { .type = NLA_U32 }, - [NL80211_ATTR_P2P_CTWINDOW] = { .type = NLA_U8 }, - [NL80211_ATTR_P2P_OPPPS] = { .type = NLA_U8 }, -+ [NL80211_ATTR_LOCAL_MESH_POWER_MODE] = {. type = NLA_U32 }, - [NL80211_ATTR_ACL_POLICY] = {. type = NLA_U32 }, - [NL80211_ATTR_MAC_ADDRS] = { .type = NLA_NESTED }, - [NL80211_ATTR_STA_CAPABILITY] = { .type = NLA_U16 }, -@@ -485,6 +486,14 @@ nl80211_plan_policy[NL80211_SCHED_SCAN_PLAN_MAX + 1] = { - [NL80211_SCHED_SCAN_PLAN_ITERATIONS] = { .type = NLA_U32 }, - }; - -+/* policy for packet pattern attributes */ -+static const struct nla_policy -+nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = { -+ [NL80211_PKTPAT_MASK] = { .type = NLA_BINARY, }, -+ [NL80211_PKTPAT_PATTERN] = { .type = NLA_BINARY, }, -+ [NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 }, -+}; -+ - static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - struct netlink_callback *cb, - struct cfg80211_registered_device **rdev, -@@ -492,21 +501,17 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - { - int err; - -- rtnl_lock(); -- - if (!cb->args[0]) { - err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, - nl80211_fam.attrbuf, nl80211_fam.maxattr, - nl80211_policy); - if (err) -- goto out_unlock; -+ return err; - - *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -- if (IS_ERR(*wdev)) { -- err = PTR_ERR(*wdev); -- goto out_unlock; -- } -+ if (IS_ERR(*wdev)) -+ return PTR_ERR(*wdev); - *rdev = wiphy_to_rdev((*wdev)->wiphy); - /* 0 is the first index - add 1 to parse only once */ - cb->args[0] = (*rdev)->wiphy_idx + 1; -@@ -516,10 +521,8 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); - struct wireless_dev *tmp; - -- if (!wiphy) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!wiphy) -+ return -ENODEV; - *rdev = wiphy_to_rdev(wiphy); - *wdev = NULL; - -@@ -530,21 +533,11 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - } - } - -- if (!*wdev) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!*wdev) -+ return -ENODEV; - } - - return 0; -- out_unlock: -- rtnl_unlock(); -- return err; --} -- --static void nl80211_finish_wdev_dump(struct cfg80211_registered_device *rdev) --{ -- rtnl_unlock(); - } - - /* IE validation */ -@@ -1887,20 +1880,22 @@ static const struct nla_policy txq_params_policy[NL80211_TXQ_ATTR_MAX + 1] = { - static int parse_txq_params(struct nlattr *tb[], - struct ieee80211_txq_params *txq_params) - { -+ u8 ac; -+ - if (!tb[NL80211_TXQ_ATTR_AC] || !tb[NL80211_TXQ_ATTR_TXOP] || - !tb[NL80211_TXQ_ATTR_CWMIN] || !tb[NL80211_TXQ_ATTR_CWMAX] || - !tb[NL80211_TXQ_ATTR_AIFS]) - return -EINVAL; - -- txq_params->ac = nla_get_u8(tb[NL80211_TXQ_ATTR_AC]); -+ ac = nla_get_u8(tb[NL80211_TXQ_ATTR_AC]); - txq_params->txop = nla_get_u16(tb[NL80211_TXQ_ATTR_TXOP]); - txq_params->cwmin = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMIN]); - txq_params->cwmax = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMAX]); - txq_params->aifs = nla_get_u8(tb[NL80211_TXQ_ATTR_AIFS]); - -- if (txq_params->ac >= NL80211_NUM_ACS) -+ if (ac >= NL80211_NUM_ACS) - return -EINVAL; -- -+ txq_params->ac = array_index_nospec(ac, NL80211_NUM_ACS); - return 0; - } - -@@ -3583,6 +3578,7 @@ static int parse_station_flags(struct genl_info *info, - params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHENTICATED) | - BIT(NL80211_STA_FLAG_MFP) | - BIT(NL80211_STA_FLAG_AUTHORIZED); -+ break; - default: - return -EINVAL; - } -@@ -3884,9 +3880,10 @@ static int nl80211_dump_station(struct sk_buff *skb, - int sta_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!wdev->netdev) { - err = -EINVAL; -@@ -3922,7 +3919,7 @@ static int nl80211_dump_station(struct sk_buff *skb, - cb->args[2] = sta_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - - return err; - } -@@ -4639,9 +4636,10 @@ static int nl80211_dump_mpath(struct sk_buff *skb, - int path_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!rdev->ops->dump_mpath) { - err = -EOPNOTSUPP; -@@ -4675,7 +4673,7 @@ static int nl80211_dump_mpath(struct sk_buff *skb, - cb->args[2] = path_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return err; - } - -@@ -4835,9 +4833,10 @@ static int nl80211_dump_mpp(struct sk_buff *skb, - int path_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!rdev->ops->dump_mpp) { - err = -EOPNOTSUPP; -@@ -4870,7 +4869,7 @@ static int nl80211_dump_mpp(struct sk_buff *skb, - cb->args[2] = path_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return err; - } - -@@ -5718,6 +5717,10 @@ static int validate_scan_freqs(struct nlattr *freqs) - struct nlattr *attr1, *attr2; - int n_channels = 0, tmp1, tmp2; - -+ nla_for_each_nested(attr1, freqs, tmp1) -+ if (nla_len(attr1) != sizeof(u32)) -+ return 0; -+ - nla_for_each_nested(attr1, freqs, tmp1) { - n_channels++; - /* -@@ -6806,9 +6809,12 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) - int start = cb->args[2], idx = 0; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); -- if (err) -+ if (err) { -+ rtnl_unlock(); - return err; -+ } - - wdev_lock(wdev); - spin_lock_bh(&rdev->bss_lock); -@@ -6831,7 +6837,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) - wdev_unlock(wdev); - - cb->args[2] = idx; -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - - return skb->len; - } -@@ -6915,9 +6921,10 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) - int res; - bool radio_stats; - -+ rtnl_lock(); - res = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (res) -- return res; -+ goto out_err; - - /* prepare_wdev_dump parsed the attributes */ - radio_stats = nl80211_fam.attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS]; -@@ -6958,7 +6965,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) - cb->args[2] = survey_idx; - res = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return res; - } - -@@ -9415,7 +9422,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info) - u8 *mask_pat; - - nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat), -- nla_len(pat), NULL); -+ nla_len(pat), nl80211_packet_pattern_policy); - err = -EINVAL; - if (!pat_tb[NL80211_PKTPAT_MASK] || - !pat_tb[NL80211_PKTPAT_PATTERN]) -@@ -9665,7 +9672,7 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev, - u8 *mask_pat; - - nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat), -- nla_len(pat), NULL); -+ nla_len(pat), nl80211_packet_pattern_policy); - if (!pat_tb[NL80211_PKTPAT_MASK] || - !pat_tb[NL80211_PKTPAT_PATTERN]) - return -EINVAL; -@@ -9791,6 +9798,9 @@ static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) - if (err) - return err; - -+ if (!tb[NL80211_REKEY_DATA_REPLAY_CTR] || !tb[NL80211_REKEY_DATA_KEK] || -+ !tb[NL80211_REKEY_DATA_KCK]) -+ return -EINVAL; - if (nla_len(tb[NL80211_REKEY_DATA_REPLAY_CTR]) != NL80211_REPLAY_CTR_LEN) - return -ERANGE; - if (nla_len(tb[NL80211_REKEY_DATA_KEK]) != NL80211_KEK_LEN) -@@ -10004,6 +10014,7 @@ static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info) - return -EOPNOTSUPP; - - if (!info->attrs[NL80211_ATTR_MDID] || -+ !info->attrs[NL80211_ATTR_IE] || - !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) - return -EINVAL; - -@@ -10158,17 +10169,13 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - void *data = NULL; - unsigned int data_len = 0; - -- rtnl_lock(); -- - if (cb->args[0]) { - /* subtract the 1 again here */ - struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); - struct wireless_dev *tmp; - -- if (!wiphy) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!wiphy) -+ return -ENODEV; - *rdev = wiphy_to_rdev(wiphy); - *wdev = NULL; - -@@ -10189,13 +10196,11 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - nl80211_fam.attrbuf, nl80211_fam.maxattr, - nl80211_policy); - if (err) -- goto out_unlock; -+ return err; - - if (!nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID] || -- !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) { -- err = -EINVAL; -- goto out_unlock; -- } -+ !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) -+ return -EINVAL; - - *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -@@ -10204,10 +10209,8 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - - *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -- if (IS_ERR(*rdev)) { -- err = PTR_ERR(*rdev); -- goto out_unlock; -- } -+ if (IS_ERR(*rdev)) -+ return PTR_ERR(*rdev); - - vid = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID]); - subcmd = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]); -@@ -10220,19 +10223,15 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - if (vcmd->info.vendor_id != vid || vcmd->info.subcmd != subcmd) - continue; - -- if (!vcmd->dumpit) { -- err = -EOPNOTSUPP; -- goto out_unlock; -- } -+ if (!vcmd->dumpit) -+ return -EOPNOTSUPP; - - vcmd_idx = i; - break; - } - -- if (vcmd_idx < 0) { -- err = -EOPNOTSUPP; -- goto out_unlock; -- } -+ if (vcmd_idx < 0) -+ return -EOPNOTSUPP; - - if (nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]) { - data = nla_data(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]); -@@ -10249,9 +10248,6 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - - /* keep rtnl locked in successful case */ - return 0; -- out_unlock: -- rtnl_unlock(); -- return err; - } - - static int nl80211_vendor_cmd_dump(struct sk_buff *skb, -@@ -10266,9 +10262,10 @@ static int nl80211_vendor_cmd_dump(struct sk_buff *skb, - int err; - struct nlattr *vendor_data; - -+ rtnl_lock(); - err = nl80211_prepare_vendor_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out; - - vcmd_idx = cb->args[2]; - data = (void *)cb->args[3]; -@@ -10277,18 +10274,26 @@ static int nl80211_vendor_cmd_dump(struct sk_buff *skb, - - if (vcmd->flags & (WIPHY_VENDOR_CMD_NEED_WDEV | - WIPHY_VENDOR_CMD_NEED_NETDEV)) { -- if (!wdev) -- return -EINVAL; -+ if (!wdev) { -+ err = -EINVAL; -+ goto out; -+ } - if (vcmd->flags & WIPHY_VENDOR_CMD_NEED_NETDEV && -- !wdev->netdev) -- return -EINVAL; -+ !wdev->netdev) { -+ err = -EINVAL; -+ goto out; -+ } - - if (vcmd->flags & WIPHY_VENDOR_CMD_NEED_RUNNING) { - if (wdev->netdev && -- !netif_running(wdev->netdev)) -- return -ENETDOWN; -- if (!wdev->netdev && !wdev->p2p_started) -- return -ENETDOWN; -+ !netif_running(wdev->netdev)) { -+ err = -ENETDOWN; -+ goto out; -+ } -+ if (!wdev->netdev && !wdev->p2p_started) { -+ err = -ENETDOWN; -+ goto out; -+ } - } - } - -@@ -11716,7 +11721,7 @@ static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return; - -@@ -11868,7 +11873,7 @@ void nl80211_send_connect_result(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + req_ie_len + resp_ie_len, gfp); - if (!msg) - return; - -@@ -11908,7 +11913,7 @@ void nl80211_send_roamed(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + req_ie_len + resp_ie_len, gfp); - if (!msg) - return; - -@@ -11946,7 +11951,7 @@ void nl80211_send_disconnected(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); -+ msg = nlmsg_new(100 + ie_len, GFP_KERNEL); - if (!msg) - return; - -@@ -12023,7 +12028,7 @@ void cfg80211_notify_new_peer_candidate(struct net_device *dev, const u8 *addr, - - trace_cfg80211_notify_new_peer_candidate(dev, addr); - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + ie_len, gfp); - if (!msg) - return; - -@@ -12392,7 +12397,7 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return -ENOMEM; - -@@ -12435,7 +12440,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, - - trace_cfg80211_mgmt_tx_status(wdev, cookie, ack); - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return; - -@@ -12783,6 +12788,11 @@ void cfg80211_ch_switch_notify(struct net_device *dev, - - wdev->chandef = *chandef; - wdev->preset_chandef = *chandef; -+ -+ if (wdev->iftype == NL80211_IFTYPE_STATION && -+ !WARN_ON(!wdev->current_bss)) -+ wdev->current_bss->pub.channel = chandef->chan; -+ - nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL, - NL80211_CMD_CH_SWITCH_NOTIFY, 0); - } -@@ -13168,13 +13178,17 @@ static int nl80211_netlink_notify(struct notifier_block * nb, - - list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) { - bool schedule_destroy_work = false; -- bool schedule_scan_stop = false; - struct cfg80211_sched_scan_request *sched_scan_req = - rcu_dereference(rdev->sched_scan_req); - - if (sched_scan_req && notify->portid && -- sched_scan_req->owner_nlportid == notify->portid) -- schedule_scan_stop = true; -+ sched_scan_req->owner_nlportid == notify->portid) { -+ sched_scan_req->owner_nlportid = 0; -+ -+ if (rdev->ops->sched_scan_stop && -+ rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) -+ schedule_work(&rdev->sched_scan_stop_wk); -+ } - - list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) { - cfg80211_mlme_unregister_socket(wdev, notify->portid); -@@ -13205,12 +13219,6 @@ static int nl80211_netlink_notify(struct notifier_block * nb, - spin_unlock(&rdev->destroy_list_lock); - schedule_work(&rdev->destroy_work); - } -- } else if (schedule_scan_stop) { -- sched_scan_req->owner_nlportid = 0; -- -- if (rdev->ops->sched_scan_stop && -- rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) -- schedule_work(&rdev->sched_scan_stop_wk); - } - } - -@@ -13241,7 +13249,7 @@ void cfg80211_ft_event(struct net_device *netdev, - if (!ft_event->target_ap) - return; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); -+ msg = nlmsg_new(100 + ft_event->ric_ies_len, GFP_KERNEL); - if (!msg) - return; - -diff --git a/net/wireless/reg.c b/net/wireless/reg.c -index 06d050da..429abf42 100644 ---- a/net/wireless/reg.c -+++ b/net/wireless/reg.c -@@ -780,7 +780,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range, - * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), - * however it is safe for now to assume that a frequency rule should not be - * part of a frequency's band if the start freq or end freq are off by more -- * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the -+ * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the - * 60 GHz band. - * This resolution can be lowered and should be considered as we add - * regulatory rule support for other "bands". -@@ -795,7 +795,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range, - * with the Channel starting frequency above 45 GHz. - */ - u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? -- 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; -+ 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; - if (abs(freq_khz - freq_range->start_freq_khz) <= limit) - return true; - if (abs(freq_khz - freq_range->end_freq_khz) <= limit) -@@ -2367,6 +2367,7 @@ static int regulatory_hint_core(const char *alpha2) - request->alpha2[0] = alpha2[0]; - request->alpha2[1] = alpha2[1]; - request->initiator = NL80211_REGDOM_SET_BY_CORE; -+ request->wiphy_idx = WIPHY_IDX_INVALID; - - queue_regulatory_request(request); - -diff --git a/net/wireless/scan.c b/net/wireless/scan.c -index 30f96766..8dde12a1 100644 ---- a/net/wireless/scan.c -+++ b/net/wireless/scan.c -@@ -56,7 +56,20 @@ - * also linked into the probe response struct. - */ - --#define IEEE80211_SCAN_RESULT_EXPIRE (7 * HZ) -+/* -+ * Limit the number of BSS entries stored in mac80211. Each one is -+ * a bit over 4k at most, so this limits to roughly 4-5M of memory. -+ * If somebody wants to really attack this though, they'd likely -+ * use small beacons, and only one type of frame, limiting each of -+ * the entries to a much smaller size (in order to generate more -+ * entries in total, so overhead is bigger.) -+ */ -+static int bss_entries_limit = 1000; -+module_param(bss_entries_limit, int, 0644); -+MODULE_PARM_DESC(bss_entries_limit, -+ "limit to number of scan BSS entries (per wiphy, default 1000)"); -+ -+#define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ) - - static void bss_free(struct cfg80211_internal_bss *bss) - { -@@ -136,6 +149,10 @@ static bool __cfg80211_unlink_bss(struct cfg80211_registered_device *rdev, - - list_del_init(&bss->list); - rb_erase(&bss->rbn, &rdev->bss_tree); -+ rdev->bss_entries--; -+ WARN_ONCE((rdev->bss_entries == 0) ^ list_empty(&rdev->bss_list), -+ "rdev bss entries[%d]/list[empty:%d] corruption\n", -+ rdev->bss_entries, list_empty(&rdev->bss_list)); - bss_ref_put(rdev, bss); - return true; - } -@@ -162,6 +179,40 @@ static void __cfg80211_bss_expire(struct cfg80211_registered_device *rdev, - rdev->bss_generation++; - } - -+static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev) -+{ -+ struct cfg80211_internal_bss *bss, *oldest = NULL; -+ bool ret; -+ -+ lockdep_assert_held(&rdev->bss_lock); -+ -+ list_for_each_entry(bss, &rdev->bss_list, list) { -+ if (atomic_read(&bss->hold)) -+ continue; -+ -+ if (!list_empty(&bss->hidden_list) && -+ !bss->pub.hidden_beacon_bss) -+ continue; -+ -+ if (oldest && time_before(oldest->ts, bss->ts)) -+ continue; -+ oldest = bss; -+ } -+ -+ if (WARN_ON(!oldest)) -+ return false; -+ -+ /* -+ * The callers make sure to increase rdev->bss_generation if anything -+ * gets removed (and a new entry added), so there's no need to also do -+ * it here. -+ */ -+ -+ ret = __cfg80211_unlink_bss(rdev, oldest); -+ WARN_ON(!ret); -+ return ret; -+} -+ - void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, - bool send_message) - { -@@ -687,6 +738,7 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - const u8 *ie; - int i, ssidlen; - u8 fold = 0; -+ u32 n_entries = 0; - - ies = rcu_access_pointer(new->pub.beacon_ies); - if (WARN_ON(!ies)) -@@ -710,6 +762,12 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - /* This is the bad part ... */ - - list_for_each_entry(bss, &rdev->bss_list, list) { -+ /* -+ * we're iterating all the entries anyway, so take the -+ * opportunity to validate the list length accounting -+ */ -+ n_entries++; -+ - if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid)) - continue; - if (bss->pub.channel != new->pub.channel) -@@ -738,6 +796,10 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - new->pub.beacon_ies); - } - -+ WARN_ONCE(n_entries != rdev->bss_entries, -+ "rdev bss entries[%d]/list[len:%d] corruption\n", -+ rdev->bss_entries, n_entries); -+ - return true; - } - -@@ -890,7 +952,14 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev, - } - } - -+ if (rdev->bss_entries >= bss_entries_limit && -+ !cfg80211_bss_expire_oldest(rdev)) { -+ kfree(new); -+ goto drop; -+ } -+ - list_add_tail(&new->list, &rdev->bss_list); -+ rdev->bss_entries++; - rb_insert_bss(rdev, new); - found = new; - } -diff --git a/net/wireless/sme.c b/net/wireless/sme.c -index 8020b5b0..18b4a652 100644 ---- a/net/wireless/sme.c -+++ b/net/wireless/sme.c -@@ -39,6 +39,7 @@ struct cfg80211_conn { - CFG80211_CONN_ASSOCIATING, - CFG80211_CONN_ASSOC_FAILED, - CFG80211_CONN_DEAUTH, -+ CFG80211_CONN_ABANDON, - CFG80211_CONN_CONNECTED, - } state; - u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; -@@ -204,6 +205,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) - cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, - NULL, 0, - WLAN_REASON_DEAUTH_LEAVING, false); -+ /* fall through */ -+ case CFG80211_CONN_ABANDON: - /* free directly, disconnected event already sent */ - cfg80211_sme_free(wdev); - return 0; -@@ -423,6 +426,17 @@ void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev) - schedule_work(&rdev->conn_work); - } - -+void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev) -+{ -+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); -+ -+ if (!wdev->conn) -+ return; -+ -+ wdev->conn->state = CFG80211_CONN_ABANDON; -+ schedule_work(&rdev->conn_work); -+} -+ - static int cfg80211_sme_get_conn_ies(struct wireless_dev *wdev, - const u8 *ies, size_t ies_len, - const u8 **out_ies, size_t *out_ies_len) -diff --git a/net/wireless/util.c b/net/wireless/util.c -index baf7218c..1d239564 100644 ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -1360,7 +1360,7 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef, - u8 *op_class) - { - u8 vht_opclass; -- u16 freq = chandef->center_freq1; -+ u32 freq = chandef->center_freq1; - - if (freq >= 2412 && freq <= 2472) { - if (chandef->width > NL80211_CHAN_WIDTH_40) --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0001-remote.patch b/archive-patches/armbox/hd61/0001-remote.patch deleted file mode 100644 index f4b587c..0000000 --- a/archive-patches/armbox/hd61/0001-remote.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - drivers/hisilicon/ir/Kconfig | 29 ----------------------------- - 1 file changed, 29 deletions(-) - -diff --git a/drivers/hisilicon/ir/Kconfig b/drivers/hisilicon/ir/Kconfig -index 57e1fe52..45976f03 100644 ---- a/drivers/hisilicon/ir/Kconfig -+++ b/drivers/hisilicon/ir/Kconfig -@@ -12,35 +12,6 @@ config HISI_IR - ---help--- - Say Y here if you want to use hisilicon remote control. - --if RC_DECODERS --config IR_NEC_2HDR_40BIT_DECODER -- tristate "Enable IR raw decoder for the NEC 2 head 40bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --config IR_NEC_FULL_40BIT_DECODER -- tristate "Enable IR raw decoder for the NEC full 40bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --config IR_NEC_FULL_48BIT_DECODER -- tristate "Enable IR raw decoder for the NEC full 48bit protocol" -- depends on RC_CORE -- select BITREVERSE -- default y -- ---help--- -- Enable this option if you have IR with NEC protocol, and -- if the IR is decoded in software -- --endif #RC_DECODERS - - if HISI_IR - menu "Hisilicon IR key map driver" --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0002-log2-give-up-on-gcc-constant-optimizations.patch b/archive-patches/armbox/hd61/0002-log2-give-up-on-gcc-constant-optimizations.patch deleted file mode 100644 index f6b7b52..0000000 --- a/archive-patches/armbox/hd61/0002-log2-give-up-on-gcc-constant-optimizations.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 05a1328f10d503e2b3156226cef36b0d0c4df7b2 Mon Sep 17 00:00:00 2001 -From: Nicker -Date: Mon, 23 Jul 2018 14:53:12 +0200 -Subject: [PATCH 2/2] log2 give up on gcc constant optimizations - - -diff --git a/include/linux/log2.h b/include/linux/log2.h -index fd7ff3d9..f38fae23 100644 ---- a/include/linux/log2.h -+++ b/include/linux/log2.h -@@ -15,12 +15,6 @@ - #include - #include - --/* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- - /* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented -@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ -diff --git a/tools/include/linux/log2.h b/tools/include/linux/log2.h -index 41446668..d5677d39 100644 ---- a/tools/include/linux/log2.h -+++ b/tools/include/linux/log2.h -@@ -12,12 +12,6 @@ - #ifndef _TOOLS_LINUX_LOG2_H - #define _TOOLS_LINUX_LOG2_H - --/* -- * deal with unrepresentable constant logarithms -- */ --extern __attribute__((const, noreturn)) --int ____ilog2_NaN(void); -- - /* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented -@@ -78,7 +72,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - #define ilog2(n) \ - ( \ - __builtin_constant_p(n) ? ( \ -- (n) < 1 ? ____ilog2_NaN() : \ -+ (n) < 2 ? 0 : \ - (n) & (1ULL << 63) ? 63 : \ - (n) & (1ULL << 62) ? 62 : \ - (n) & (1ULL << 61) ? 61 : \ -@@ -141,10 +135,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) - (n) & (1ULL << 4) ? 4 : \ - (n) & (1ULL << 3) ? 3 : \ - (n) & (1ULL << 2) ? 2 : \ -- (n) & (1ULL << 1) ? 1 : \ -- (n) & (1ULL << 0) ? 0 : \ -- ____ilog2_NaN() \ -- ) : \ -+ 1 ) : \ - (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0003-dont-mark-register-as-const.patch b/archive-patches/armbox/hd61/0003-dont-mark-register-as-const.patch deleted file mode 100644 index 64398f5..0000000 --- a/archive-patches/armbox/hd61/0003-dont-mark-register-as-const.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 94991ba321b4b112656998e586b46107afaa50d6 Mon Sep 17 00:00:00 2001 -From: Nicker -Date: Mon, 23 Jul 2018 15:25:12 +0200 -Subject: [PATCH 3/3] dont mark register as const - - -diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 7fb59199..7665bd2f 100644 ---- a/arch/arm/include/asm/uaccess.h -+++ b/arch/arm/include/asm/uaccess.h -@@ -251,7 +251,7 @@ extern int __put_user_8(void *, unsigned long long); - ({ \ - unsigned long __limit = current_thread_info()->addr_limit - 1; \ - const typeof(*(p)) __user *__tmp_p = (p); \ -- register const typeof(*(p)) __r2 asm("r2") = (x); \ -+ register typeof(*(p)) __r2 asm("r2") = (x); \ - register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \ - register unsigned long __l asm("r1") = __limit; \ - register int __e asm("r0"); \ --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0004-linux-fix-buffer-size-warning-error.patch b/archive-patches/armbox/hd61/0004-linux-fix-buffer-size-warning-error.patch deleted file mode 100644 index ba38a35..0000000 --- a/archive-patches/armbox/hd61/0004-linux-fix-buffer-size-warning-error.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drivers/hisilicon/atags/tag-chiptrim.c -+++ b/drivers/hisilicon/atags/tag-chiptrim.c -@@ -59,7 +59,7 @@ static int __init parse_chiptrim(const struct tag *tag, void *fdt) - int ix; - int ret; - int node; -- char buf[12]; -+ char buf[20]; - - if (tag->hdr.size <= (sizeof(struct tag_header) >> 2)) { - pr_err("%s: bad tag format.\n", __func__); ---- a/drivers/hisilicon/atags/tag-net.c 2020-03-25 11:27:19.138225245 +0000 -+++ b/drivers/hisilicon/atags/tag-net.c 2020-03-25 11:27:02.498266476 +0000 -@@ -91,7 +91,7 @@ - { - int err; - int node, index = 0; -- char path[16]; -+ char path[20]; - char phy_intf[16]; - char *str, *nxt; - int count; --- -2.17.1 diff --git a/archive-patches/armbox/hd61/0005-xbox-one-tuner-4.4.patch b/archive-patches/armbox/hd61/0005-xbox-one-tuner-4.4.patch deleted file mode 100644 index 253f0d5..0000000 --- a/archive-patches/armbox/hd61/0005-xbox-one-tuner-4.4.patch +++ /dev/null @@ -1,238 +0,0 @@ ---- - drivers/media/dvb-core/dvb-usb-ids.h | 2 + - drivers/media/usb/dvb-usb/Kconfig | 2 + - drivers/media/usb/dvb-usb/dib0700.h | 2 + - drivers/media/usb/dvb-usb/dib0700_core.c | 25 ++++- - drivers/media/usb/dvb-usb/dib0700_devices.c | 105 ++++++++++++++++++++ - 5 files changed, 135 insertions(+), 1 deletion(-) - -diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h -index 0a46580b..512275c7 100644 ---- a/drivers/media/dvb-core/dvb-usb-ids.h -+++ b/drivers/media/dvb-core/dvb-usb-ids.h -@@ -70,6 +70,7 @@ - #define USB_VID_EVOLUTEPC 0x1e59 - #define USB_VID_AZUREWAVE 0x13d3 - #define USB_VID_TECHNISAT 0x14f7 -+#define USB_VID_MICROSOFT 0x045e - - /* Product IDs */ - #define USB_PID_ADSTECH_USB2_COLD 0xa333 -@@ -389,4 +390,5 @@ - #define USB_PID_PCTV_2002E_SE 0x025d - #define USB_PID_SVEON_STV27 0xd3af - #define USB_PID_TURBOX_DTT_2000 0xd3a4 -+#define USB_PID_XBOX_ONE_TUNER 0x02d5 - #endif -diff --git a/drivers/media/usb/dvb-usb/Kconfig b/drivers/media/usb/dvb-usb/Kconfig -index 128eee61..d8e3106d 100644 ---- a/drivers/media/usb/dvb-usb/Kconfig -+++ b/drivers/media/usb/dvb-usb/Kconfig -@@ -75,6 +75,7 @@ config DVB_USB_DIB0700 - select DVB_DIB3000MC if MEDIA_SUBDRV_AUTOSELECT - select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT - select DVB_LGDT3305 if MEDIA_SUBDRV_AUTOSELECT -+ select DVB_MN88472 if MEDIA_SUBDRV_AUTOSELECT - select DVB_TUNER_DIB0070 if MEDIA_SUBDRV_AUTOSELECT - select DVB_TUNER_DIB0090 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_MT2060 if MEDIA_SUBDRV_AUTOSELECT -@@ -83,6 +84,7 @@ config DVB_USB_DIB0700 - select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_XC4000 if MEDIA_SUBDRV_AUTOSELECT - select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT -+ select MEDIA_TUNER_TDA18250 if MEDIA_SUBDRV_AUTOSELECT - help - Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The - USB bridge is also present in devices having the DiB7700 DVB-T-USB -diff --git a/drivers/media/usb/dvb-usb/dib0700.h b/drivers/media/usb/dvb-usb/dib0700.h -index 8fd8f5b4..5f291284 100644 ---- a/drivers/media/usb/dvb-usb/dib0700.h -+++ b/drivers/media/usb/dvb-usb/dib0700.h -@@ -51,6 +51,8 @@ struct dib0700_state { - int (*read_status)(struct dvb_frontend *, enum fe_status *); - int (*sleep)(struct dvb_frontend* fe); - u8 buf[255]; -+ struct i2c_client *i2c_client_demod; -+ struct i2c_client *i2c_client_tuner; - }; - - extern int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion, -diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c -index 49dd3ea2..e4f3793a 100644 ---- a/drivers/media/usb/dvb-usb/dib0700_core.c -+++ b/drivers/media/usb/dvb-usb/dib0700_core.c -@@ -875,10 +875,33 @@ static int dib0700_probe(struct usb_interface *intf, - return -ENODEV; - } - -+static void dib0700_disconnect(struct usb_interface *intf) -+{ -+ struct dvb_usb_device *d = usb_get_intfdata(intf); -+ struct dib0700_state *st = d->priv; -+ struct i2c_client *client; -+ -+ /* remove I2C client for tuner */ -+ client = st->i2c_client_tuner; -+ if (client) { -+ module_put(client->dev.driver->owner); -+ i2c_unregister_device(client); -+ } -+ -+ /* remove I2C client for demodulator */ -+ client = st->i2c_client_demod; -+ if (client) { -+ module_put(client->dev.driver->owner); -+ i2c_unregister_device(client); -+ } -+ -+ dvb_usb_device_exit(intf); -+} -+ - static struct usb_driver dib0700_driver = { - .name = "dvb_usb_dib0700", - .probe = dib0700_probe, -- .disconnect = dvb_usb_device_exit, -+ .disconnect = dib0700_disconnect, - .id_table = dib0700_usb_id_table, - }; - -diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c -index e1316c7b..2b6c9d3c 100644 ---- a/drivers/media/usb/dvb-usb/dib0700_devices.c -+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c -@@ -23,6 +23,8 @@ - #include "dib0090.h" - #include "lgdt3305.h" - #include "mxl5007t.h" -+#include "mn88472.h" -+#include "tda18250.h" - - static int force_lna_activation; - module_param(force_lna_activation, int, 0644); -@@ -3714,6 +3716,89 @@ static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) - &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; - } - -+static int xbox_one_attach(struct dvb_usb_adapter *adap) -+{ -+ struct dib0700_state *st = adap->dev->priv; -+ struct i2c_client *client_demod, *client_tuner; -+ struct dvb_usb_device *d = adap->dev; -+ struct mn88472_config mn88472_config = { }; -+ struct tda18250_config tda18250_config; -+ struct i2c_board_info info; -+ -+ st->fw_use_new_i2c_api = 1; -+ st->disable_streaming_master_mode = 1; -+ -+ /* fe power enable */ -+ dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); -+ msleep(30); -+ -+ /* demod reset */ -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); -+ msleep(30); -+ dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); -+ msleep(30); -+ -+ /* attach demod */ -+ mn88472_config.fe = &adap->fe_adap[0].fe; -+ mn88472_config.i2c_wr_max = 22; -+ mn88472_config.xtal = 20500000; -+ mn88472_config.ts_mode = PARALLEL_TS_MODE; -+ mn88472_config.ts_clock = FIXED_TS_CLOCK; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "mn88472", I2C_NAME_SIZE); -+ info.addr = 0x18; -+ info.platform_data = &mn88472_config; -+ request_module(info.type); -+ client_demod = i2c_new_device(&d->i2c_adap, &info); -+ if (client_demod == NULL || client_demod->dev.driver == NULL) -+ goto fail_demod_device; -+ if (!try_module_get(client_demod->dev.driver->owner)) -+ goto fail_demod_module; -+ -+ st->i2c_client_demod = client_demod; -+ -+ adap->fe_adap[0].fe = mn88472_config.get_dvb_frontend(client_demod); -+ -+ /* attach tuner */ -+ memset(&tda18250_config, 0, sizeof(tda18250_config)); -+ tda18250_config.if_dvbt_6 = 3950; -+ tda18250_config.if_dvbt_7 = 4450; -+ tda18250_config.if_dvbt_8 = 4950; -+ tda18250_config.if_dvbc_6 = 4950; -+ tda18250_config.if_dvbc_8 = 4950; -+ tda18250_config.if_atsc = 4079; -+ tda18250_config.loopthrough = true; -+ tda18250_config.xtal_freq = TDA18250_XTAL_FREQ_27MHZ; -+ tda18250_config.fe = adap->fe_adap[0].fe; -+ -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "tda18250", I2C_NAME_SIZE); -+ info.addr = 0x60; -+ info.platform_data = &tda18250_config; -+ -+ request_module(info.type); -+ client_tuner = i2c_new_device(&adap->dev->i2c_adap, &info); -+ if (client_tuner == NULL || client_tuner->dev.driver == NULL) -+ goto fail_tuner_device; -+ if (!try_module_get(client_tuner->dev.driver->owner)) -+ goto fail_tuner_module; -+ -+ st->i2c_client_tuner = client_tuner; -+ return 0; -+ -+fail_tuner_module: -+ i2c_unregister_device(client_tuner); -+fail_tuner_device: -+ module_put(client_demod->dev.driver->owner); -+fail_demod_module: -+ i2c_unregister_device(client_demod); -+fail_demod_device: -+ return -ENODEV; -+} - - /* DVB-USB and USB stuff follows */ - struct usb_device_id dib0700_usb_id_table[] = { -@@ -3803,6 +3888,7 @@ struct usb_device_id dib0700_usb_id_table[] = { - /* 80 */{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT_2) }, - { USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_2002E) }, - { USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_2002E_SE) }, -+ { USB_DEVICE(USB_VID_MICROSOFT, USB_PID_XBOX_ONE_TUNER) }, - { 0 } /* Terminating entry */ - }; - MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); -@@ -4968,6 +5054,25 @@ struct dvb_usb_device_properties dib0700_devices[] = { - RC_BIT_NEC, - .change_protocol = dib0700_change_protocol, - }, -+ }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, -+ .num_adapters = 1, -+ .adapter = { -+ { -+ .num_frontends = 1, -+ .fe = {{ -+ .frontend_attach = xbox_one_attach, -+ -+ DIB0700_DEFAULT_STREAMING_CONFIG(0x82), -+ } }, -+ }, -+ }, -+ .num_device_descs = 1, -+ .devices = { -+ { "Microsoft Xbox One Digital TV Tuner", -+ { &dib0700_usb_id_table[83], NULL }, -+ { NULL }, -+ }, -+ }, - }, - }; - --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch b/archive-patches/armbox/hd61/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch deleted file mode 100644 index 9ac432c..0000000 --- a/archive-patches/armbox/hd61/0006-dvb-media-tda18250-support-for-new-silicon-tuner.patch +++ /dev/null @@ -1,1192 +0,0 @@ -From f724afe58782ccbcb2f0aaea9cca204b35859904 Mon Sep 17 00:00:00 2001 -From: Olli Salonen -Date: Thu, 23 Nov 2017 03:24:45 -0500 -Subject: [PATCH 2/4] media: tda18250: support for new silicon tuner - -NXP TDA18250 silicon tuner driver. - -Version 4 includes some checkpatch fixes. - -Signed-off-by: Olli Salonen -Signed-off-by: Mauro Carvalho Chehab ---- - MAINTAINERS | 9 + - drivers/media/tuners/Kconfig | 7 + - drivers/media/tuners/Makefile | 1 + - drivers/media/tuners/tda18250.c | 902 +++++++++++++++++++++++++++ - drivers/media/tuners/tda18250.h | 51 ++ - drivers/media/tuners/tda18250_priv.h | 145 +++++ - 6 files changed, 1115 insertions(+) - create mode 100644 drivers/media/tuners/tda18250.c - create mode 100644 drivers/media/tuners/tda18250.h - create mode 100644 drivers/media/tuners/tda18250_priv.h - -diff --git a/MAINTAINERS b/MAINTAINERS -index 4764180d..9a0a8f15 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -10450,6 +10450,15 @@ T: git git://linuxtv.org/anttip/media_tree.git - S: Maintained - F: drivers/media/tuners/tda18218* - -+TDA18250 MEDIA DRIVER -+M: Olli Salonen -+L: linux-media@vger.kernel.org -+W: https://linuxtv.org -+Q: http://patchwork.linuxtv.org/project/linux-media/list/ -+T: git git://linuxtv.org/media_tree.git -+S: Maintained -+F: drivers/media/tuners/tda18250* -+ - TDA18271 MEDIA DRIVER - M: Michael Krufky - L: linux-media@vger.kernel.org -diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig -index 05998f02..6687514d 100644 ---- a/drivers/media/tuners/Kconfig -+++ b/drivers/media/tuners/Kconfig -@@ -26,6 +26,13 @@ config MEDIA_TUNER_SIMPLE - help - Say Y here to include support for various simple tuners. - -+config MEDIA_TUNER_TDA18250 -+ tristate "NXP TDA18250 silicon tuner" -+ depends on MEDIA_SUPPORT && I2C -+ default m if !MEDIA_SUBDRV_AUTOSELECT -+ help -+ Say Y here to include support for TDA18250 tuner. -+ - config MEDIA_TUNER_TDA8290 - tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo" - depends on MEDIA_SUPPORT && I2C -diff --git a/drivers/media/tuners/Makefile b/drivers/media/tuners/Makefile -index 06a9ab65..4b9444be 100644 ---- a/drivers/media/tuners/Makefile -+++ b/drivers/media/tuners/Makefile -@@ -41,6 +41,7 @@ obj-$(CONFIG_MEDIA_TUNER_R820T) += r820t.o - obj-$(CONFIG_MEDIA_TUNER_MXL301RF) += mxl301rf.o - obj-$(CONFIG_MEDIA_TUNER_QM1D1C0042) += qm1d1c0042.o - obj-$(CONFIG_MEDIA_TUNER_M88RS6000T) += m88rs6000t.o -+obj-$(CONFIG_MEDIA_TUNER_TDA18250) += tda18250.o - - ccflags-y += -I$(srctree)/drivers/media/dvb-core - ccflags-y += -I$(srctree)/drivers/media/dvb-frontends -diff --git a/drivers/media/tuners/tda18250.c b/drivers/media/tuners/tda18250.c -new file mode 100644 -index 00000000..20d12b06 ---- /dev/null -+++ b/drivers/media/tuners/tda18250.c -@@ -0,0 +1,902 @@ -+/* -+ * NXP TDA18250 silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#include "tda18250_priv.h" -+#include -+ -+static const struct dvb_tuner_ops tda18250_ops; -+ -+static int tda18250_power_control(struct dvb_frontend *fe, -+ unsigned int power_state) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ unsigned int utmp; -+ -+ dev_dbg(&client->dev, "power state: %d", power_state); -+ -+ switch (power_state) { -+ case TDA18250_POWER_NORMAL: -+ ret = regmap_write_bits(dev->regmap, R06_POWER2, 0x07, 0x00); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R25_REF, 0xc0, 0xc0); -+ if (ret) -+ goto err; -+ break; -+ case TDA18250_POWER_STANDBY: -+ if (dev->loopthrough) { -+ ret = regmap_write_bits(dev->regmap, -+ R25_REF, 0xc0, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R06_POWER2, 0x07, 0x02); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R10_LT1, 0x80, 0x00); -+ if (ret) -+ goto err; -+ } else { -+ ret = regmap_write_bits(dev->regmap, -+ R25_REF, 0xc0, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R06_POWER2, 0x07, 0x01); -+ if (ret) -+ goto err; -+ ret = regmap_read(dev->regmap, -+ R0D_AGC12, &utmp); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R0D_AGC12, 0x03, 0x03); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R10_LT1, 0x80, 0x80); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, -+ R0D_AGC12, 0x03, utmp & 0x03); -+ if (ret) -+ goto err; -+ } -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_wait_for_irq(struct dvb_frontend *fe, -+ int maxwait, int step, u8 irq) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ unsigned long timeout; -+ bool triggered; -+ unsigned int utmp; -+ -+ triggered = false; -+ timeout = jiffies + msecs_to_jiffies(maxwait); -+ while (!time_after(jiffies, timeout)) { -+ // check for the IRQ -+ ret = regmap_read(dev->regmap, R08_IRQ1, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & irq) == irq) { -+ triggered = true; -+ break; -+ } -+ msleep(step); -+ } -+ -+ dev_dbg(&client->dev, "waited IRQ (0x%02x) %d ms, triggered: %s", irq, -+ jiffies_to_msecs(jiffies) - -+ (jiffies_to_msecs(timeout) - maxwait), -+ triggered ? "true" : "false"); -+ -+ if (!triggered) -+ return -ETIMEDOUT; -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_init(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret, i; -+ -+ /* default values for various regs */ -+ static const u8 init_regs[][2] = { -+ { R0C_AGC11, 0xc7 }, -+ { R0D_AGC12, 0x5d }, -+ { R0E_AGC13, 0x40 }, -+ { R0F_AGC14, 0x0e }, -+ { R10_LT1, 0x47 }, -+ { R11_LT2, 0x4e }, -+ { R12_AGC21, 0x26 }, -+ { R13_AGC22, 0x60 }, -+ { R18_AGC32, 0x37 }, -+ { R19_AGC33, 0x09 }, -+ { R1A_AGCK, 0x00 }, -+ { R1E_WI_FI, 0x29 }, -+ { R1F_RF_BPF, 0x06 }, -+ { R20_IR_MIX, 0xc6 }, -+ { R21_IF_AGC, 0x00 }, -+ { R2C_PS1, 0x75 }, -+ { R2D_PS2, 0x06 }, -+ { R2E_PS3, 0x07 }, -+ { R30_RSSI2, 0x0e }, -+ { R31_IRQ_CTRL, 0x00 }, -+ { R39_SD5, 0x00 }, -+ { R3B_REGU, 0x55 }, -+ { R3C_RCCAL1, 0xa7 }, -+ { R3F_IRCAL2, 0x85 }, -+ { R40_IRCAL3, 0x87 }, -+ { R41_IRCAL4, 0xc0 }, -+ { R43_PD1, 0x40 }, -+ { R44_PD2, 0xc0 }, -+ { R46_CPUMP, 0x0c }, -+ { R47_LNAPOL, 0x64 }, -+ { R4B_XTALOSC1, 0x30 }, -+ { R59_AGC2_UP2, 0x05 }, -+ { R5B_AGC_AUTO, 0x07 }, -+ { R5C_AGC_DEBUG, 0x00 }, -+ }; -+ -+ /* crystal related regs depend on frequency */ -+ static const u8 xtal_regs[][5] = { -+ /* reg: 4d 4e 4f 50 51 */ -+ [TDA18250_XTAL_FREQ_16MHZ] = { 0x3e, 0x80, 0x50, 0x00, 0x20 }, -+ [TDA18250_XTAL_FREQ_24MHZ] = { 0x5d, 0xc0, 0xec, 0x00, 0x18 }, -+ [TDA18250_XTAL_FREQ_25MHZ] = { 0x61, 0xa8, 0xec, 0x80, 0x19 }, -+ [TDA18250_XTAL_FREQ_27MHZ] = { 0x69, 0x78, 0x8d, 0x80, 0x1b }, -+ [TDA18250_XTAL_FREQ_30MHZ] = { 0x75, 0x30, 0x8f, 0x00, 0x1e }, -+ }; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ ret = tda18250_power_control(fe, TDA18250_POWER_NORMAL); -+ if (ret) -+ goto err; -+ -+ msleep(20); -+ -+ if (dev->warm) -+ goto warm; -+ -+ /* set initial register values */ -+ for (i = 0; i < ARRAY_SIZE(init_regs); i++) { -+ ret = regmap_write(dev->regmap, init_regs[i][0], -+ init_regs[i][1]); -+ if (ret) -+ goto err; -+ } -+ -+ /* set xtal related regs */ -+ ret = regmap_bulk_write(dev->regmap, R4D_XTALFLX1, -+ xtal_regs[dev->xtal_freq], 5); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R10_LT1, 0x80, -+ dev->loopthrough ? 0x00 : 0x80); -+ if (ret) -+ goto err; -+ -+ /* clear IRQ */ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_HW_INIT); -+ if (ret) -+ goto err; -+ -+ /* start HW init */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x70); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_HW_INIT); -+ if (ret) -+ goto err; -+ -+ /* tuner calibration */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x02); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_CAL); -+ if (ret) -+ goto err; -+ -+ dev->warm = true; -+ -+warm: -+ /* power up LNA */ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x80, 0x00); -+ if (ret) -+ goto err; -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_set_agc(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ u8 utmp, utmp2; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ ret = regmap_write_bits(dev->regmap, R1F_RF_BPF, 0x87, 0x06); -+ if (ret) -+ goto err; -+ -+ utmp = ((c->frequency < 100000000) && -+ ((c->delivery_system == SYS_DVBC_ANNEX_A) || -+ (c->delivery_system == SYS_DVBC_ANNEX_C)) && -+ (c->bandwidth_hz == 6000000)) ? 0x80 : 0x00; -+ ret = regmap_write(dev->regmap, R5A_H3H5, utmp); -+ if (ret) -+ goto err; -+ -+ /* AGC1 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 4; -+ break; -+ default: /* DVB-C/QAM */ -+ switch (c->bandwidth_hz) { -+ case 6000000: -+ utmp = (c->frequency < 800000000) ? 6 : 4; -+ break; -+ default: /* 7.935 and 8 MHz */ -+ utmp = (c->frequency < 100000000) ? 2 : 3; -+ break; -+ } -+ break; -+ } -+ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x07, utmp); -+ if (ret) -+ goto err; -+ -+ /* AGC2 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = (c->frequency < 320000000) ? 20 : 16; -+ utmp2 = (c->frequency < 320000000) ? 22 : 18; -+ break; -+ default: /* DVB-C/QAM */ -+ switch (c->bandwidth_hz) { -+ case 6000000: -+ if (c->frequency < 600000000) { -+ utmp = 18; -+ utmp2 = 22; -+ } else if (c->frequency < 800000000) { -+ utmp = 16; -+ utmp2 = 20; -+ } else { -+ utmp = 14; -+ utmp2 = 16; -+ } -+ break; -+ default: /* 7.935 and 8 MHz */ -+ utmp = (c->frequency < 320000000) ? 16 : 18; -+ utmp2 = (c->frequency < 320000000) ? 18 : 20; -+ break; -+ } -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R58_AGC2_UP1, 0x1f, utmp2+8); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R13_AGC22, 0x1f, utmp); -+ if (ret) -+ goto err; -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x1f, utmp2); -+ if (ret) -+ goto err; -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 98; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 90; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R16_AGC25, 0xf8, utmp); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R12_AGC21, 0x60, -+ (c->frequency > 800000000) ? 0x40 : 0x20); -+ if (ret) -+ goto err; -+ -+ /* AGC3 */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = (c->frequency < 320000000) ? 5 : 7; -+ utmp2 = (c->frequency < 320000000) ? 10 : 12; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 7; -+ utmp2 = 12; -+ break; -+ } -+ ret = regmap_write(dev->regmap, R17_AGC31, (utmp << 4) | utmp2); -+ if (ret) -+ goto err; -+ -+ /* S2D */ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 8000000) -+ utmp = 0x04; -+ else -+ utmp = (c->frequency < 320000000) ? 0x04 : 0x02; -+ break; -+ default: /* DVB-C/QAM */ -+ if (c->bandwidth_hz == 6000000) -+ utmp = ((c->frequency > 172544000) && -+ (c->frequency < 320000000)) ? 0x04 : 0x02; -+ else /* 7.935 and 8 MHz */ -+ utmp = ((c->frequency > 320000000) && -+ (c->frequency < 600000000)) ? 0x02 : 0x04; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R20_IR_MIX, 0x06, utmp); -+ if (ret) -+ goto err; -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ utmp = 0; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = (c->frequency < 600000000) ? 0 : 3; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R16_AGC25, 0x03, utmp); -+ if (ret) -+ goto err; -+ -+ utmp = 0x09; -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 8000000) -+ utmp = 0x0c; -+ break; -+ default: /* DVB-C/QAM */ -+ utmp = 0x0c; -+ break; -+ } -+ ret = regmap_write_bits(dev->regmap, R0F_AGC14, 0x3f, utmp); -+ if (ret) -+ goto err; -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_pll_calc(struct dvb_frontend *fe, u8 *rdiv, -+ u8 *ndiv, u8 *icp) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ unsigned int uval, exp, lopd, scale; -+ unsigned long fvco; -+ -+ ret = regmap_read(dev->regmap, R34_MD1, &uval); -+ if (ret) -+ goto err; -+ -+ exp = (uval & 0x70) >> 4; -+ if (exp > 5) -+ exp = 0; -+ lopd = 1 << (exp - 1); -+ scale = uval & 0x0f; -+ fvco = lopd * scale * ((c->frequency / 1000) + dev->if_frequency); -+ -+ switch (dev->xtal_freq) { -+ case TDA18250_XTAL_FREQ_16MHZ: -+ *rdiv = 1; -+ *ndiv = 0; -+ *icp = (fvco < 6622000) ? 0x05 : 0x02; -+ break; -+ case TDA18250_XTAL_FREQ_24MHZ: -+ case TDA18250_XTAL_FREQ_25MHZ: -+ *rdiv = 3; -+ *ndiv = 1; -+ *icp = (fvco < 6622000) ? 0x05 : 0x02; -+ break; -+ case TDA18250_XTAL_FREQ_27MHZ: -+ if (fvco < 6643000) { -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = 0x05; -+ } else if (fvco < 6811000) { -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = 0x06; -+ } else { -+ *rdiv = 3; -+ *ndiv = 1; -+ *icp = 0x02; -+ } -+ break; -+ case TDA18250_XTAL_FREQ_30MHZ: -+ *rdiv = 2; -+ *ndiv = 0; -+ *icp = (fvco < 6811000) ? 0x05 : 0x02; -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ dev_dbg(&client->dev, -+ "lopd=%d scale=%u fvco=%lu, rdiv=%d ndiv=%d icp=%d", -+ lopd, scale, fvco, *rdiv, *ndiv, *icp); -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_set_params(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ u32 if_khz; -+ int ret; -+ unsigned int i, j; -+ u8 utmp; -+ u8 buf[3]; -+ -+ #define REG 0 -+ #define MASK 1 -+ #define DVBT_6 2 -+ #define DVBT_7 3 -+ #define DVBT_8 4 -+ #define DVBC_6 5 -+ #define DVBC_8 6 -+ #define ATSC 7 -+ -+ static const u8 delsys_params[][16] = { -+ [REG] = { 0x22, 0x23, 0x24, 0x21, 0x0d, 0x0c, 0x0f, 0x14, -+ 0x0e, 0x12, 0x58, 0x59, 0x1a, 0x19, 0x1e, 0x30 }, -+ [MASK] = { 0x77, 0xff, 0xff, 0x87, 0xf0, 0x78, 0x07, 0xe0, -+ 0x60, 0x0f, 0x60, 0x0f, 0x33, 0x30, 0x80, 0x06 }, -+ [DVBT_6] = { 0x51, 0x03, 0x83, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x60, 0x0f, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBT_7] = { 0x52, 0x03, 0x85, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x60, 0x0f, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBT_8] = { 0x53, 0x03, 0x87, 0x82, 0x40, 0x48, 0x06, 0xe0, -+ 0x60, 0x07, 0x60, 0x05, 0x03, 0x10, 0x00, 0x04 }, -+ [DVBC_6] = { 0x32, 0x05, 0x86, 0x82, 0x50, 0x00, 0x06, 0x60, -+ 0x40, 0x0e, 0x60, 0x05, 0x33, 0x10, 0x00, 0x04 }, -+ [DVBC_8] = { 0x53, 0x03, 0x88, 0x82, 0x50, 0x00, 0x06, 0x60, -+ 0x40, 0x0e, 0x60, 0x05, 0x33, 0x10, 0x00, 0x04 }, -+ [ATSC] = { 0x51, 0x03, 0x83, 0x82, 0x40, 0x48, 0x01, 0xe0, -+ 0x40, 0x0e, 0x60, 0x05, 0x03, 0x00, 0x80, 0x04 }, -+ }; -+ -+ dev_dbg(&client->dev, -+ "delivery_system=%d frequency=%u bandwidth_hz=%u", -+ c->delivery_system, c->frequency, c->bandwidth_hz); -+ -+ -+ switch (c->delivery_system) { -+ case SYS_ATSC: -+ j = ATSC; -+ if_khz = dev->if_atsc; -+ break; -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ if (c->bandwidth_hz == 0) { -+ ret = -EINVAL; -+ goto err; -+ } else if (c->bandwidth_hz <= 6000000) { -+ j = DVBT_6; -+ if_khz = dev->if_dvbt_6; -+ } else if (c->bandwidth_hz <= 7000000) { -+ j = DVBT_7; -+ if_khz = dev->if_dvbt_7; -+ } else if (c->bandwidth_hz <= 8000000) { -+ j = DVBT_8; -+ if_khz = dev->if_dvbt_8; -+ } else { -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ case SYS_DVBC_ANNEX_A: -+ case SYS_DVBC_ANNEX_C: -+ if (c->bandwidth_hz == 0) { -+ ret = -EINVAL; -+ goto err; -+ } else if (c->bandwidth_hz <= 6000000) { -+ j = DVBC_6; -+ if_khz = dev->if_dvbc_6; -+ } else if (c->bandwidth_hz <= 8000000) { -+ j = DVBC_8; -+ if_khz = dev->if_dvbc_8; -+ } else { -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ default: -+ ret = -EINVAL; -+ dev_err(&client->dev, "unsupported delivery system=%d", -+ c->delivery_system); -+ goto err; -+ } -+ -+ /* set delivery system dependent registers */ -+ for (i = 0; i < 16; i++) { -+ ret = regmap_write_bits(dev->regmap, delsys_params[REG][i], -+ delsys_params[MASK][i], delsys_params[j][i]); -+ if (ret) -+ goto err; -+ } -+ -+ /* set IF if needed */ -+ if (dev->if_frequency != if_khz) { -+ utmp = DIV_ROUND_CLOSEST(if_khz, 50); -+ ret = regmap_write(dev->regmap, R26_IF, utmp); -+ if (ret) -+ goto err; -+ dev->if_frequency = if_khz; -+ dev_dbg(&client->dev, "set IF=%u kHz", if_khz); -+ -+ } -+ -+ ret = tda18250_set_agc(fe); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R1A_AGCK, 0x03, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x40, 0x00); -+ if (ret) -+ goto err; -+ -+ /* set frequency */ -+ buf[0] = ((c->frequency / 1000) >> 16) & 0xff; -+ buf[1] = ((c->frequency / 1000) >> 8) & 0xff; -+ buf[2] = ((c->frequency / 1000) >> 0) & 0xff; -+ ret = regmap_bulk_write(dev->regmap, R27_RF1, buf, 3); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* initial tune */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* calc ndiv and rdiv */ -+ ret = tda18250_pll_calc(fe, &buf[0], &buf[1], &buf[2]); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R4F_XTALFLX3, 0xe0, -+ (buf[0] << 6) | (buf[1] << 5)); -+ if (ret) -+ goto err; -+ -+ /* clear IRQ */ -+ ret = regmap_write(dev->regmap, R0A_IRQ3, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R46_CPUMP, 0x07, 0x00); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R39_SD5, 0x03, 0x00); -+ if (ret) -+ goto err; -+ -+ /* tune again */ -+ ret = regmap_write(dev->regmap, R2A_MSM1, 0x01); /* tune */ -+ if (ret) -+ goto err; -+ -+ ret = regmap_write(dev->regmap, R2B_MSM2, 0x01); /* go */ -+ if (ret) -+ goto err; -+ -+ ret = tda18250_wait_for_irq(fe, 500, 10, TDA18250_IRQ_TUNE); -+ if (ret) -+ goto err; -+ -+ /* pll locking */ -+ msleep(20); -+ -+ ret = regmap_write_bits(dev->regmap, R2B_MSM2, 0x04, 0x04); -+ if (ret) -+ goto err; -+ -+ msleep(20); -+ -+ /* restore AGCK */ -+ ret = regmap_write_bits(dev->regmap, R1A_AGCK, 0x03, 0x03); -+ if (ret) -+ goto err; -+ -+ ret = regmap_write_bits(dev->regmap, R14_AGC23, 0x40, 0x40); -+ if (ret) -+ goto err; -+ -+ /* charge pump */ -+ ret = regmap_write_bits(dev->regmap, R46_CPUMP, 0x07, buf[2]); -+ -+ return 0; -+err: -+ return ret; -+} -+ -+static int tda18250_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ -+ *frequency = dev->if_frequency * 1000; -+ return 0; -+} -+ -+static int tda18250_sleep(struct dvb_frontend *fe) -+{ -+ struct i2c_client *client = fe->tuner_priv; -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ int ret; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ /* power down LNA */ -+ ret = regmap_write_bits(dev->regmap, R0C_AGC11, 0x80, 0x00); -+ if (ret) -+ return ret; -+ -+ /* set if freq to 0 in order to make sure it's set after wake up */ -+ dev->if_frequency = 0; -+ -+ ret = tda18250_power_control(fe, TDA18250_POWER_STANDBY); -+ return ret; -+} -+ -+static const struct dvb_tuner_ops tda18250_ops = { -+ .info = { -+ .name = "NXP TDA18250", -+ .frequency_min = 42000000, -+ .frequency_max = 870000000, -+ }, -+ -+ .init = tda18250_init, -+ .set_params = tda18250_set_params, -+ .get_if_frequency = tda18250_get_if_frequency, -+ .sleep = tda18250_sleep, -+}; -+ -+static int tda18250_probe(struct i2c_client *client, -+ const struct i2c_device_id *id) -+{ -+ struct tda18250_config *cfg = client->dev.platform_data; -+ struct dvb_frontend *fe = cfg->fe; -+ struct tda18250_dev *dev; -+ int ret; -+ unsigned char chip_id[3]; -+ -+ /* some registers are always read from HW */ -+ static const struct regmap_range tda18250_yes_ranges[] = { -+ regmap_reg_range(R05_POWER1, R0B_IRQ4), -+ regmap_reg_range(R21_IF_AGC, R21_IF_AGC), -+ regmap_reg_range(R2A_MSM1, R2B_MSM2), -+ regmap_reg_range(R2F_RSSI1, R31_IRQ_CTRL), -+ }; -+ -+ static const struct regmap_access_table tda18250_volatile_table = { -+ .yes_ranges = tda18250_yes_ranges, -+ .n_yes_ranges = ARRAY_SIZE(tda18250_yes_ranges), -+ }; -+ -+ static const struct regmap_config tda18250_regmap_config = { -+ .reg_bits = 8, -+ .val_bits = 8, -+ .max_register = TDA18250_NUM_REGS - 1, -+ .volatile_table = &tda18250_volatile_table, -+ }; -+ -+ dev = kzalloc(sizeof(*dev), GFP_KERNEL); -+ if (!dev) { -+ ret = -ENOMEM; -+ goto err; -+ } -+ -+ i2c_set_clientdata(client, dev); -+ -+ dev->fe = cfg->fe; -+ dev->loopthrough = cfg->loopthrough; -+ if (cfg->xtal_freq < TDA18250_XTAL_FREQ_MAX) { -+ dev->xtal_freq = cfg->xtal_freq; -+ } else { -+ ret = -EINVAL; -+ dev_err(&client->dev, "xtal_freq invalid=%d", cfg->xtal_freq); -+ goto err_kfree; -+ } -+ dev->if_dvbt_6 = cfg->if_dvbt_6; -+ dev->if_dvbt_7 = cfg->if_dvbt_7; -+ dev->if_dvbt_8 = cfg->if_dvbt_8; -+ dev->if_dvbc_6 = cfg->if_dvbc_6; -+ dev->if_dvbc_8 = cfg->if_dvbc_8; -+ dev->if_atsc = cfg->if_atsc; -+ -+ dev->if_frequency = 0; -+ dev->warm = false; -+ -+ dev->regmap = devm_regmap_init_i2c(client, &tda18250_regmap_config); -+ if (IS_ERR(dev->regmap)) { -+ ret = PTR_ERR(dev->regmap); -+ goto err_kfree; -+ } -+ -+ /* read the three chip ID registers */ -+ regmap_bulk_read(dev->regmap, R00_ID1, &chip_id, 3); -+ dev_dbg(&client->dev, "chip_id=%02x:%02x:%02x", -+ chip_id[0], chip_id[1], chip_id[2]); -+ -+ switch (chip_id[0]) { -+ case 0xc7: -+ dev->slave = false; -+ break; -+ case 0x47: -+ dev->slave = true; -+ break; -+ default: -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ if (chip_id[1] != 0x4a) { -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ switch (chip_id[2]) { -+ case 0x20: -+ dev_info(&client->dev, -+ "NXP TDA18250AHN/%s successfully identified", -+ dev->slave ? "S" : "M"); -+ break; -+ case 0x21: -+ dev_info(&client->dev, -+ "NXP TDA18250BHN/%s successfully identified", -+ dev->slave ? "S" : "M"); -+ break; -+ default: -+ ret = -ENODEV; -+ goto err_kfree; -+ } -+ -+ fe->tuner_priv = client; -+ memcpy(&fe->ops.tuner_ops, &tda18250_ops, -+ sizeof(struct dvb_tuner_ops)); -+ -+ /* put the tuner in standby */ -+ tda18250_power_control(fe, TDA18250_POWER_STANDBY); -+ -+ return 0; -+err_kfree: -+ kfree(dev); -+err: -+ dev_dbg(&client->dev, "failed=%d", ret); -+ return ret; -+} -+ -+static int tda18250_remove(struct i2c_client *client) -+{ -+ struct tda18250_dev *dev = i2c_get_clientdata(client); -+ struct dvb_frontend *fe = dev->fe; -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); -+ fe->tuner_priv = NULL; -+ kfree(dev); -+ -+ return 0; -+} -+ -+static const struct i2c_device_id tda18250_id_table[] = { -+ {"tda18250", 0}, -+ {} -+}; -+MODULE_DEVICE_TABLE(i2c, tda18250_id_table); -+ -+static struct i2c_driver tda18250_driver = { -+ .driver = { -+ .name = "tda18250", -+ }, -+ .probe = tda18250_probe, -+ .remove = tda18250_remove, -+ .id_table = tda18250_id_table, -+}; -+ -+module_i2c_driver(tda18250_driver); -+ -+MODULE_DESCRIPTION("NXP TDA18250 silicon tuner driver"); -+MODULE_AUTHOR("Olli Salonen "); -+MODULE_LICENSE("GPL"); -diff --git a/drivers/media/tuners/tda18250.h b/drivers/media/tuners/tda18250.h -new file mode 100644 -index 00000000..fb569060 ---- /dev/null -+++ b/drivers/media/tuners/tda18250.h -@@ -0,0 +1,51 @@ -+/* -+ * NXP TDA18250BHN silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#ifndef TDA18250_H -+#define TDA18250_H -+ -+#include -+#include -+#include "dvb_frontend.h" -+ -+#define TDA18250_XTAL_FREQ_16MHZ 0 -+#define TDA18250_XTAL_FREQ_24MHZ 1 -+#define TDA18250_XTAL_FREQ_25MHZ 2 -+#define TDA18250_XTAL_FREQ_27MHZ 3 -+#define TDA18250_XTAL_FREQ_30MHZ 4 -+#define TDA18250_XTAL_FREQ_MAX 5 -+ -+struct tda18250_config { -+ u16 if_dvbt_6; -+ u16 if_dvbt_7; -+ u16 if_dvbt_8; -+ u16 if_dvbc_6; -+ u16 if_dvbc_8; -+ u16 if_atsc; -+ u8 xtal_freq; -+ bool loopthrough; -+ -+ /* -+ * frontend -+ */ -+ struct dvb_frontend *fe; -+ -+#if defined(CONFIG_MEDIA_CONTROLLER) -+ struct media_device *mdev; -+#endif -+}; -+ -+#endif -diff --git a/drivers/media/tuners/tda18250_priv.h b/drivers/media/tuners/tda18250_priv.h -new file mode 100644 -index 00000000..4a6f8017 ---- /dev/null -+++ b/drivers/media/tuners/tda18250_priv.h -@@ -0,0 +1,145 @@ -+/* -+ * NXP TDA18250BHN silicon tuner driver -+ * -+ * Copyright (C) 2017 Olli Salonen -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#ifndef TDA18250_PRIV_H -+#define TDA18250_PRIV_H -+ -+#include "tda18250.h" -+ -+#define R00_ID1 0x00 /* ID byte 1 */ -+#define R01_ID2 0x01 /* ID byte 2 */ -+#define R02_ID3 0x02 /* ID byte 3 */ -+#define R03_THERMO1 0x03 /* Thermo byte 1 */ -+#define R04_THERMO2 0x04 /* Thermo byte 2 */ -+#define R05_POWER1 0x05 /* Power byte 1 */ -+#define R06_POWER2 0x06 /* Power byte 2 */ -+#define R07_GPIO 0x07 /* GPIO */ -+#define R08_IRQ1 0x08 /* IRQ */ -+#define R09_IRQ2 0x09 /* IRQ */ -+#define R0A_IRQ3 0x0a /* IRQ */ -+#define R0B_IRQ4 0x0b /* IRQ */ -+#define R0C_AGC11 0x0c /* AGC1 byte 1 */ -+#define R0D_AGC12 0x0d /* AGC1 byte 2 */ -+#define R0E_AGC13 0x0e /* AGC1 byte 3 */ -+#define R0F_AGC14 0x0f /* AGC1 byte 4 */ -+#define R10_LT1 0x10 /* LT byte 1 */ -+#define R11_LT2 0x11 /* LT byte 2 */ -+#define R12_AGC21 0x12 /* AGC2 byte 1 */ -+#define R13_AGC22 0x13 /* AGC2 byte 2 */ -+#define R14_AGC23 0x14 /* AGC2 byte 3 */ -+#define R15_AGC24 0x15 /* AGC2 byte 4 */ -+#define R16_AGC25 0x16 /* AGC2 byte 5 */ -+#define R17_AGC31 0x17 /* AGC3 byte 1 */ -+#define R18_AGC32 0x18 /* AGC3 byte 2 */ -+#define R19_AGC33 0x19 /* AGC3 byte 3 */ -+#define R1A_AGCK 0x1a -+#define R1B_GAIN1 0x1b -+#define R1C_GAIN2 0x1c -+#define R1D_GAIN3 0x1d -+#define R1E_WI_FI 0x1e /* Wireless Filter */ -+#define R1F_RF_BPF 0x1f /* RF Band Pass Filter */ -+#define R20_IR_MIX 0x20 /* IR Mixer */ -+#define R21_IF_AGC 0x21 -+#define R22_IF1 0x22 /* IF byte 1 */ -+#define R23_IF2 0x23 /* IF byte 2 */ -+#define R24_IF3 0x24 /* IF byte 3 */ -+#define R25_REF 0x25 /* reference byte */ -+#define R26_IF 0x26 /* IF frequency */ -+#define R27_RF1 0x27 /* RF frequency byte 1 */ -+#define R28_RF2 0x28 /* RF frequency byte 2 */ -+#define R29_RF3 0x29 /* RF frequency byte 3 */ -+#define R2A_MSM1 0x2a -+#define R2B_MSM2 0x2b -+#define R2C_PS1 0x2c /* power saving mode byte 1 */ -+#define R2D_PS2 0x2d /* power saving mode byte 2 */ -+#define R2E_PS3 0x2e /* power saving mode byte 3 */ -+#define R2F_RSSI1 0x2f -+#define R30_RSSI2 0x30 -+#define R31_IRQ_CTRL 0x31 -+#define R32_DUMMY 0x32 -+#define R33_TEST 0x33 -+#define R34_MD1 0x34 -+#define R35_SD1 0x35 -+#define R36_SD2 0x36 -+#define R37_SD3 0x37 -+#define R38_SD4 0x38 -+#define R39_SD5 0x39 -+#define R3A_SD_TEST 0x3a -+#define R3B_REGU 0x3b -+#define R3C_RCCAL1 0x3c -+#define R3D_RCCAL2 0x3d -+#define R3E_IRCAL1 0x3e -+#define R3F_IRCAL2 0x3f -+#define R40_IRCAL3 0x40 -+#define R41_IRCAL4 0x41 -+#define R42_IRCAL5 0x42 -+#define R43_PD1 0x43 /* power down byte 1 */ -+#define R44_PD2 0x44 /* power down byte 2 */ -+#define R45_PD 0x45 /* power down */ -+#define R46_CPUMP 0x46 /* charge pump */ -+#define R47_LNAPOL 0x47 /* LNA polar casc */ -+#define R48_SMOOTH1 0x48 /* smooth test byte 1 */ -+#define R49_SMOOTH2 0x49 /* smooth test byte 2 */ -+#define R4A_SMOOTH3 0x4a /* smooth test byte 3 */ -+#define R4B_XTALOSC1 0x4b -+#define R4C_XTALOSC2 0x4c -+#define R4D_XTALFLX1 0x4d -+#define R4E_XTALFLX2 0x4e -+#define R4F_XTALFLX3 0x4f -+#define R50_XTALFLX4 0x50 -+#define R51_XTALFLX5 0x51 -+#define R52_IRLOOP0 0x52 -+#define R53_IRLOOP1 0x53 -+#define R54_IRLOOP2 0x54 -+#define R55_IRLOOP3 0x55 -+#define R56_IRLOOP4 0x56 -+#define R57_PLL_LOG 0x57 -+#define R58_AGC2_UP1 0x58 -+#define R59_AGC2_UP2 0x59 -+#define R5A_H3H5 0x5a -+#define R5B_AGC_AUTO 0x5b -+#define R5C_AGC_DEBUG 0x5c -+ -+#define TDA18250_NUM_REGS 93 -+ -+#define TDA18250_POWER_STANDBY 0 -+#define TDA18250_POWER_NORMAL 1 -+ -+#define TDA18250_IRQ_CAL 0x81 -+#define TDA18250_IRQ_HW_INIT 0x82 -+#define TDA18250_IRQ_TUNE 0x88 -+ -+struct tda18250_dev { -+ struct mutex i2c_mutex; -+ struct dvb_frontend *fe; -+ struct i2c_adapter *i2c; -+ struct regmap *regmap; -+ u8 xtal_freq; -+ /* IF in kHz */ -+ u16 if_dvbt_6; -+ u16 if_dvbt_7; -+ u16 if_dvbt_8; -+ u16 if_dvbc_6; -+ u16 if_dvbc_8; -+ u16 if_atsc; -+ u16 if_frequency; -+ bool slave; -+ bool loopthrough; -+ bool warm; -+ u8 regs[TDA18250_NUM_REGS]; -+}; -+ -+#endif --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/0007-dvb-mn88472-staging.patch b/archive-patches/armbox/hd61/0007-dvb-mn88472-staging.patch deleted file mode 100644 index 7d5ce1f..0000000 --- a/archive-patches/armbox/hd61/0007-dvb-mn88472-staging.patch +++ /dev/null @@ -1,834 +0,0 @@ ---- - drivers/media/dvb-frontends/mn88472.h | 45 +- - drivers/staging/media/mn88472/mn88472.c | 525 ++++++++++--------- - drivers/staging/media/mn88472/mn88472_priv.h | 11 +- - 3 files changed, 310 insertions(+), 271 deletions(-) - -diff --git a/drivers/media/dvb-frontends/mn88472.h b/drivers/media/dvb-frontends/mn88472.h -index 095294d2..32363252 100644 ---- a/drivers/media/dvb-frontends/mn88472.h -+++ b/drivers/media/dvb-frontends/mn88472.h -@@ -19,23 +19,33 @@ - - #include - --enum ts_clock { -- VARIABLE_TS_CLOCK, -- FIXED_TS_CLOCK, --}; -+/** -+ * struct mn88472_config - Platform data for the mn88472 driver -+ * @xtal: Clock frequency. -+ * @ts_mode: TS mode. -+ * @ts_clock: TS clock config. -+ * @i2c_wr_max: Max number of bytes driver writes to I2C at once. -+ * @get_dvb_frontend: Get DVB frontend. -+ */ - --enum ts_mode { -- SERIAL_TS_MODE, -- PARALLEL_TS_MODE, --}; -+/* Define old names for backward compatibility */ -+#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE -+#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED -+#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL -+#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL - - struct mn88472_config { -- /* -- * Max num of bytes given I2C adapter could write at once. -- * Default: none -- */ -- u16 i2c_wr_max; -+ unsigned int xtal; -+ -+#define MN88472_TS_MODE_SERIAL 0 -+#define MN88472_TS_MODE_PARALLEL 1 -+ int ts_mode; - -+#define MN88472_TS_CLK_FIXED 0 -+#define MN88472_TS_CLK_VARIABLE 1 -+ int ts_clock; -+ -+ u16 i2c_wr_max; - - /* Everything after that is returned by the driver. */ - -@@ -43,14 +53,7 @@ struct mn88472_config { - * DVB frontend. - */ - struct dvb_frontend **fe; -- -- /* -- * Xtal frequency. -- * Hz -- */ -- u32 xtal; -- int ts_mode; -- int ts_clock; -+ struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *); - }; - - #endif -diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c -index cf2e96bc..18fb2df1 100644 ---- a/drivers/staging/media/mn88472/mn88472.c -+++ b/drivers/staging/media/mn88472/mn88472.c -@@ -17,28 +17,90 @@ - #include "mn88472_priv.h" - - static int mn88472_get_tune_settings(struct dvb_frontend *fe, -- struct dvb_frontend_tune_settings *s) -+ struct dvb_frontend_tune_settings *s) - { -- s->min_delay_ms = 800; -+ s->min_delay_ms = 1000; - return 0; - } - -+static int mn88472_read_status(struct dvb_frontend *fe, enum fe_status *status) -+{ -+ struct i2c_client *client = fe->demodulator_priv; -+ struct mn88472_dev *dev = i2c_get_clientdata(client); -+ struct dtv_frontend_properties *c = &fe->dtv_property_cache; -+ int ret; -+ unsigned int utmp; -+ -+ if (!dev->active) { -+ ret = -EAGAIN; -+ goto err; -+ } -+ -+ switch (c->delivery_system) { -+ case SYS_DVBT: -+ ret = regmap_read(dev->regmap[0], 0x7f, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x09) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else -+ *status = 0; -+ break; -+ case SYS_DVBT2: -+ ret = regmap_read(dev->regmap[2], 0x92, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x0d) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else if ((utmp & 0x0f) >= 0x0a) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI; -+ else if ((utmp & 0x0f) >= 0x07) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER; -+ else -+ *status = 0; -+ break; -+ case SYS_DVBC_ANNEX_A: -+ ret = regmap_read(dev->regmap[1], 0x84, &utmp); -+ if (ret) -+ goto err; -+ if ((utmp & 0x0f) >= 0x08) -+ *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | -+ FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -+ else -+ *status = 0; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ -+ return 0; -+err: -+ dev_dbg(&client->dev, "failed=%d\n", ret); -+ return ret; -+} -+ - static int mn88472_set_frontend(struct dvb_frontend *fe) - { - struct i2c_client *client = fe->demodulator_priv; - struct mn88472_dev *dev = i2c_get_clientdata(client); - struct dtv_frontend_properties *c = &fe->dtv_property_cache; - int ret, i; -- u32 if_frequency = 0; -- u64 tmp; -- u8 delivery_system_val, if_val[3], bw_val[7], bw_val2; -+ unsigned int utmp; -+ u32 if_frequency; -+ u8 buf[3], delivery_system_val, bandwidth_val, *bandwidth_vals_ptr; -+ u8 reg_bank0_b4_val, reg_bank0_cd_val, reg_bank0_d4_val; -+ u8 reg_bank0_d6_val; - - dev_dbg(&client->dev, -- "delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d\n", -- c->delivery_system, c->modulation, -- c->frequency, c->symbol_rate, c->inversion); -+ "delivery_system=%u modulation=%u frequency=%u bandwidth_hz=%u symbol_rate=%u inversion=%d stream_id=%d\n", -+ c->delivery_system, c->modulation, c->frequency, -+ c->bandwidth_hz, c->symbol_rate, c->inversion, c->stream_id); - -- if (!dev->warm) { -+ if (!dev->active) { - ret = -EAGAIN; - goto err; - } -@@ -46,39 +108,64 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - switch (c->delivery_system) { - case SYS_DVBT: - delivery_system_val = 0x02; -+ reg_bank0_b4_val = 0x00; -+ reg_bank0_cd_val = 0x1f; -+ reg_bank0_d4_val = 0x0a; -+ reg_bank0_d6_val = 0x48; - break; - case SYS_DVBT2: - delivery_system_val = 0x03; -+ reg_bank0_b4_val = 0xf6; -+ reg_bank0_cd_val = 0x01; -+ reg_bank0_d4_val = 0x09; -+ reg_bank0_d6_val = 0x46; - break; - case SYS_DVBC_ANNEX_A: - delivery_system_val = 0x04; -+ reg_bank0_b4_val = 0x00; -+ reg_bank0_cd_val = 0x17; -+ reg_bank0_d4_val = 0x09; -+ reg_bank0_d6_val = 0x48; - break; - default: - ret = -EINVAL; - goto err; - } - -- if (c->bandwidth_hz <= 5000000) { -- memcpy(bw_val, "\xe5\x99\x9a\x1b\xa9\x1b\xa9", 7); -- bw_val2 = 0x03; -- } else if (c->bandwidth_hz <= 6000000) { -- /* IF 3570000 Hz, BW 6000000 Hz */ -- memcpy(bw_val, "\xbf\x55\x55\x15\x6b\x15\x6b", 7); -- bw_val2 = 0x02; -- } else if (c->bandwidth_hz <= 7000000) { -- /* IF 4570000 Hz, BW 7000000 Hz */ -- memcpy(bw_val, "\xa4\x00\x00\x0f\x2c\x0f\x2c", 7); -- bw_val2 = 0x01; -- } else if (c->bandwidth_hz <= 8000000) { -- /* IF 4570000 Hz, BW 8000000 Hz */ -- memcpy(bw_val, "\x8f\x80\x00\x08\xee\x08\xee", 7); -- bw_val2 = 0x00; -- } else { -- ret = -EINVAL; -- goto err; -+ switch (c->delivery_system) { -+ case SYS_DVBT: -+ case SYS_DVBT2: -+ switch (c->bandwidth_hz) { -+ case 5000000: -+ bandwidth_vals_ptr = "\xe5\x99\x9a\x1b\xa9\x1b\xa9"; -+ bandwidth_val = 0x03; -+ break; -+ case 6000000: -+ bandwidth_vals_ptr = "\xbf\x55\x55\x15\x6b\x15\x6b"; -+ bandwidth_val = 0x02; -+ break; -+ case 7000000: -+ bandwidth_vals_ptr = "\xa4\x00\x00\x0f\x2c\x0f\x2c"; -+ bandwidth_val = 0x01; -+ break; -+ case 8000000: -+ bandwidth_vals_ptr = "\x8f\x80\x00\x08\xee\x08\xee"; -+ bandwidth_val = 0x00; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ break; -+ case SYS_DVBC_ANNEX_A: -+ bandwidth_vals_ptr = NULL; -+ bandwidth_val = 0x00; -+ break; -+ default: -+ break; - } - -- /* program tuner */ -+ /* Program tuner */ - if (fe->ops.tuner_ops.set_params) { - ret = fe->ops.tuner_ops.set_params(fe); - if (ret) -@@ -91,20 +178,10 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - goto err; - - dev_dbg(&client->dev, "get_if_frequency=%d\n", if_frequency); -- } -- -- /* Calculate IF registers ( (1<<24)*IF / Xtal ) */ -- tmp = div_u64(if_frequency * (u64)(1<<24) + (dev->xtal / 2), -- dev->xtal); -- if_val[0] = ((tmp >> 16) & 0xff); -- if_val[1] = ((tmp >> 8) & 0xff); -- if_val[2] = ((tmp >> 0) & 0xff); -- -- ret = regmap_write(dev->regmap[2], 0xfb, 0x13); -- ret = regmap_write(dev->regmap[2], 0xef, 0x13); -- ret = regmap_write(dev->regmap[2], 0xf9, 0x13); -- if (ret) -+ } else { -+ ret = -EINVAL; - goto err; -+ } - - ret = regmap_write(dev->regmap[2], 0x00, 0x66); - if (ret) -@@ -118,157 +195,81 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - ret = regmap_write(dev->regmap[2], 0x03, delivery_system_val); - if (ret) - goto err; -- ret = regmap_write(dev->regmap[2], 0x04, bw_val2); -+ ret = regmap_write(dev->regmap[2], 0x04, bandwidth_val); - if (ret) - goto err; - -- for (i = 0; i < sizeof(if_val); i++) { -- ret = regmap_write(dev->regmap[2], 0x10 + i, if_val[i]); -+ /* IF */ -+ utmp = DIV_ROUND_CLOSEST_ULL((u64)if_frequency * 0x1000000, dev->clk); -+ buf[0] = (utmp >> 16) & 0xff; -+ buf[1] = (utmp >> 8) & 0xff; -+ buf[2] = (utmp >> 0) & 0xff; -+ for (i = 0; i < 3; i++) { -+ ret = regmap_write(dev->regmap[2], 0x10 + i, buf[i]); - if (ret) - goto err; - } - -- for (i = 0; i < sizeof(bw_val); i++) { -- ret = regmap_write(dev->regmap[2], 0x13 + i, bw_val[i]); -- if (ret) -- goto err; -+ /* Bandwidth */ -+ if (bandwidth_vals_ptr) { -+ for (i = 0; i < 7; i++) { -+ ret = regmap_write(dev->regmap[2], 0x13 + i, -+ bandwidth_vals_ptr[i]); -+ if (ret) -+ goto err; -+ } - } - -+ ret = regmap_write(dev->regmap[0], 0xb4, reg_bank0_b4_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xcd, reg_bank0_cd_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xd4, reg_bank0_d4_val); -+ if (ret) -+ goto err; -+ ret = regmap_write(dev->regmap[0], 0xd6, reg_bank0_d6_val); -+ if (ret) -+ goto err; -+ - switch (c->delivery_system) { - case SYS_DVBT: - ret = regmap_write(dev->regmap[0], 0x07, 0x26); -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xb4, 0x00); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x1f); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x48); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[0], 0x00, 0xba); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[0], 0x01, 0x13); - if (ret) - goto err; - break; - case SYS_DVBT2: - ret = regmap_write(dev->regmap[2], 0x2b, 0x13); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[2], 0x4f, 0x05); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[1], 0xf6, 0x05); -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0a); -- ret = regmap_write(dev->regmap[0], 0xb4, 0xf6); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x01); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x09); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x46); -- ret = regmap_write(dev->regmap[2], 0x30, 0x80); -- ret = regmap_write(dev->regmap[2], 0x32, 0x00); - if (ret) - goto err; -- break; -- case SYS_DVBC_ANNEX_A: -- ret = regmap_write(dev->regmap[0], 0xb0, 0x0b); -- ret = regmap_write(dev->regmap[0], 0xb4, 0x00); -- ret = regmap_write(dev->regmap[0], 0xcd, 0x17); -- ret = regmap_write(dev->regmap[0], 0xd4, 0x09); -- ret = regmap_write(dev->regmap[0], 0xd6, 0x48); -- ret = regmap_write(dev->regmap[1], 0x00, 0xb0); -+ ret = regmap_write(dev->regmap[2], 0x32, c->stream_id); - if (ret) - goto err; - break; -- default: -- ret = -EINVAL; -- goto err; -- } -- -- ret = regmap_write(dev->regmap[0], 0x46, 0x00); -- ret = regmap_write(dev->regmap[0], 0xae, 0x00); -- -- switch (dev->ts_mode) { -- case SERIAL_TS_MODE: -- ret = regmap_write(dev->regmap[2], 0x08, 0x1d); -- break; -- case PARALLEL_TS_MODE: -- ret = regmap_write(dev->regmap[2], 0x08, 0x00); -+ case SYS_DVBC_ANNEX_A: - break; - default: -- dev_dbg(&client->dev, "ts_mode error: %d\n", dev->ts_mode); -- ret = -EINVAL; -- goto err; -- } -- -- switch (dev->ts_clock) { -- case VARIABLE_TS_CLOCK: -- ret = regmap_write(dev->regmap[0], 0xd9, 0xe3); - break; -- case FIXED_TS_CLOCK: -- ret = regmap_write(dev->regmap[0], 0xd9, 0xe1); -- break; -- default: -- dev_dbg(&client->dev, "ts_clock error: %d\n", dev->ts_clock); -- ret = -EINVAL; -- goto err; - } - -- /* Reset demod */ -+ /* Reset FSM */ - ret = regmap_write(dev->regmap[2], 0xf8, 0x9f); - if (ret) - goto err; - -- dev->delivery_system = c->delivery_system; -- -- return 0; --err: -- dev_dbg(&client->dev, "failed=%d\n", ret); -- return ret; --} -- --static int mn88472_read_status(struct dvb_frontend *fe, enum fe_status *status) --{ -- struct i2c_client *client = fe->demodulator_priv; -- struct mn88472_dev *dev = i2c_get_clientdata(client); -- struct dtv_frontend_properties *c = &fe->dtv_property_cache; -- int ret; -- unsigned int utmp; -- int lock = 0; -- -- *status = 0; -- -- if (!dev->warm) { -- ret = -EAGAIN; -- goto err; -- } -- -- switch (c->delivery_system) { -- case SYS_DVBT: -- ret = regmap_read(dev->regmap[0], 0x7F, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x09) -- lock = 1; -- break; -- case SYS_DVBT2: -- ret = regmap_read(dev->regmap[2], 0x92, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x07) -- *status |= FE_HAS_SIGNAL; -- if ((utmp & 0xF) >= 0x0a) -- *status |= FE_HAS_CARRIER; -- if ((utmp & 0xF) >= 0x0d) -- *status |= FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; -- break; -- case SYS_DVBC_ANNEX_A: -- ret = regmap_read(dev->regmap[1], 0x84, &utmp); -- if (ret) -- goto err; -- if ((utmp & 0xF) >= 0x08) -- lock = 1; -- break; -- default: -- ret = -EINVAL; -- goto err; -- } -- -- if (lock) -- *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | -- FE_HAS_SYNC | FE_HAS_LOCK; -- - return 0; - err: - dev_dbg(&client->dev, "failed=%d\n", ret); -@@ -279,93 +280,107 @@ static int mn88472_init(struct dvb_frontend *fe) - { - struct i2c_client *client = fe->demodulator_priv; - struct mn88472_dev *dev = i2c_get_clientdata(client); -- int ret, len, remaining; -- const struct firmware *fw = NULL; -- u8 *fw_file = MN88472_FIRMWARE; -- unsigned int tmp; -+ int ret, len, rem; -+ unsigned int utmp; -+ const struct firmware *firmware; -+ const char *name = MN88472_FIRMWARE; - - dev_dbg(&client->dev, "\n"); - -- /* set cold state by default */ -- dev->warm = false; -- -- /* power on */ -+ /* Power up */ - ret = regmap_write(dev->regmap[2], 0x05, 0x00); - if (ret) - goto err; -- -- ret = regmap_bulk_write(dev->regmap[2], 0x0b, "\x00\x00", 2); -+ ret = regmap_write(dev->regmap[2], 0x0b, 0x00); - if (ret) - goto err; -- -- /* check if firmware is already running */ -- ret = regmap_read(dev->regmap[0], 0xf5, &tmp); -+ ret = regmap_write(dev->regmap[2], 0x0c, 0x00); - if (ret) - goto err; - -- if (!(tmp & 0x1)) { -- dev_info(&client->dev, "firmware already running\n"); -- dev->warm = true; -- return 0; -- } -+ /* Check if firmware is already running */ -+ ret = regmap_read(dev->regmap[0], 0xf5, &utmp); -+ if (ret) -+ goto err; -+ if (!(utmp & 0x01)) -+ goto warm; - -- /* request the firmware, this will block and timeout */ -- ret = request_firmware(&fw, fw_file, &client->dev); -+ ret = request_firmware(&firmware, name, &client->dev); - if (ret) { -- dev_err(&client->dev, "firmare file '%s' not found\n", -- fw_file); -+ dev_err(&client->dev, "firmware file '%s' not found\n", name); - goto err; - } - -- dev_info(&client->dev, "downloading firmware from file '%s'\n", -- fw_file); -+ dev_info(&client->dev, "downloading firmware from file '%s'\n", name); - - ret = regmap_write(dev->regmap[0], 0xf5, 0x03); - if (ret) -- goto firmware_release; -- -- for (remaining = fw->size; remaining > 0; -- remaining -= (dev->i2c_wr_max - 1)) { -- len = remaining; -- if (len > (dev->i2c_wr_max - 1)) -- len = dev->i2c_wr_max - 1; -+ goto err_release_firmware; - -+ for (rem = firmware->size; rem > 0; rem -= (dev->i2c_write_max - 1)) { -+ len = min(dev->i2c_write_max - 1, rem); - ret = regmap_bulk_write(dev->regmap[0], 0xf6, -- &fw->data[fw->size - remaining], len); -+ &firmware->data[firmware->size - rem], -+ len); - if (ret) { -- dev_err(&client->dev, -- "firmware download failed=%d\n", ret); -- goto firmware_release; -+ dev_err(&client->dev, "firmware download failed %d\n", -+ ret); -+ goto err_release_firmware; - } - } - -- /* parity check of firmware */ -- ret = regmap_read(dev->regmap[0], 0xf8, &tmp); -- if (ret) { -- dev_err(&client->dev, -- "parity reg read failed=%d\n", ret); -- goto firmware_release; -- } -- if (tmp & 0x10) { -- dev_err(&client->dev, -- "firmware parity check failed=0x%x\n", tmp); -- goto firmware_release; -+ /* Parity check of firmware */ -+ ret = regmap_read(dev->regmap[0], 0xf8, &utmp); -+ if (ret) -+ goto err_release_firmware; -+ if (utmp & 0x10) { -+ ret = -EINVAL; -+ dev_err(&client->dev, "firmware did not run\n"); -+ goto err_release_firmware; - } -- dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp); - - ret = regmap_write(dev->regmap[0], 0xf5, 0x00); - if (ret) -- goto firmware_release; -+ goto err_release_firmware; -+ -+ release_firmware(firmware); -+warm: -+ /* TS config */ -+ switch (dev->ts_mode) { -+ case SERIAL_TS_MODE: -+ utmp = 0x1d; -+ break; -+ case PARALLEL_TS_MODE: -+ utmp = 0x00; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ ret = regmap_write(dev->regmap[2], 0x08, utmp); -+ if (ret) -+ goto err; - -- release_firmware(fw); -- fw = NULL; -+ switch (dev->ts_clk) { -+ case VARIABLE_TS_CLOCK: -+ utmp = 0xe3; -+ break; -+ case FIXED_TS_CLOCK: -+ utmp = 0xe1; -+ break; -+ default: -+ ret = -EINVAL; -+ goto err; -+ } -+ ret = regmap_write(dev->regmap[0], 0xd9, utmp); -+ if (ret) -+ goto err; - -- /* warm state */ -- dev->warm = true; -+ dev->active = true; - - return 0; --firmware_release: -- release_firmware(fw); -+err_release_firmware: -+ release_firmware(firmware); - err: - dev_dbg(&client->dev, "failed=%d\n", ret); - return ret; -@@ -379,18 +394,17 @@ static int mn88472_sleep(struct dvb_frontend *fe) - - dev_dbg(&client->dev, "\n"); - -- /* power off */ -+ /* Power down */ -+ ret = regmap_write(dev->regmap[2], 0x0c, 0x30); -+ if (ret) -+ goto err; - ret = regmap_write(dev->regmap[2], 0x0b, 0x30); -- - if (ret) - goto err; -- - ret = regmap_write(dev->regmap[2], 0x05, 0x3e); - if (ret) - goto err; - -- dev->delivery_system = SYS_UNDEFINED; -- - return 0; - err: - dev_dbg(&client->dev, "failed=%d\n", ret); -@@ -434,10 +448,19 @@ static struct dvb_frontend_ops mn88472_ops = { - .read_status = mn88472_read_status, - }; - -+static struct dvb_frontend *mn88472_get_dvb_frontend(struct i2c_client *client) -+{ -+ struct mn88472_dev *dev = i2c_get_clientdata(client); -+ -+ dev_dbg(&client->dev, "\n"); -+ -+ return &dev->fe; -+} -+ - static int mn88472_probe(struct i2c_client *client, -- const struct i2c_device_id *id) -+ const struct i2c_device_id *id) - { -- struct mn88472_config *config = client->dev.platform_data; -+ struct mn88472_config *pdata = client->dev.platform_data; - struct mn88472_dev *dev; - int ret; - unsigned int utmp; -@@ -448,23 +471,16 @@ static int mn88472_probe(struct i2c_client *client, - - dev_dbg(&client->dev, "\n"); - -- /* Caller really need to provide pointer for frontend we create. */ -- if (config->fe == NULL) { -- dev_err(&client->dev, "frontend pointer not defined\n"); -- ret = -EINVAL; -- goto err; -- } -- - dev = kzalloc(sizeof(*dev), GFP_KERNEL); -- if (dev == NULL) { -+ if (!dev) { - ret = -ENOMEM; - goto err; - } - -- dev->i2c_wr_max = config->i2c_wr_max; -- dev->xtal = config->xtal; -- dev->ts_mode = config->ts_mode; -- dev->ts_clock = config->ts_clock; -+ dev->i2c_write_max = pdata->i2c_wr_max ? pdata->i2c_wr_max : ~0; -+ dev->clk = pdata->xtal; -+ dev->ts_mode = pdata->ts_mode; -+ dev->ts_clk = pdata->ts_clock; - dev->client[0] = client; - dev->regmap[0] = regmap_init_i2c(dev->client[0], ®map_config); - if (IS_ERR(dev->regmap[0])) { -@@ -472,18 +488,28 @@ static int mn88472_probe(struct i2c_client *client, - goto err_kfree; - } - -- /* check demod answers to I2C */ -- ret = regmap_read(dev->regmap[0], 0x00, &utmp); -+ /* Check demod answers with correct chip id */ -+ ret = regmap_read(dev->regmap[0], 0xff, &utmp); - if (ret) - goto err_regmap_0_regmap_exit; - -+ dev_dbg(&client->dev, "chip id=%02x\n", utmp); -+ -+ if (utmp != 0x02) { -+ ret = -ENODEV; -+ goto err_regmap_0_regmap_exit; -+ } -+ - /* -- * Chip has three I2C addresses for different register pages. Used -+ * Chip has three I2C addresses for different register banks. Used - * addresses are 0x18, 0x1a and 0x1c. We register two dummy clients, -- * 0x1a and 0x1c, in order to get own I2C client for each register page. -+ * 0x1a and 0x1c, in order to get own I2C client for each register bank. -+ * -+ * Also, register bank 2 do not support sequential I/O. Only single -+ * register write or read is allowed to that bank. - */ - dev->client[1] = i2c_new_dummy(client->adapter, 0x1a); -- if (dev->client[1] == NULL) { -+ if (!dev->client[1]) { - ret = -ENODEV; - dev_err(&client->dev, "I2C registration failed\n"); - if (ret) -@@ -497,7 +523,7 @@ static int mn88472_probe(struct i2c_client *client, - i2c_set_clientdata(dev->client[1], dev); - - dev->client[2] = i2c_new_dummy(client->adapter, 0x1c); -- if (dev->client[2] == NULL) { -+ if (!dev->client[2]) { - ret = -ENODEV; - dev_err(&client->dev, "2nd I2C registration failed\n"); - if (ret) -@@ -510,15 +536,25 @@ static int mn88472_probe(struct i2c_client *client, - } - i2c_set_clientdata(dev->client[2], dev); - -- /* create dvb_frontend */ -+ /* Sleep because chip is active by default */ -+ ret = regmap_write(dev->regmap[2], 0x05, 0x3e); -+ if (ret) -+ goto err_regmap_2_regmap_exit; -+ -+ /* Create dvb frontend */ - memcpy(&dev->fe.ops, &mn88472_ops, sizeof(struct dvb_frontend_ops)); - dev->fe.demodulator_priv = client; -- *config->fe = &dev->fe; -+ *pdata->fe = &dev->fe; - i2c_set_clientdata(client, dev); - -- dev_info(&client->dev, "Panasonic MN88472 successfully attached\n"); -- return 0; -+ /* Setup callbacks */ -+ pdata->get_dvb_frontend = mn88472_get_dvb_frontend; - -+ dev_info(&client->dev, "Panasonic MN88472 successfully identified\n"); -+ -+ return 0; -+err_regmap_2_regmap_exit: -+ regmap_exit(dev->regmap[2]); - err_client_2_i2c_unregister_device: - i2c_unregister_device(dev->client[2]); - err_regmap_1_regmap_exit: -@@ -561,11 +597,12 @@ MODULE_DEVICE_TABLE(i2c, mn88472_id_table); - - static struct i2c_driver mn88472_driver = { - .driver = { -- .name = "mn88472", -+ .name = "mn88472", -+ .suppress_bind_attrs = true, - }, -- .probe = mn88472_probe, -- .remove = mn88472_remove, -- .id_table = mn88472_id_table, -+ .probe = mn88472_probe, -+ .remove = mn88472_remove, -+ .id_table = mn88472_id_table, - }; - - module_i2c_driver(mn88472_driver); -diff --git a/drivers/staging/media/mn88472/mn88472_priv.h b/drivers/staging/media/mn88472/mn88472_priv.h -index 1a0de9e4..cdf2597a 100644 ---- a/drivers/staging/media/mn88472/mn88472_priv.h -+++ b/drivers/staging/media/mn88472/mn88472_priv.h -@@ -28,12 +28,11 @@ struct mn88472_dev { - struct i2c_client *client[3]; - struct regmap *regmap[3]; - struct dvb_frontend fe; -- u16 i2c_wr_max; -- enum fe_delivery_system delivery_system; -- bool warm; /* FW running */ -- u32 xtal; -- int ts_mode; -- int ts_clock; -+ u16 i2c_write_max; -+ unsigned int clk; -+ unsigned int active:1; -+ unsigned int ts_mode:1; -+ unsigned int ts_clk:1; - }; - - #endif --- -2.17.1 - diff --git a/archive-patches/armbox/hd61/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch b/archive-patches/armbox/hd61/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch deleted file mode 100644 index 5cb57cb..0000000 --- a/archive-patches/armbox/hd61/Backport_minimal_compiler_attributes_h_to_support_GCC_9.patch +++ /dev/null @@ -1,51 +0,0 @@ -From edc966de8725f9186cc9358214da89d335f0e0bd Mon Sep 17 00:00:00 2001 -From: Miguel Ojeda -Date: Fri, 2 Aug 2019 12:37:56 +0200 -Subject: Backport minimal compiler_attributes.h to support GCC 9 - -This adds support for __copy to v4.9.y so that we can use it in -init/exit_module to avoid -Werror=missing-attributes errors on GCC 9. - -Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/ -Cc: -Suggested-by: Rolf Eike Beer -Signed-off-by: Miguel Ojeda -Signed-off-by: Greg Kroah-Hartman - -Signed-off-by: Sasha Levin ---- - include/linux/compiler.h | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -(limited to 'include/linux') - -diff --git a/include/linux/compiler.h b/include/linux/compiler.h -index ed772311ec1f..5508011cc0c7 100644 ---- a/include/linux/compiler.h -+++ b/include/linux/compiler.h -@@ -52,6 +52,22 @@ extern void __chk_io_ptr(const volatile void __iomem *); - - #ifdef __KERNEL__ - -+/* -+ * Minimal backport of compiler_attributes.h to add support for __copy -+ * to v4.9.y so that we can use it in init/exit_module to avoid -+ * -Werror=missing-attributes errors on GCC 9. -+ */ -+#ifndef __has_attribute -+# define __has_attribute(x) __GCC4_has_attribute_##x -+# define __GCC4_has_attribute___copy__ 0 -+#endif -+ -+#if __has_attribute(__copy__) -+# define __copy(symbol) __attribute__((__copy__(symbol))) -+#else -+# define __copy(symbol) -+#endif -+ - #ifdef __GNUC__ - #include - #endif --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd61/HauppaugeWinTV-dualHD.patch b/archive-patches/armbox/hd61/HauppaugeWinTV-dualHD.patch deleted file mode 100644 index ea47228..0000000 --- a/archive-patches/armbox/hd61/HauppaugeWinTV-dualHD.patch +++ /dev/null @@ -1,629 +0,0 @@ -diff -Nur a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx ---- a/Documentation/video4linux/CARDLIST.em28xx 2017-07-31 15:25:12.000000000 +0200 -+++ b/Documentation/video4linux/CARDLIST.em28xx 2019-04-02 08:35:00.919204500 +0200 -@@ -96,3 +96,5 @@ - 95 -> Leadtek VC100 (em2861) [0413:6f07] - 96 -> Terratec Cinergy T2 Stick HD (em28178) - 97 -> Elgato EyeTV Hybrid 2008 INT (em2884) [0fd9:0018] -+ 98 -> Hauppauge WinTV-dualHD DVB (em28174) [2040:0265] -+ -diff -Nur a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h ---- a/drivers/media/usb/em28xx/em28xx.h 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx.h 2019-04-02 08:30:40.196114900 +0200 -@@ -145,6 +145,7 @@ - #define EM2861_BOARD_LEADTEK_VC100 95 - #define EM28178_BOARD_TERRATEC_T2_STICK_HD 96 - #define EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 97 -+#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB 98 - - /* Limits minimum and default number of buffers */ - #define EM28XX_MIN_BUF 4 -@@ -213,6 +214,9 @@ - /* max. number of button state polling addresses */ - #define EM28XX_NUM_BUTTON_ADDRESSES_MAX 5 - -+#define PRIMARY_TS 0 -+#define SECONDARY_TS 1 -+ - enum em28xx_mode { - EM28XX_SUSPEND, - EM28XX_ANALOG_MODE, -@@ -412,6 +416,7 @@ - enum em28xx_led_role { - EM28XX_LED_ANALOG_CAPTURING = 0, - EM28XX_LED_DIGITAL_CAPTURING, -+ EM28XX_LED_DIGITAL_CAPTURING_TS2, - EM28XX_LED_ILLUMINATION, - EM28XX_NUM_LED_ROLES, /* must be the last */ - }; -@@ -458,6 +463,7 @@ - unsigned int mts_firmware:1; - unsigned int max_range_640_480:1; - unsigned int has_dvb:1; -+ unsigned int has_dual_ts:1; - unsigned int is_webcam:1; - unsigned int valid:1; - unsigned int has_ir_i2c:1; -@@ -608,7 +614,6 @@ - struct em28xx_IR *ir; - - /* generic device properties */ -- char name[30]; /* name (including minor) of the device */ - int model; /* index in the device_data struct */ - int devno; /* marks the number of this device */ - enum em28xx_chip_id chip_id; -@@ -619,6 +624,7 @@ - unsigned int is_audio_only:1; - enum em28xx_int_audio_type int_audio_type; - enum em28xx_usb_audio_type usb_audio_type; -+ unsigned char name[32]; - - struct em28xx_board board; - -@@ -677,9 +683,12 @@ - - /* usb transfer */ - struct usb_device *udev; /* the usb device */ -+ struct usb_interface *intf; // the usb interface - u8 ifnum; /* number of the assigned usb interface */ - u8 analog_ep_isoc; /* address of isoc endpoint for analog */ - u8 analog_ep_bulk; /* address of bulk endpoint for analog */ -+ u8 dvb_ep_isoc_ts2; /* address of isoc endpoint for DVB TS2*/ -+ u8 dvb_ep_bulk_ts2; /* address of bulk endpoint for DVB TS2*/ - u8 dvb_ep_isoc; /* address of isoc endpoint for DVB */ - u8 dvb_ep_bulk; /* address of bulk endpoint for DVB */ - int alt; /* alternate setting */ -@@ -693,6 +702,8 @@ - int dvb_alt_isoc; /* alternate setting for DVB isoc transfers */ - unsigned int dvb_max_pkt_size_isoc; /* isoc max packet size of the - selected DVB ep at dvb_alt */ -+ unsigned int dvb_max_pkt_size_isoc_ts2; /* isoc max packet size of the -+ selected DVB ep at dvb_alt */ - unsigned int dvb_xfer_bulk:1; /* use bulk instead of isoc - transfers for DVB */ - char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ -@@ -718,6 +729,15 @@ - /* Snapshot button input device */ - char snapshot_button_path[30]; /* path of the input dev */ - struct input_dev *sbutton_input_dev; -+ -+#ifdef CONFIG_MEDIA_CONTROLLER -+ struct media_device *media_dev; -+ struct media_entity input_ent[MAX_EM28XX_INPUT]; -+ struct media_pad input_pad[MAX_EM28XX_INPUT]; -+#endif -+ -+ struct em28xx *dev_next; -+ int ts; - }; - - #define kref_to_dev(d) container_of(d, struct em28xx, ref) -diff -Nur a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c ---- a/drivers/media/usb/em28xx/em28xx-cards.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-cards.c 2019-04-02 08:43:27.288403900 +0200 -@@ -491,6 +491,30 @@ - {-1, -1, -1, -1}, - }; - -+/* 2040:0265 Hauppauge WinTV-dualHD DVB Isoc -+ * 2040:8265 Hauppauge WinTV-dualHD DVB Bulk -+ * reg 0x80/0x84: -+ * GPIO_0: Yellow LED tuner 1, 0=on, 1=off -+ * GPIO_1: Green LED tuner 1, 0=on, 1=off -+ * GPIO_2: Yellow LED tuner 2, 0=on, 1=off -+ * GPIO_3: Green LED tuner 2, 0=on, 1=off -+ * GPIO_5: Reset #2, 0=active -+ * GPIO_6: Reset #1, 0=active -+ */ -+static struct em28xx_reg_seq hauppauge_dualhd_dvb[] = { -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, -+ {0x0d, 0xff, 0xff, 200}, -+ {0x50, 0x04, 0xff, 300}, -+ {EM2874_R80_GPIO_P0_CTRL, 0xbf, 0xff, 100}, /* demod 1 reset */ -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, -+ {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */ -+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, -+ {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50}, -+ {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50}, -+ {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50}, -+ {-1, -1, -1, -1}, -+}; -+ - /* - * Button definitions - */ -@@ -560,6 +584,22 @@ - {-1, 0, 0, 0}, - }; - -+static struct em28xx_led hauppauge_dualhd_leds[] = { -+ { -+ .role = EM28XX_LED_DIGITAL_CAPTURING, -+ .gpio_reg = EM2874_R80_GPIO_P0_CTRL, -+ .gpio_mask = EM_GPIO_1, -+ .inverted = 1, -+ }, -+ { -+ .role = EM28XX_LED_DIGITAL_CAPTURING_TS2, -+ .gpio_reg = EM2874_R80_GPIO_P0_CTRL, -+ .gpio_mask = EM_GPIO_3, -+ .inverted = 1, -+ }, -+ {-1, 0, 0, 0}, -+}; -+ - /* - * Board definitions - */ -@@ -2288,6 +2328,20 @@ - .has_dvb = 1, - .ir_codes = RC_MAP_TERRATEC_SLIM_2, - }, -+ /* 2040:0265 Hauppauge WinTV-dualHD (DVB version) Isoc. -+ * 2040:8265 Hauppauge WinTV-dualHD (DVB version) Bulk. -+ * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157 */ -+ [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = { -+ .name = "Hauppauge WinTV-dualHD DVB", -+ .def_i2c_bus = 1, -+ .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, -+ .tuner_type = TUNER_ABSENT, -+ .tuner_gpio = hauppauge_dualhd_dvb, -+ .has_dvb = 1, -+ .has_dual_ts = 1, -+ .ir_codes = RC_MAP_HAUPPAUGE, -+ .leds = hauppauge_dualhd_leds, -+ }, - }; - EXPORT_SYMBOL_GPL(em28xx_boards); - -@@ -2411,6 +2465,10 @@ - .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, - { USB_DEVICE(0x2040, 0x651f), - .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, -+ { USB_DEVICE(0x2040, 0x0265), -+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, -+ { USB_DEVICE(0x2040, 0x8265), -+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, - { USB_DEVICE(0x0438, 0xb002), - .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, - { USB_DEVICE(0x2001, 0xf112), -@@ -2804,6 +2862,7 @@ - case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: - case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: - case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: -+ case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: - { - struct tveeprom tv; - -@@ -3013,6 +3072,8 @@ - */ - static void em28xx_release_resources(struct em28xx *dev) - { -+ struct usb_device *udev = interface_to_usbdev(dev->intf); -+ - /*FIXME: I2C IR should be disconnected */ - - mutex_lock(&dev->lock); -@@ -3021,7 +3082,8 @@ - em28xx_i2c_unregister(dev, 1); - em28xx_i2c_unregister(dev, 0); - -- usb_put_dev(dev->udev); -+ if (dev->ts == PRIMARY_TS) -+ usb_put_dev(udev); - - /* Mark device as unused */ - clear_bit(dev->devno, em28xx_devused); -@@ -3063,6 +3125,7 @@ - const char *chip_name = default_chip_name; - - dev->udev = udev; -+ dev->intf = interface; - mutex_init(&dev->ctrl_urb_lock); - spin_lock_init(&dev->slock); - -@@ -3220,6 +3283,35 @@ - return 0; - } - -+int em28xx_duplicate_dev(struct em28xx *dev) -+{ -+ int nr; -+ struct em28xx *sec_dev = kzalloc(sizeof(*sec_dev), GFP_KERNEL); -+ -+ if (sec_dev == NULL) { -+ dev->dev_next = NULL; -+ return -ENOMEM; -+ } -+ memcpy(sec_dev, dev, sizeof(sizeof(*sec_dev))); -+ /* Check to see next free device and mark as used */ -+ do { -+ nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS); -+ if (nr >= EM28XX_MAXBOARDS) { -+ /* No free device slots */ -+ printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", -+ EM28XX_MAXBOARDS); -+ kfree(sec_dev); -+ dev->dev_next = NULL; -+ return -ENOMEM; -+ } -+ } while (test_and_set_bit(nr, em28xx_devused)); -+ sec_dev->devno = nr; -+ snprintf(sec_dev->name, 28, "em28xx #%d", nr); -+ sec_dev->dev_next = NULL; -+ dev->dev_next = sec_dev; -+ return 0; -+} -+ - /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */ - #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03)) - -@@ -3340,6 +3432,17 @@ - } - } - break; -+ case 0x85: -+ if (usb_endpoint_xfer_isoc(e)) { -+ if (size > dev->dvb_max_pkt_size_isoc_ts2) { -+ dev->dvb_ep_isoc_ts2 = e->bEndpointAddress; -+ dev->dvb_max_pkt_size_isoc_ts2 = size; -+ dev->dvb_alt_isoc = i; -+ } -+ } else { -+ dev->dvb_ep_bulk_ts2 = e->bEndpointAddress; -+ } -+ break; - } - } - /* NOTE: -@@ -3354,6 +3457,8 @@ - * 0x83 isoc* => audio - * 0x84 isoc => digital - * 0x84 bulk => analog or digital** -+ * 0x85 isoc => digital TS2 -+ * 0x85 bulk => digital TS2 - * (*: audio should always be isoc) - * (**: analog, if ep 0x82 is isoc, otherwise digital) - * -@@ -3422,6 +3527,10 @@ - dev->has_video = has_video; - dev->ifnum = ifnum; - -+ dev->ts = PRIMARY_TS; -+ snprintf(dev->name, 28, "em28xx"); -+ dev->dev_next = NULL; -+ - if (has_vendor_audio) { - printk(KERN_INFO DRIVER_NAME ": Audio interface %i found %s\n", - ifnum, "(Vendor Class)"); -@@ -3491,6 +3600,65 @@ - dev->dvb_xfer_bulk ? "bulk" : "isoc"); - } - -+ if (dev->board.has_dual_ts && em28xx_duplicate_dev(dev) == 0) { -+ dev->dev_next->ts = SECONDARY_TS; -+ dev->dev_next->alt = -1; -+ dev->dev_next->is_audio_only = has_vendor_audio && -+ !(has_video || has_dvb); -+ dev->dev_next->has_video = false; -+ dev->dev_next->ifnum = ifnum; -+ dev->dev_next->model = id->driver_info; -+ -+ mutex_init(&dev->dev_next->lock); -+ retval = em28xx_init_dev(dev->dev_next, udev, interface, -+ dev->dev_next->devno); -+ if (retval) -+ goto err_free; -+ -+ dev->dev_next->board.ir_codes = NULL; /* No IR for 2nd tuner */ -+ dev->dev_next->board.has_ir_i2c = 0; /* No IR for 2nd tuner */ -+ -+ if (usb_xfer_mode < 0) { -+ if (dev->dev_next->board.is_webcam) -+ try_bulk = 1; -+ else -+ try_bulk = 0; -+ } else { -+ try_bulk = usb_xfer_mode > 0; -+ } -+ -+ /* Select USB transfer types to use */ -+ if (has_dvb) { -+ if (!dev->dvb_ep_isoc_ts2 || -+ (try_bulk && dev->dvb_ep_bulk_ts2)) -+ dev->dev_next->dvb_xfer_bulk = 1; -+ printk(DRIVER_NAME "dvb ts2 set to %s mode.\n", -+ dev->dev_next->dvb_xfer_bulk ? "bulk" : "isoc"); -+ } -+ -+ dev->dev_next->dvb_ep_isoc = dev->dvb_ep_isoc_ts2; -+ dev->dev_next->dvb_ep_bulk = dev->dvb_ep_bulk_ts2; -+ dev->dev_next->dvb_max_pkt_size_isoc = dev->dvb_max_pkt_size_isoc_ts2; -+ dev->dev_next->dvb_alt_isoc = dev->dvb_alt_isoc; -+ -+ /* Configuare hardware to support TS2*/ -+ if (dev->dvb_xfer_bulk) { -+ /* The ep4 and ep5 are configuared for BULK */ -+ em28xx_write_reg(dev, 0x0b, 0x96); -+ mdelay(100); -+ em28xx_write_reg(dev, 0x0b, 0x80); -+ mdelay(100); -+ } else { -+ /* The ep4 and ep5 are configuared for ISO */ -+ em28xx_write_reg(dev, 0x0b, 0x96); -+ mdelay(100); -+ em28xx_write_reg(dev, 0x0b, 0x82); -+ mdelay(100); -+ } -+ -+ kref_init(&dev->dev_next->ref); -+ } -+ - kref_init(&dev->ref); - - request_modules(dev); -@@ -3528,6 +3696,13 @@ - if (!dev) - return; - -+ if (dev->dev_next != NULL) { -+ dev->dev_next->disconnected = 1; -+ printk(DRIVER_NAME "Disconnecting %s\n", -+ dev->dev_next->name); -+ flush_request_modules(dev->dev_next); -+ } -+ - dev->disconnected = 1; - - em28xx_info("Disconnecting %s\n", dev->name); -@@ -3536,7 +3711,14 @@ - - em28xx_close_extension(dev); - -+ if (dev->dev_next != NULL) -+ em28xx_release_resources(dev->dev_next); - em28xx_release_resources(dev); -+ -+ if (dev->dev_next != NULL) { -+ kref_put(&dev->dev_next->ref, em28xx_free_device); -+ dev->dev_next = NULL; -+ } - kref_put(&dev->ref, em28xx_free_device); - } - -diff -Nur a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c ---- a/drivers/media/usb/em28xx/em28xx-core.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-core.c 2019-04-02 08:30:40.204091800 +0200 -@@ -636,10 +636,19 @@ - dev->chip_id == CHIP_ID_EM28174 || - dev->chip_id == CHIP_ID_EM28178) { - /* The Transport Stream Enable Register moved in em2874 */ -- rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE, -- start ? -- EM2874_TS1_CAPTURE_ENABLE : 0x00, -- EM2874_TS1_CAPTURE_ENABLE); -+ if (dev->ts == PRIMARY_TS) { -+ rc = em28xx_write_reg_bits(dev, -+ EM2874_R5F_TS_ENABLE, -+ start ? -+ EM2874_TS1_CAPTURE_ENABLE : 0x00, -+ EM2874_TS1_CAPTURE_ENABLE); -+ } else { -+ rc = em28xx_write_reg_bits(dev, -+ EM2874_R5F_TS_ENABLE, -+ start ? -+ EM2874_TS2_CAPTURE_ENABLE : 0x00, -+ EM2874_TS2_CAPTURE_ENABLE); -+ } - } else { - /* FIXME: which is the best order? */ - /* video registers are sampled by VREF */ -@@ -1073,7 +1082,11 @@ - mutex_lock(&em28xx_devlist_mutex); - list_add_tail(&ops->next, &em28xx_extension_devlist); - list_for_each_entry(dev, &em28xx_devlist, devlist) { -- ops->init(dev); -+ if (ops->init) { -+ ops->init(dev); -+ if (dev->dev_next != NULL) -+ ops->init(dev->dev_next); -+ } - } - mutex_unlock(&em28xx_devlist_mutex); - printk(KERN_INFO "em28xx: Registered (%s) extension\n", ops->name); -@@ -1087,7 +1100,11 @@ - - mutex_lock(&em28xx_devlist_mutex); - list_for_each_entry(dev, &em28xx_devlist, devlist) { -- ops->fini(dev); -+ if (ops->fini) { -+ if (dev->dev_next != NULL) -+ ops->fini(dev->dev_next); -+ ops->fini(dev); -+ } - } - list_del(&ops->next); - mutex_unlock(&em28xx_devlist_mutex); -@@ -1102,8 +1119,11 @@ - mutex_lock(&em28xx_devlist_mutex); - list_add_tail(&dev->devlist, &em28xx_devlist); - list_for_each_entry(ops, &em28xx_extension_devlist, next) { -- if (ops->init) -- ops->init(dev); -+ if (ops->init) { -+ ops->init(dev); -+ if (dev->dev_next != NULL) -+ ops->init(dev->dev_next); -+ } - } - mutex_unlock(&em28xx_devlist_mutex); - } -@@ -1114,8 +1134,11 @@ - - mutex_lock(&em28xx_devlist_mutex); - list_for_each_entry(ops, &em28xx_extension_devlist, next) { -- if (ops->fini) -- ops->fini(dev); -+ if (ops->fini) { -+ if (dev->dev_next != NULL) -+ ops->fini(dev->dev_next); -+ ops->fini(dev); -+ } - } - list_del(&dev->devlist); - mutex_unlock(&em28xx_devlist_mutex); -@@ -1130,6 +1153,8 @@ - list_for_each_entry(ops, &em28xx_extension_devlist, next) { - if (ops->suspend) - ops->suspend(dev); -+ if (dev->dev_next != NULL) -+ ops->suspend(dev->dev_next); - } - mutex_unlock(&em28xx_devlist_mutex); - return 0; -@@ -1144,6 +1169,8 @@ - list_for_each_entry(ops, &em28xx_extension_devlist, next) { - if (ops->resume) - ops->resume(dev); -+ if (dev->dev_next != NULL) -+ ops->resume(dev->dev_next); - } - mutex_unlock(&em28xx_devlist_mutex); - return 0; -diff -Nur a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c ---- a/drivers/media/usb/em28xx/em28xx-dvb.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-dvb.c 2019-04-02 08:30:40.206087100 +0200 -@@ -211,7 +211,6 @@ - dvb_alt = dev->dvb_alt_isoc; - } - -- usb_set_interface(dev->udev, dev->ifnum, dvb_alt); - rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); - if (rc < 0) - return rc; -@@ -1031,8 +1030,9 @@ - - static int em28xx_dvb_init(struct em28xx *dev) - { -- int result = 0; -+ int result = 0, dvb_alt = 0; - struct em28xx_dvb *dvb; -+ struct usb_device *udev; - - if (dev->is_audio_only) { - /* Shouldn't initialize IR for this interface */ -@@ -1726,6 +1726,76 @@ - dvb->i2c_client_tuner = client; - } - break; -+ case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: -+ { -+ struct i2c_adapter *adapter; -+ struct i2c_client *client; -+ struct i2c_board_info info; -+ struct si2168_config si2168_config; -+ struct si2157_config si2157_config; -+ -+ /* attach demod */ -+ memset(&si2168_config, 0, sizeof(si2168_config)); -+ si2168_config.i2c_adapter = &adapter; -+ si2168_config.fe = &dvb->fe[0]; -+ si2168_config.ts_mode = SI2168_TS_SERIAL; -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2168", I2C_NAME_SIZE); -+ if (dev->ts == PRIMARY_TS) -+ info.addr = 0x64; -+ else -+ info.addr = 0x67; -+ info.platform_data = &si2168_config; -+ request_module(info.type); -+ client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info); -+ if (client == NULL || client->dev.driver == NULL) { -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ if (!try_module_get(client->dev.driver->owner)) { -+ i2c_unregister_device(client); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ dvb->i2c_client_demod = client; -+ -+ /* attach tuner */ -+ memset(&si2157_config, 0, sizeof(si2157_config)); -+ si2157_config.fe = dvb->fe[0]; -+ si2157_config.if_port = 1; -+#ifdef CONFIG_MEDIA_CONTROLLER_DVB -+ si2157_config.mdev = dev->media_dev; -+#endif -+ memset(&info, 0, sizeof(struct i2c_board_info)); -+ strlcpy(info.type, "si2157", I2C_NAME_SIZE); -+ if (dev->ts == PRIMARY_TS) -+ info.addr = 0x60; -+ else -+ info.addr = 0x63; -+ info.platform_data = &si2157_config; -+ request_module(info.type); -+ client = i2c_new_device(adapter, &info); -+ if (client == NULL || client->dev.driver == NULL) { -+ module_put(dvb->i2c_client_demod->dev.driver->owner); -+ i2c_unregister_device(dvb->i2c_client_demod); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ if (!try_module_get(client->dev.driver->owner)) { -+ i2c_unregister_device(client); -+ module_put(dvb->i2c_client_demod->dev.driver->owner); -+ i2c_unregister_device(dvb->i2c_client_demod); -+ result = -ENODEV; -+ goto out_free; -+ } -+ -+ dvb->i2c_client_tuner = client; -+ -+ } -+ break; - default: - em28xx_errdev("/2: The frontend of your DVB/ATSC card" - " isn't supported yet\n"); -@@ -1747,6 +1817,14 @@ - if (result < 0) - goto out_free; - -+ if (dev->dvb_xfer_bulk) { -+ dvb_alt = 0; -+ } else { /* isoc */ -+ dvb_alt = dev->dvb_alt_isoc; -+ } -+ -+ udev = interface_to_usbdev(dev->intf); -+ usb_set_interface(udev, dev->ifnum, dvb_alt); - em28xx_info("DVB extension successfully initialized\n"); - - kref_get(&dev->ref); -diff -Nur a/drivers/media/usb/em28xx/em28xx-reg.h b/drivers/media/usb/em28xx/em28xx-reg.h ---- a/drivers/media/usb/em28xx/em28xx-reg.h 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/em28xx/em28xx-reg.h 2019-04-02 08:30:40.209080400 +0200 -@@ -193,6 +193,19 @@ - /* em2874 registers */ - #define EM2874_R50_IR_CONFIG 0x50 - #define EM2874_R51_IR 0x51 -+#define EM2874_R5D_TS1_PKT_SIZE 0x5d -+#define EM2874_R5E_TS2_PKT_SIZE 0x5e -+ /* -+ * For both TS1 and TS2, In isochronous mode: -+ * 0x01 188 bytes -+ * 0x02 376 bytes -+ * 0x03 564 bytes -+ * 0x04 752 bytes -+ * 0x05 940 bytes -+ * In bulk mode: -+ * 0x01..0xff total packet count in 188-byte -+ */ -+ - #define EM2874_R5F_TS_ENABLE 0x5f - - /* em2874/174/84, em25xx, em276x/7x/8x GPIO registers */ diff --git a/archive-patches/armbox/hd61/defconfig b/archive-patches/armbox/hd61/defconfig deleted file mode 100644 index ddcdbb9..0000000 --- a/archive-patches/armbox/hd61/defconfig +++ /dev/null @@ -1,4537 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm 4.4.35 Kernel Configuration -# -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_NEED_MACH_IO_H=y -CONFIG_NEED_MACH_MEMORY_H=y -CONFIG_GENERIC_BUG=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -# CONFIG_COMPILE_TEST is not set -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_KERNEL_GZIP=y -# CONFIG_KERNEL_LZMA is not set -# CONFIG_KERNEL_XZ is not set -# CONFIG_KERNEL_LZO is not set -# CONFIG_KERNEL_LZ4 is not set -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_CROSS_MEMORY_ATTACH=y -# CONFIG_FHANDLE is not set -CONFIG_USELIB=y -# CONFIG_AUDIT is not set - -# -# IRQ subsystem -# -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_HANDLE_DOMAIN_IRQ=y -# CONFIG_IRQ_DOMAIN_DEBUG is not set -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -# CONFIG_NO_HZ_FULL is not set -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set -# CONFIG_IRQ_TIME_ACCOUNTING is not set -# CONFIG_SCHED_WALT is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set - -# -# RCU Subsystem -# -CONFIG_TREE_RCU=y -# CONFIG_RCU_EXPERT is not set -CONFIG_SRCU=y -# CONFIG_TASKS_RCU is not set -CONFIG_RCU_STALL_COMMON=y -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_RCU_EXPEDITE_BOOT is not set -# CONFIG_BUILD_BIN2C is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_GENERIC_SCHED_CLOCK=y -# CONFIG_CGROUPS is not set -# CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -# CONFIG_USER_NS is not set -CONFIG_PID_NS=y -CONFIG_NET_NS=y -# CONFIG_SCHED_AUTOGROUP is not set -# CONFIG_SCHED_TUNE is not set -# CONFIG_DEFAULT_USE_ENERGY_AWARE is not set -# CONFIG_SYSFS_DEPRECATED is not set -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_RD_XZ=y -CONFIG_RD_LZO=y -CONFIG_RD_LZ4=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_BPF=y -# CONFIG_EXPERT is not set -CONFIG_UID16=y -CONFIG_MULTIUSER=y -# CONFIG_SGETMASK_SYSCALL is not set -CONFIG_SYSFS_SYSCALL=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -# CONFIG_BPF_SYSCALL is not set -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_ADVISE_SYSCALLS=y -# CONFIG_USERFAULTFD is not set -CONFIG_PCI_QUIRKS=y -CONFIG_MEMBARRIER=y -# CONFIG_EMBEDDED is not set -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLAB is not set -CONFIG_SLUB=y -CONFIG_SLUB_CPU_PARTIAL=y -# CONFIG_SYSTEM_DATA_VERIFICATION is not set -CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_OPROFILE=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_KPROBES is not set -# CONFIG_JUMP_LABEL is not set -# CONFIG_UPROBES is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_CC_STACKPROTECTOR=y -# CONFIG_CC_STACKPROTECTOR is not set -CONFIG_CC_STACKPROTECTOR_NONE=y -# CONFIG_CC_STACKPROTECTOR_REGULAR is not set -# CONFIG_CC_STACKPROTECTOR_STRONG is not set -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_ARCH_MMAP_RND_BITS_MIN=8 -CONFIG_ARCH_MMAP_RND_BITS_MAX=16 -CONFIG_ARCH_MMAP_RND_BITS=8 -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_BLK_DEV_BSG=y -# CONFIG_BLK_DEV_BSGLIB is not set -# CONFIG_BLK_DEV_INTEGRITY is not set -CONFIG_BLK_CMDLINE_PARSER=y - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_AIX_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -CONFIG_EFI_PARTITION=y -# CONFIG_SYSV68_PARTITION is not set -CONFIG_CMDLINE_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_MULTIPLATFORM is not set -# CONFIG_ARCH_S40 is not set -# CONFIG_ARCH_HI3716MV420N is not set -# CONFIG_ARCH_HI3716MV430 is not set -# CONFIG_ARCH_HI3798MX is not set -# CONFIG_ARCH_HI3798CV2X is not set -CONFIG_ARCH_HI3798MV2X=y -# CONFIG_ARCH_HI3798MV310 is not set -# CONFIG_ARCH_HI3796MV2X is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_DOVE is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_LPC32XX is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C24XX is not set -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP1 is not set -CONFIG_DEFAULT_UART_BASE_ADDR=0xF8B00000 -CONFIG_DEFAULT_VMALLOC_SIZE=500 - -# -# HI3798MV2X board feature -# -CONFIG_MACH_HI3798MV2X=y -CONFIG_HAVE_SP804_LOCAL_TIMER_HI3798MV2X=y -# CONFIG_HAVE_ARM_LOCAL_TIMER_HI3798MV2X is not set -# CONFIG_HI3798MV2X_FPGA is not set - -# -# Processor Type -# -CONFIG_CPU_V7=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_LPAE is not set -# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_ARM_THUMB=y -# CONFIG_ARM_THUMBEE is not set -CONFIG_ARM_VIRT_EXT=y -CONFIG_SWP_EMULATE=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_KUSER_HELPERS=y -CONFIG_VDSO=y -# CONFIG_CACHE_L2X0 is not set -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_DMA_MEM_BUFFERABLE=y -# CONFIG_ARM_KERNMEM_PERMS is not set -CONFIG_MULTI_IRQ_HANDLER=y -# CONFIG_ARM_ERRATA_430973 is not set -# CONFIG_ARM_ERRATA_458693 is not set -# CONFIG_ARM_ERRATA_460075 is not set -# CONFIG_ARM_ERRATA_742230 is not set -# CONFIG_ARM_ERRATA_742231 is not set -# CONFIG_ARM_ERRATA_643719 is not set -# CONFIG_ARM_ERRATA_720789 is not set -# CONFIG_ARM_ERRATA_743622 is not set -# CONFIG_ARM_ERRATA_751472 is not set -# CONFIG_ARM_ERRATA_754322 is not set -# CONFIG_ARM_ERRATA_754327 is not set -# CONFIG_ARM_ERRATA_764369 is not set -# CONFIG_ARM_ERRATA_775420 is not set -# CONFIG_ARM_ERRATA_798181 is not set -# CONFIG_ARM_ERRATA_773022 is not set - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_DOMAINS_GENERIC is not set -CONFIG_PCI_SYSCALL=y -# CONFIG_PCI_MSI is not set -# CONFIG_PCI_DEBUG is not set -# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set -# CONFIG_PCI_STUB is not set -# CONFIG_PCI_IOV is not set -# CONFIG_PCI_PRI is not set -# CONFIG_PCI_PASID is not set - -# -# PCI host controller drivers -# -CONFIG_PCIE_DW=y -# CONFIG_PCI_HOST_GENERIC is not set -# CONFIG_PCI_LAYERSCAPE is not set -# CONFIG_PCIE_IPROC is not set -# CONFIG_PCIE_ALTERA is not set -CONFIG_PCIEPORTBUS=y -CONFIG_PCIEAER=y -# CONFIG_PCIE_ECRC is not set -# CONFIG_PCIEAER_INJECT is not set -CONFIG_PCIEASPM=y -# CONFIG_PCIEASPM_DEBUG is not set -CONFIG_PCIEASPM_DEFAULT=y -# CONFIG_PCIEASPM_POWERSAVE is not set -# CONFIG_PCIEASPM_PERFORMANCE is not set -CONFIG_PCIE_PME=y -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_HAVE_SMP=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_ARM_CPU_TOPOLOGY=y -# CONFIG_SCHED_MC is not set -# CONFIG_SCHED_SMT is not set -CONFIG_HAVE_ARM_ARCH_TIMER=y -# CONFIG_MCPM is not set -# CONFIG_BIG_LITTLE is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_NR_CPUS=4 -CONFIG_HOTPLUG_CPU=y -# CONFIG_ARM_PSCI is not set -CONFIG_ARCH_NR_GPIO=0 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_HZ_FIXED=0 -# CONFIG_HZ_100 is not set -# CONFIG_HZ_200 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_300 is not set -# CONFIG_HZ_500 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_SCHED_HRTICK=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_CPU_SW_DOMAIN_PAN=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -# CONFIG_ARM_MODULE_PLTS is not set -CONFIG_VM_MIN_FREE_KBYTES=0 -CONFIG_VM_OVERCOMMIT_GUESS=0 -CONFIG_VM_DIRTY_RATIO=20 -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_COMPACTION is not set -CONFIG_MIGRATION=y -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_BOUNCE=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_CMA=y -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=7 -# CONFIG_ZPOOL is not set -# CONFIG_ZBUD is not set -# CONFIG_ZSMALLOC is not set -# CONFIG_IDLE_PAGE_TRACKING is not set -CONFIG_FRAME_VECTOR=y -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set -# CONFIG_SECCOMP is not set -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -# CONFIG_XEN is not set -# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set - -# -# Boot options -# -CONFIG_USE_OF=y -CONFIG_ATAGS=y -# CONFIG_DEPRECATED_PARAM_STRUCT is not set -CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y -CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="hi3798mv200" -CONFIG_ZBOOT_ROM_TEXT=0x00008000 -CONFIG_ZBOOT_ROM_BSS=0x00008000 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y -CONFIG_CMDLINE="mem=128M console=ttyAMA0,115200 console=ttyMTD,blackbox" -CONFIG_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_CMDLINE_EXTEND is not set -# CONFIG_CMDLINE_FORCE is not set -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set -# CONFIG_CRASH_DUMP is not set -# CONFIG_AUTO_ZRELADDR is not set - -# -# CPU Power Management -# - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHED is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -# CONFIG_CPU_FREQ_GOV_SCHED is not set - -# -# CPU frequency scaling drivers -# -# CONFIG_CPUFREQ_DT is not set -# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set - -# -# Hisilicon CPU frequency scaling config -# -CONFIG_MICRO_FREQUENCY_UP_THRESHOLD=95 -CONFIG_DEFAULT_GO_HISPEED_LOAD=99 -CONFIG_DEFAULT_TARGET_LOAD=90 -# CONFIG_QORIQ_CPUFREQ is not set - -# -# CPU Idle -# -# CONFIG_CPU_IDLE is not set -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_NEON=y -CONFIG_KERNEL_MODE_NEON=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_WAKELOCK=y -# CONFIG_HIBERNATION is not set -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -# CONFIG_PM_AUTOSLEEP is not set -# CONFIG_PM_WAKELOCKS is not set -CONFIG_PM=y -CONFIG_PM_DEBUG=y -# CONFIG_PM_ADVANCED_DEBUG is not set -CONFIG_PM_SLEEP_DEBUG=y -CONFIG_APM_EMULATION=y -CONFIG_PM_OPP=y -CONFIG_PM_CLK=y -# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set -CONFIG_CPU_PM=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_NET=y -CONFIG_NET_INGRESS=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=m -# CONFIG_IP_MROUTE is not set -CONFIG_SYN_COOKIES=y -# CONFIG_NET_IPVTI is not set -CONFIG_NET_UDP_TUNNEL=m -# CONFIG_NET_FOU is not set -# CONFIG_NET_FOU_IP_TUNNELS is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_LRO=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_INET_DIAG_DESTROY is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=y -CONFIG_IPV6_ROUTER_PREF=y -# CONFIG_IPV6_ROUTE_INFO is not set -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_IPV6_MIP6 is not set -# CONFIG_IPV6_ILA is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -# CONFIG_IPV6_VTI is not set -CONFIG_IPV6_SIT=m -# CONFIG_IPV6_SIT_6RD is not set -CONFIG_IPV6_NDISC_NODETYPE=y -# CONFIG_IPV6_TUNNEL is not set -# CONFIG_IPV6_GRE is not set -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_IPV6_MROUTE is not set -# CONFIG_ANDROID_PARANOID_NETWORK is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NET_PTP_CLASSIFY is not set -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_NETFILTER_ADVANCED=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_INGRESS=y -CONFIG_NETFILTER_NETLINK=y -CONFIG_NETFILTER_NETLINK_ACCT=y -CONFIG_NETFILTER_NETLINK_QUEUE=y -# CONFIG_NETFILTER_NETLINK_LOG is not set -# CONFIG_NF_CONNTRACK is not set -# CONFIG_NF_TABLES is not set -CONFIG_NETFILTER_XTABLES=y - -# -# Xtables combined modules -# -# CONFIG_NETFILTER_XT_MARK is not set - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set -# CONFIG_NETFILTER_XT_TARGET_LED is not set -# CONFIG_NETFILTER_XT_TARGET_LOG is not set -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set - -# -# Xtables matches -# -# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set -# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set -# CONFIG_NETFILTER_XT_MATCH_L2TP is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_MAC is not set -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OSF is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_RECENT is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_TIME is not set -# CONFIG_NETFILTER_XT_MATCH_U32 is not set -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV4 is not set -# CONFIG_NF_DUP_IPV4 is not set -# CONFIG_NF_LOG_ARP is not set -# CONFIG_NF_LOG_IPV4 is not set -# CONFIG_NF_REJECT_IPV4 is not set -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_TTL is not set -# CONFIG_IP_NF_FILTER is not set -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_RAW is not set -CONFIG_IP_NF_ARPTABLES=y -# CONFIG_IP_NF_ARPFILTER is not set -# CONFIG_IP_NF_ARP_MANGLE is not set - -# -# IPv6: Netfilter Configuration -# -# CONFIG_NF_DEFRAG_IPV6 is not set -# CONFIG_NF_DUP_IPV6 is not set -# CONFIG_NF_REJECT_IPV6 is not set -# CONFIG_NF_LOG_IPV6 is not set -# CONFIG_IP6_NF_IPTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -# CONFIG_BRIDGE is not set -CONFIG_HAVE_NET_DSA=y -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_6LOWPAN is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set -CONFIG_DNS_RESOLVER=y -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_MMAP is not set -# CONFIG_NETLINK_DIAG is not set -# CONFIG_MPLS is not set -# CONFIG_HSR is not set -# CONFIG_NET_SWITCHDEV is not set -# CONFIG_NET_L3_MASTER_DEV is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -CONFIG_NET_RX_BUSY_POLL=y -CONFIG_BQL=y -# CONFIG_BPF_JIT is not set -CONFIG_NET_FLOW_LIMIT=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NET_DROP_MONITOR is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_BREDR=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -# CONFIG_BT_BNEP_MC_FILTER is not set -# CONFIG_BT_BNEP_PROTO_FILTER is not set -CONFIG_BT_HIDP=m -CONFIG_BT_HS=y -CONFIG_BT_LE=y -CONFIG_BT_SELFTEST=y -CONFIG_BT_SELFTEST_ECDH=y -CONFIG_BT_SELFTEST_SMP=y -CONFIG_BT_DEBUGFS=y - -# -# Bluetooth device drivers -# -CONFIG_BT_INTEL=m -CONFIG_BT_BCM=m -CONFIG_BT_RTL=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTUSB_BCM=y -CONFIG_BT_HCIBTUSB_RTL=y -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIUART_3WIRE=y -CONFIG_BT_HCIUART_INTEL=y -CONFIG_BT_HCIUART_BCM=y -# CONFIG_BT_HCIUART_QCA is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -CONFIG_BT_HCIVHCI=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -# CONFIG_BT_ATH3K is not set -# CONFIG_AF_RXRPC is not set -CONFIG_WIRELESS=y -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_CORE=y -CONFIG_WEXT_PROC=y -CONFIG_WEXT_SPY=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211=m -# CONFIG_NL80211_TESTMODE is not set -# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set -# CONFIG_CFG80211_REG_DEBUG is not set -CONFIG_CFG80211_DEFAULT_PS=y -# CONFIG_CFG80211_DEBUGFS is not set -# CONFIG_CFG80211_INTERNAL_REGDB is not set -CONFIG_CFG80211_CRDA_SUPPORT=y -CONFIG_CFG80211_WEXT=y -CONFIG_LIB80211=m -CONFIG_LIB80211_CRYPT_WEP=m -CONFIG_LIB80211_CRYPT_CCMP=m -CONFIG_LIB80211_CRYPT_TKIP=m -# CONFIG_LIB80211_DEBUG is not set -CONFIG_MAC80211=m -CONFIG_MAC80211_HAS_RC=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_MAC80211_RC_MINSTREL_HT=y -# CONFIG_MAC80211_RC_MINSTREL_VHT is not set -CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y -CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" -CONFIG_MAC80211_MESH=y -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_MESSAGE_TRACING is not set -# CONFIG_MAC80211_DEBUG_MENU is not set -CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -CONFIG_WIMAX=m -CONFIG_WIMAX_DEBUG_LEVEL=8 -CONFIG_RFKILL=y -CONFIG_RFKILL_LEDS=y -CONFIG_RFKILL_INPUT=y -# CONFIG_RFKILL_REGULATOR is not set -# CONFIG_RFKILL_GPIO is not set -# CONFIG_NET_9P is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_LWTUNNEL is not set -CONFIG_HAVE_BPF_JIT=y - -# -# Device Drivers -# - -# -# Hisilicon driver support -# -# CONFIG_VIRTUAL_INPUT is not set -CONFIG_HISI_DEBUG_UART_PHYS=0xF8B00000 -CONFIG_HISI_DEBUG_UART_VIRT=0xF9B00000 -CONFIG_PCIE_HISILICON=y -CONFIG_PCIE_PME_IRQ=0xa2 -CONFIG_PCIE_DMA_SIZE_READ=0x0 -CONFIG_PCIE_DMA_SIZE_WRITE=0x0 -# CONFIG_PCIE_RESET is not set -# CONFIG_GPIO_PCIE_POWER_EN_SUPPORT is not set - -# -# Hisilicon IR drivers -# -# CONFIG_HISI_IR is not set -CONFIG_SUPPORT_SRAM_MANAGER=y -CONFIG_SRAM_PHYS_START=0xFFFF2800 -CONFIG_SRAM_PHYS_SIZE=0x00002800 -CONFIG_TIMER_HISP804=y -CONFIG_TIMER_HIFIXTIMER=y -CONFIG_MTD_BLOCK_ROMBLOCK=y -CONFIG_PART_CHANGE=y - -# -# Hisilicon CPU frequency scaling config -# -CONFIG_HI_I2C=y -# CONFIG_PAGEALLOC_LOCK is not set -# CONFIG_SUPPORT_DSP_RUN_MEM is not set -# CONFIG_SUPPORT_ATF_MEM is not set -# CONFIG_SUPPORT_SMCU_MEM is not set -# CONFIG_HISI_EXT4_TMP_QUIRK is not set -# CONFIG_SUPPORT_CA is not set -# CONFIG_CA_FILE_AUTHORITY is not set -# CONFIG_CA_NET_CONFIG is not set -# CONFIG_CMA_MEM_SHARED is not set -# CONFIG_CMA_ADVANCE_SHARE is not set -# CONFIG_USB_OTG_HISI is not set -# CONFIG_CPU_IDLE_HI3798MV2X is not set -# CONFIG_TEE is not set -CONFIG_DEVFREQ_GOV_GPU_ONDEMAND=y -# CONFIG_DEVFREQ_GOV_MIDGARD_ONDEMAND is not set -CONFIG_REGULATOR=y -# CONFIG_REGULATOR_HI3798CV200 is not set -CONFIG_REGULATOR_HI3798MV200=y -# CONFIG_REGULATOR_HI3798MV310 is not set -# CONFIG_REGULATOR_HI3796MV200 is not set -# CONFIG_HASH_VRF_DEV is not set - -# -# Hisilicon thermal drivers -# -# CONFIG_HISI_THERMAL is not set -CONFIG_ARM_AMBA=y -# CONFIG_TEGRA_AHB is not set - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/mdev" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_WANT_DEV_COREDUMP=y -CONFIG_ALLOW_DEV_COREDUMP=y -CONFIG_DEV_COREDUMP=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_FENCE_TRACE is not set -CONFIG_DMA_CMA=y - -# -# Default contiguous memory area size: -# -CONFIG_CMA_SIZE_MBYTES=4 -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_ALIGNMENT=8 - -# -# Bus devices -# -# CONFIG_ARM_CCI400_PMU is not set -# CONFIG_ARM_CCI500_PMU is not set -# CONFIG_ARM_CCN is not set -# CONFIG_BRCMSTB_GISB_ARB is not set -# CONFIG_VEXPRESS_CONFIG is not set -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_TESTS is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set -# CONFIG_MTD_PARTITIONED_MASTER is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_INTEL_VR_NOR is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLOCK2MTD=y - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -# CONFIG_MTD_HISFC350 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -# CONFIG_MTD_NAND_DENALI_PCI is not set -# CONFIG_MTD_NAND_DENALI_DT is not set -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set -# CONFIG_MTD_NAND_RICOH is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_NANDSIM is not set -# CONFIG_MTD_NAND_BRCMNAND is not set -# CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_NAND_HISI504 is not set -# CONFIG_MTD_NAND_HINFC610 is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR & LPDDR2 PCM memory drivers -# -# CONFIG_MTD_LPDDR is not set -# CONFIG_MTD_LPDDR2_NVM is not set -# CONFIG_MTD_SPI_NOR is not set -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=128 -CONFIG_MTD_UBI_BEB_LIMIT=20 -CONFIG_MTD_UBI_FASTMAP=y -# CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_MTD_UBI_BLOCK is not set -CONFIG_MTD_HIFMC100=y -CONFIG_MTD_HIFMC100_SPINOR=y -CONFIG_MTD_HIFMC100_SPINAND=y -CONFIG_MTD_HIFMC100_NAND=y -CONFIG_DTC=y -CONFIG_OF=y -# CONFIG_OF_UNITTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_IRQ=y -CONFIG_OF_NET=y -CONFIG_OF_MDIO=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y -CONFIG_OF_MTD=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_NULL_BLK is not set -# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_BLK_DEV_RBD is not set -# CONFIG_BLK_DEV_RSXX is not set -# CONFIG_BLK_DEV_NVME is not set - -# -# Misc devices -# -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_PHANTOM is not set -# CONFIG_SGI_IOC4 is not set -# CONFIG_TIFM_CORE is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_HP_ILO is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1780 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -# CONFIG_BMP085_I2C is not set -# CONFIG_BMP085_SPI is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -# CONFIG_SRAM is not set -# CONFIG_UID_CPUTIME is not set -# CONFIG_MEMORY_STATE_TIME is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -# CONFIG_EEPROM_AT25 is not set -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -CONFIG_EEPROM_93CX6=m -# CONFIG_EEPROM_93XX46 is not set -# CONFIG_CB710_CORE is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_SPI is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set - -# -# Intel MIC Bus Driver -# - -# -# SCIF Bus Driver -# - -# -# Intel MIC Host Driver -# - -# -# Intel MIC Card Driver -# - -# -# SCIF Driver -# - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# -# CONFIG_ECHO is not set -# CONFIG_CXL_BASE is not set -# CONFIG_CXL_KERNEL_API is not set -# CONFIG_CXL_EEH is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_MQ_DEFAULT is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_ISCSI_BOOT_SYSFS is not set -# CONFIG_SCSI_CXGB3_ISCSI is not set -# CONFIG_SCSI_CXGB4_ISCSI is not set -# CONFIG_SCSI_BNX2_ISCSI is not set -# CONFIG_BE2ISCSI is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_HPSA is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_3W_SAS is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC94XX is not set -# CONFIG_SCSI_MVSAS is not set -# CONFIG_SCSI_MVUMI is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_ARCMSR is not set -# CONFIG_SCSI_ESAS2R is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_MPT3SAS is not set -# CONFIG_SCSI_MPT2SAS is not set -# CONFIG_SCSI_UFSHCD is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_SNIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_STEX is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_ISCSI is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_WD719X is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_PMCRAID is not set -# CONFIG_SCSI_PM8001 is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -CONFIG_ATA=y -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_VERBOSE_ERROR=y -CONFIG_SATA_PMP=y - -# -# Controllers with non-SFF native interface -# -# CONFIG_SATA_AHCI is not set -CONFIG_SATA_AHCI_PLATFORM=y -# CONFIG_AHCI_CEVA is not set -# CONFIG_AHCI_QORIQ is not set -# CONFIG_SATA_INIC162X is not set -# CONFIG_SATA_ACARD_AHCI is not set -# CONFIG_SATA_SIL24 is not set -CONFIG_ATA_SFF=y - -# -# SFF controllers with custom DMA interface -# -# CONFIG_PDC_ADMA is not set -# CONFIG_SATA_QSTOR is not set -# CONFIG_SATA_SX4 is not set -CONFIG_ATA_BMDMA=y - -# -# SATA SFF controllers with BMDMA -# -# CONFIG_ATA_PIIX is not set -# CONFIG_SATA_MV is not set -# CONFIG_SATA_NV is not set -# CONFIG_SATA_PROMISE is not set -# CONFIG_SATA_SIL is not set -# CONFIG_SATA_SIS is not set -# CONFIG_SATA_SVW is not set -# CONFIG_SATA_ULI is not set -# CONFIG_SATA_VIA is not set -# CONFIG_SATA_VITESSE is not set - -# -# PATA SFF controllers with BMDMA -# -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_ATP867X is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_MARVELL is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NINJA32 is not set -# CONFIG_PATA_NS87415 is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PDC2027X is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RDC is not set -# CONFIG_PATA_SCH is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_SIL680 is not set -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_TOSHIBA is not set -# CONFIG_PATA_TRIFLEX is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# PIO-only SFF controllers -# -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -# CONFIG_PATA_RZ1000 is not set - -# -# Generic fallback / legacy drivers -# -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_LEGACY is not set -# CONFIG_MD is not set -# CONFIG_TARGET_CORE is not set -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_FIREWIRE is not set -# CONFIG_FIREWIRE_NOSY is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_NET_FC is not set -# CONFIG_NET_TEAM is not set -# CONFIG_MACVLAN is not set -# CONFIG_IPVLAN is not set -# CONFIG_VXLAN is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m -# CONFIG_TUN_VNET_CROSS_LE is not set -# CONFIG_VETH is not set -# CONFIG_NLMON is not set -# CONFIG_ARCNET is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -# CONFIG_NET_DSA_MV88E6XXX is not set -# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set -CONFIG_ETHERNET=y -CONFIG_NET_VENDOR_3COM=y -# CONFIG_VORTEX is not set -# CONFIG_TYPHOON is not set -CONFIG_NET_VENDOR_ADAPTEC=y -# CONFIG_ADAPTEC_STARFIRE is not set -CONFIG_NET_VENDOR_AGERE=y -# CONFIG_ET131X is not set -CONFIG_NET_VENDOR_ALTEON=y -# CONFIG_ACENIC is not set -# CONFIG_ALTERA_TSE is not set -CONFIG_NET_VENDOR_AMD=y -# CONFIG_AMD8111_ETH is not set -# CONFIG_PCNET32 is not set -# CONFIG_NET_VENDOR_ARC is not set -CONFIG_NET_VENDOR_ATHEROS=y -# CONFIG_ATL2 is not set -# CONFIG_ATL1 is not set -# CONFIG_ATL1E is not set -# CONFIG_ATL1C is not set -# CONFIG_ALX is not set -# CONFIG_NET_VENDOR_AURORA is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -CONFIG_NET_VENDOR_BROCADE=y -# CONFIG_BNA is not set -CONFIG_NET_VENDOR_CAVIUM=y -CONFIG_NET_VENDOR_CHELSIO=y -# CONFIG_CHELSIO_T1 is not set -# CONFIG_CHELSIO_T3 is not set -# CONFIG_CHELSIO_T4 is not set -# CONFIG_CHELSIO_T4VF is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -CONFIG_NET_VENDOR_CISCO=y -# CONFIG_ENIC is not set -# CONFIG_DM9000 is not set -# CONFIG_DNET is not set -CONFIG_NET_VENDOR_DEC=y -# CONFIG_NET_TULIP is not set -CONFIG_NET_VENDOR_DLINK=y -# CONFIG_DL2K is not set -# CONFIG_SUNDANCE is not set -CONFIG_NET_VENDOR_EMULEX=y -# CONFIG_BE2NET is not set -CONFIG_NET_VENDOR_EZCHIP=y -# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set -CONFIG_NET_VENDOR_EXAR=y -# CONFIG_S2IO is not set -# CONFIG_VXGE is not set -# CONFIG_NET_VENDOR_FARADAY is not set -CONFIG_HIETH_SWITCH_FABRIC=y -CONFIG_HIETH_MAX_RX_POOLS=1024 -CONFIG_NET_VENDOR_HISILICON=y -# CONFIG_HIX5HD2_GMAC is not set -# CONFIG_HIP04_ETH is not set -# CONFIG_HNS is not set -# CONFIG_HNS_DSAF is not set -# CONFIG_HNS_ENET is not set -CONFIG_HIETH_GMAC=y -CONFIG_HIGMAC_DESC_4WORD=y -CONFIG_HIGMAC_RXCSUM=y -CONFIG_NET_VENDOR_HP=y -# CONFIG_HP100 is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_JME is not set -# CONFIG_NET_VENDOR_MARVELL is not set -CONFIG_NET_VENDOR_MELLANOX=y -# CONFIG_MLX4_EN is not set -# CONFIG_MLX4_CORE is not set -# CONFIG_MLX5_CORE is not set -# CONFIG_MLXSW_CORE is not set -# CONFIG_NET_VENDOR_MICREL is not set -CONFIG_NET_VENDOR_MICROCHIP=y -# CONFIG_ENC28J60 is not set -# CONFIG_ENCX24J600 is not set -CONFIG_NET_VENDOR_MYRI=y -# CONFIG_MYRI10GE is not set -# CONFIG_FEALNX is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_NET_VENDOR_NVIDIA=y -# CONFIG_FORCEDETH is not set -CONFIG_NET_VENDOR_OKI=y -# CONFIG_ETHOC is not set -CONFIG_NET_PACKET_ENGINE=y -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_NET_VENDOR_QLOGIC=y -# CONFIG_QLA3XXX is not set -# CONFIG_QLCNIC is not set -# CONFIG_QLGE is not set -# CONFIG_NETXEN_NIC is not set -# CONFIG_QED is not set -# CONFIG_NET_VENDOR_QUALCOMM is not set -CONFIG_NET_VENDOR_REALTEK=y -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_R8169 is not set -CONFIG_NET_VENDOR_RENESAS=y -CONFIG_NET_VENDOR_RDC=y -# CONFIG_R6040 is not set -CONFIG_NET_VENDOR_ROCKER=y -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_NET_VENDOR_SILAN=y -# CONFIG_SC92031 is not set -CONFIG_NET_VENDOR_SIS=y -# CONFIG_SIS900 is not set -# CONFIG_SIS190 is not set -# CONFIG_SFC is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_NET_VENDOR_SUN=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NIU is not set -CONFIG_NET_VENDOR_SYNOPSYS=y -# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set -CONFIG_NET_VENDOR_TEHUTI=y -# CONFIG_TEHUTI is not set -CONFIG_NET_VENDOR_TI=y -# CONFIG_TI_CPSW_ALE is not set -# CONFIG_TLAN is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_AQUANTIA_PHY is not set -# CONFIG_AT803X_PHY is not set -# CONFIG_AMD_PHY is not set -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_TERANETICS_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_BROADCOM_PHY is not set -# CONFIG_BCM7XXX_PHY is not set -# CONFIG_BCM87XX_PHY is not set -# CONFIG_ICPLUS_PHY is not set -# CONFIG_REALTEK_PHY is not set -# CONFIG_NATIONAL_PHY is not set -# CONFIG_STE10XP is not set -# CONFIG_LSI_ET1011C_PHY is not set -# CONFIG_MICREL_PHY is not set -# CONFIG_DP83848_PHY is not set -# CONFIG_DP83867_PHY is not set -# CONFIG_MICROCHIP_PHY is not set -CONFIG_HISILICON_PHY=y -# CONFIG_FIXED_PHY is not set -# CONFIG_MDIO_BITBANG is not set -# CONFIG_MDIO_BUS_MUX_GPIO is not set -# CONFIG_MDIO_BUS_MUX_MMIOREG is not set -# CONFIG_MDIO_BCM_UNIMAC is not set -# CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -# CONFIG_PPPOLAC is not set -# CONFIG_PPPOPNS is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -# CONFIG_SLIP is not set -CONFIG_SLHC=m -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=m -# CONFIG_USB_LAN78XX is not set -CONFIG_USB_USBNET=y -CONFIG_USB_NET_AX8817X=m -# CONFIG_USB_NET_AX88179_178A is not set -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_CDC_EEM=m -CONFIG_USB_NET_CDC_NCM=m -CONFIG_USB_NET_HUAWEI_CDC_NCM=m -CONFIG_USB_NET_CDC_MBIM=m -CONFIG_USB_NET_DM9601=m -CONFIG_USB_NET_SR9700=m -CONFIG_USB_NET_SR9800=m -CONFIG_USB_NET_SMSC75XX=m -CONFIG_USB_NET_SMSC95XX=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_NET_CX82310_ETH=m -CONFIG_USB_NET_KALMIA=m -CONFIG_USB_NET_QMI_WWAN=m -# CONFIG_USB_HSO is not set -CONFIG_USB_NET_INT51X1=m -CONFIG_USB_IPHETH=m -CONFIG_USB_SIERRA_NET=m -CONFIG_USB_VL600=m -# CONFIG_USB_NET_CH9200 is not set -CONFIG_WLAN=y -CONFIG_LIBERTAS_THINFIRM=m -# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set -CONFIG_LIBERTAS_THINFIRM_USB=m -# CONFIG_ATMEL is not set -CONFIG_AT76C50X_USB=m -# CONFIG_PRISM54 is not set -CONFIG_USB_ZD1201=m -# CONFIG_USB_NET_RNDIS_WLAN is not set -# CONFIG_ADM8211 is not set -# CONFIG_RTL8180 is not set -CONFIG_RTL8187=m -CONFIG_RTL8187_LEDS=y -# CONFIG_MAC80211_HWSIM is not set -# CONFIG_MWL8K is not set -CONFIG_ATH_COMMON=m -CONFIG_ATH_CARDS=m -# CONFIG_ATH_DEBUG is not set -# CONFIG_ATH5K is not set -# CONFIG_ATH5K_PCI is not set -CONFIG_ATH9K_HW=m -CONFIG_ATH9K_COMMON=m -CONFIG_ATH9K_BTCOEX_SUPPORT=y -CONFIG_ATH9K=m -CONFIG_ATH9K_PCI=y -# CONFIG_ATH9K_AHB is not set -# CONFIG_ATH9K_DEBUGFS is not set -# CONFIG_ATH9K_DYNACK is not set -# CONFIG_ATH9K_WOW is not set -CONFIG_ATH9K_RFKILL=y -# CONFIG_ATH9K_CHANNEL_CONTEXT is not set -CONFIG_ATH9K_PCOEM=y -CONFIG_ATH9K_HTC=m -# CONFIG_ATH9K_HTC_DEBUGFS is not set -CONFIG_CARL9170=m -CONFIG_CARL9170_LEDS=y -CONFIG_CARL9170_WPC=y -# CONFIG_CARL9170_HWRNG 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_WIL6210 is not set -CONFIG_ATH10K=m -# CONFIG_ATH10K_PCI is not set -# CONFIG_ATH10K_DEBUG is not set -# CONFIG_ATH10K_DEBUGFS is not set -# CONFIG_ATH10K_TRACING is not set -# CONFIG_WCN36XX is not set -# CONFIG_B43 is not set -# CONFIG_B43LEGACY is not set -CONFIG_BRCMUTIL=m -# CONFIG_BRCMSMAC is not set -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_PROTO_BCDC=y -CONFIG_BRCMFMAC_SDIO=y -# CONFIG_BRCMFMAC_USB is not set -# CONFIG_BRCMFMAC_PCIE is not set -# CONFIG_BRCM_TRACING is not set -# CONFIG_BRCMDBG is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set -# CONFIG_HOSTAP_PLX is not set -# CONFIG_HOSTAP_PCI is not set -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_IWLWIFI is not set -# CONFIG_IWL4965 is not set -# CONFIG_IWL3945 is not set -CONFIG_LIBERTAS=m -# CONFIG_LIBERTAS_USB is not set -# CONFIG_LIBERTAS_SDIO is not set -# CONFIG_LIBERTAS_SPI is not set -# CONFIG_LIBERTAS_DEBUG is not set -# CONFIG_LIBERTAS_MESH is not set -# CONFIG_HERMES is not set -CONFIG_P54_COMMON=m -# CONFIG_P54_USB is not set -# CONFIG_P54_PCI is not set -# CONFIG_P54_SPI is not set -CONFIG_P54_LEDS=y -CONFIG_RT2X00=m -# CONFIG_RT2400PCI is not set -# CONFIG_RT2500PCI is not set -# CONFIG_RT61PCI is not set -# CONFIG_RT2800PCI is not set -CONFIG_RT2500USB=m -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 -CONFIG_RT2X00_LIB=m -CONFIG_RT2X00_LIB_FIRMWARE=y -CONFIG_RT2X00_LIB_CRYPTO=y -CONFIG_RT2X00_LIB_LEDS=y -# CONFIG_RT2X00_DEBUG is not set -CONFIG_WL_MEDIATEK=y -CONFIG_MT7601U=m -CONFIG_RTL_CARDS=m -# CONFIG_RTL8192CE is not set -# CONFIG_RTL8192SE is not set -# CONFIG_RTL8192DE is not set -# CONFIG_RTL8723AE is not set -# CONFIG_RTL8723BE is not set -# CONFIG_RTL8188EE is not set -# CONFIG_RTL8192EE is not set -# CONFIG_RTL8821AE is not set -CONFIG_RTL8192CU=m -CONFIG_RTLWIFI=m -CONFIG_RTLWIFI_USB=m -CONFIG_RTLWIFI_DEBUG=y -CONFIG_RTL8192C_COMMON=m -CONFIG_RTL8XXXU=m -CONFIG_RTL8XXXU_UNTESTED=y -# CONFIG_WL_TI is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_MWIFIEX=m -# CONFIG_MWIFIEX_SDIO is not set -# CONFIG_MWIFIEX_PCIE is not set -CONFIG_MWIFIEX_USB=m -CONFIG_CW1200=m -# CONFIG_CW1200_WLAN_SDIO is not set -# CONFIG_CW1200_WLAN_SPI is not set -CONFIG_RSI_91X=m -# CONFIG_RSI_DEBUGFS is not set -# CONFIG_RSI_SDIO is not set -CONFIG_RSI_USB=m - -# -# WiMAX Wireless Broadband devices -# -# CONFIG_WIMAX_I2400M_USB is not set -# CONFIG_WAN is not set -# CONFIG_VMXNET3 is not set -# CONFIG_ISDN is not set -# CONFIG_NVM is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_LEDS=y -CONFIG_INPUT_FF_MEMLESS=y -# CONFIG_INPUT_POLLDEV is not set -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_INPUT_MATRIXKMAP is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set -# CONFIG_INPUT_KEYCOMBO is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_GPIO is not set -# CONFIG_KEYBOARD_GPIO_POLLED is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_OMAP4 is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_CAP11XX is not set -# CONFIG_KEYBOARD_BCM is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_CYPRESS=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_ELANTECH is not set -# CONFIG_MOUSE_PS2_SENTELIC is not set -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_PS2_FOCALTECH=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_ELAN_I2C is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -CONFIG_INPUT_JOYSTICK=y -# CONFIG_JOYSTICK_ANALOG is not set -# CONFIG_JOYSTICK_A3D is not set -# CONFIG_JOYSTICK_ADI is not set -# CONFIG_JOYSTICK_COBRA is not set -# CONFIG_JOYSTICK_GF2K is not set -# CONFIG_JOYSTICK_GRIP is not set -# CONFIG_JOYSTICK_GRIP_MP is not set -# CONFIG_JOYSTICK_GUILLEMOT is not set -# CONFIG_JOYSTICK_INTERACT is not set -# CONFIG_JOYSTICK_SIDEWINDER is not set -# CONFIG_JOYSTICK_TMDC is not set -# CONFIG_JOYSTICK_IFORCE is not set -# CONFIG_JOYSTICK_WARRIOR is not set -# CONFIG_JOYSTICK_MAGELLAN is not set -# CONFIG_JOYSTICK_SPACEORB is not set -# CONFIG_JOYSTICK_SPACEBALL is not set -# CONFIG_JOYSTICK_STINGER is not set -# CONFIG_JOYSTICK_TWIDJOY is not set -# CONFIG_JOYSTICK_ZHENHUA is not set -# CONFIG_JOYSTICK_AS5011 is not set -# CONFIG_JOYSTICK_JOYDUMP is not set -CONFIG_JOYSTICK_XPAD=y -CONFIG_JOYSTICK_XPAD_FF=y -CONFIG_JOYSTICK_XPAD_LEDS=y -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_E3X0_BUTTON is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_MPU3050 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_BEEPER is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYCHORD is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -# CONFIG_INPUT_REGULATOR_HAPTIC is not set -CONFIG_INPUT_UINPUT=y -# CONFIG_INPUT_GPIO is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set -# CONFIG_INPUT_DRV260X_HAPTICS is not set -# CONFIG_INPUT_DRV2665_HAPTICS is not set -# CONFIG_INPUT_DRV2667_HAPTICS is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_AMBAKMI is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_SERIO_ALTERA_PS2 is not set -# CONFIG_SERIO_PS2MULT is not set -# CONFIG_SERIO_ARC_PS2 is not set -# CONFIG_SERIO_APBPS2 is not set -# CONFIG_USERIO is not set -CONFIG_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_GAMEPORT_EMU10K1 is not set -# CONFIG_GAMEPORT_FM801 is not set - -# -# Character devices -# -CONFIG_TTY=y -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_NOZOMI is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y -CONFIG_DEVKMEM=y - -# -# Serial drivers -# -CONFIG_SERIAL_EARLYCON=y -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -# CONFIG_SERIAL_UARTLITE is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_SC16IS7XX is not set -# CONFIG_SERIAL_BCM63XX is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -# CONFIG_SERIAL_XILINX_PS_UART is not set -# CONFIG_SERIAL_ARC is not set -# CONFIG_SERIAL_RP2 is not set -# CONFIG_SERIAL_FSL_LPUART is not set -# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set -# CONFIG_SERIAL_ST_ASC is not set -# CONFIG_SERIAL_STM32 is not set -# CONFIG_HVC_DCC is not set -# CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=y -# CONFIG_HW_RANDOM_TIMERIOMEM is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_DEVPORT=y -# CONFIG_XILLYBUS is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y - -# -# Multiplexer I2C Chip support -# -# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set -# CONFIG_I2C_MUX_GPIO is not set -# CONFIG_I2C_MUX_PCA9541 is not set -# CONFIG_I2C_MUX_PCA954x is not set -# CONFIG_I2C_MUX_REG is not set -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_ALGOBIT=m - -# -# I2C Hardware Bus support -# - -# -# PC SMBus host controller drivers -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_ISCH is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_CBUS_GPIO is not set -# CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_DESIGNWARE_PCI is not set -# CONFIG_I2C_EMEV2 is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_RK3X is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_XILINX is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_ROBOTFUZZ_OSIF is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_SLAVE is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -CONFIG_SPI_BITBANG=y -# CONFIG_SPI_CADENCE is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -CONFIG_SPI_OC_TINY=y -CONFIG_SPI_PL022=y -# CONFIG_SPI_PXA2XX is not set -# CONFIG_SPI_PXA2XX_PCI is not set -# CONFIG_SPI_ROCKCHIP is not set -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_ZYNQMP_GQSPI is not set -# CONFIG_SPI_DESIGNWARE is not set - -# -# SPI Protocol Masters -# -CONFIG_SPI_SPIDEV=y -# CONFIG_SPI_TLE62X0 is not set -# CONFIG_SPMI is not set -# CONFIG_HSI is not set - -# -# PPS support -# -# CONFIG_PPS is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -# CONFIG_PTP_1588_CLOCK is not set - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_OF_GPIO=y -CONFIG_GPIOLIB_IRQCHIP=y -# CONFIG_DEBUG_GPIO is not set -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC=y - -# -# Memory mapped GPIO drivers -# -# CONFIG_GPIO_74XX_MMIO is not set -# CONFIG_GPIO_ALTERA is not set -# CONFIG_GPIO_DWAPB is not set -# CONFIG_GPIO_EM is not set -CONFIG_GPIO_GENERIC_PLATFORM=y -# CONFIG_GPIO_GRGPIO is not set -CONFIG_GPIO_PL061=y -# CONFIG_GPIO_VX855 is not set -# CONFIG_GPIO_XILINX is not set -# CONFIG_GPIO_ZEVIO is not set -# CONFIG_GPIO_ZX is not set - -# -# I2C GPIO expanders -# -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set - -# -# MFD GPIO expanders -# - -# -# PCI GPIO expanders -# -# CONFIG_GPIO_AMD8111 is not set -# CONFIG_GPIO_BT8XX is not set -# CONFIG_GPIO_ML_IOH is not set -# CONFIG_GPIO_RDC321X is not set - -# -# SPI GPIO expanders -# -# CONFIG_GPIO_74X164 is not set -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MC33880 is not set - -# -# SPI or I2C GPIO expanders -# -# CONFIG_GPIO_MCP23S08 is not set - -# -# USB GPIO expanders -# -# CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set -# CONFIG_POWER_AVS is not set -# CONFIG_HWMON is not set -# CONFIG_THERMAL is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_CORE=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_GPIO_WATCHDOG is not set -# CONFIG_XILINX_WATCHDOG is not set -CONFIG_ARM_SP805_WATCHDOG=y -# CONFIG_CADENCE_WATCHDOG is not set -# CONFIG_DW_WATCHDOG is not set -# CONFIG_MAX63XX_WATCHDOG is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_I6300ESB_WDT is not set -# CONFIG_BCM7038_WDT is not set -# CONFIG_MEN_A21_WDT is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y - -# -# Broadcom specific AMBA -# -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_MFD_AS3722 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_ATMEL_FLEXCOM is not set -# CONFIG_MFD_ATMEL_HLCDC is not set -# CONFIG_MFD_BCM590XX is not set -# CONFIG_MFD_AXP20X is not set -# CONFIG_MFD_CROS_EC is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_DA9062 is not set -# CONFIG_MFD_DA9063 is not set -# CONFIG_MFD_DA9150 is not set -# CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -# CONFIG_MFD_HI6421_PMIC is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_LPC_ICH is not set -# CONFIG_LPC_SCH is not set -# CONFIG_INTEL_SOC_PMIC is not set -# CONFIG_MFD_JANZ_CMODIO is not set -# CONFIG_MFD_KEMPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX14577 is not set -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX77843 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_MFD_MT6397 is not set -# CONFIG_MFD_MENF21BMC is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_PM8921_CORE is not set -# CONFIG_MFD_RDC321X is not set -# CONFIG_MFD_RTSX_PCI is not set -# CONFIG_MFD_RT5033 is not set -# CONFIG_MFD_RTSX_USB is not set -# CONFIG_MFD_RC5T583 is not set -# CONFIG_MFD_RK808 is not set -# CONFIG_MFD_RN5T618 is not set -# CONFIG_MFD_SEC_CORE is not set -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SKY81452 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP3943 is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS65218 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set -# CONFIG_MFD_TC6393XB is not set -# CONFIG_MFD_VX855 is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -# CONFIG_REGULATOR_DEBUG is not set -# CONFIG_REGULATOR_FIXED_VOLTAGE is not set -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set -# CONFIG_REGULATOR_ACT8865 is not set -# CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_DA9210 is not set -# CONFIG_REGULATOR_DA9211 is not set -# CONFIG_REGULATOR_FAN53555 is not set -# CONFIG_REGULATOR_GPIO is not set -# CONFIG_REGULATOR_ISL9305 is not set -# CONFIG_REGULATOR_ISL6271A is not set -# CONFIG_REGULATOR_LP3971 is not set -# CONFIG_REGULATOR_LP3972 is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_LP8755 is not set -# CONFIG_REGULATOR_LTC3589 is not set -# CONFIG_REGULATOR_MAX1586 is not set -# CONFIG_REGULATOR_MAX8649 is not set -# CONFIG_REGULATOR_MAX8660 is not set -# CONFIG_REGULATOR_MAX8952 is not set -# CONFIG_REGULATOR_MAX8973 is not set -# CONFIG_REGULATOR_MT6311 is not set -# CONFIG_REGULATOR_PFUZE100 is not set -# CONFIG_REGULATOR_TPS51632 is not set -# CONFIG_REGULATOR_TPS62360 is not set -# CONFIG_REGULATOR_TPS65023 is not set -# CONFIG_REGULATOR_TPS6507X is not set -# CONFIG_REGULATOR_TPS6524X is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -# CONFIG_MEDIA_SDR_SUPPORT is not set -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_DEV=y -# CONFIG_VIDEO_V4L2_SUBDEV_API is not set -CONFIG_VIDEO_V4L2=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEOBUF_GEN=m -CONFIG_VIDEOBUF_VMALLOC=m -CONFIG_VIDEOBUF_DVB=m -CONFIG_VIDEOBUF2_CORE=m -CONFIG_VIDEOBUF2_MEMOPS=m -CONFIG_VIDEOBUF2_VMALLOC=m -CONFIG_DVB_CORE=y -CONFIG_DVB_NET=y -CONFIG_TTPCI_EEPROM=m -CONFIG_DVB_MAX_ADAPTERS=8 -CONFIG_DVB_DYNAMIC_MINORS=y - -# -# Media drivers -# -CONFIG_RC_CORE=y -CONFIG_RC_MAP=y -CONFIG_RC_DECODERS=y -# CONFIG_LIRC is not set -CONFIG_IR_NEC_DECODER=y -CONFIG_IR_RC5_DECODER=y -CONFIG_IR_RC6_DECODER=y -CONFIG_IR_JVC_DECODER=y -CONFIG_IR_SONY_DECODER=y -CONFIG_IR_SANYO_DECODER=y -CONFIG_IR_SHARP_DECODER=y -CONFIG_IR_MCE_KBD_DECODER=y -CONFIG_IR_XMP_DECODER=y -# CONFIG_RC_DEVICES is not set -CONFIG_MEDIA_USB_SUPPORT=y - -# -# Webcam devices -# -# CONFIG_USB_VIDEO_CLASS is not set -CONFIG_USB_GSPCA=m -# CONFIG_USB_M5602 is not set -# CONFIG_USB_STV06XX is not set -# CONFIG_USB_GL860 is not set -# CONFIG_USB_GSPCA_BENQ is not set -# CONFIG_USB_GSPCA_CONEX is not set -# CONFIG_USB_GSPCA_CPIA1 is not set -# CONFIG_USB_GSPCA_DTCS033 is not set -# CONFIG_USB_GSPCA_ETOMS is not set -# CONFIG_USB_GSPCA_FINEPIX is not set -# CONFIG_USB_GSPCA_JEILINJ is not set -# CONFIG_USB_GSPCA_JL2005BCD is not set -# CONFIG_USB_GSPCA_KINECT is not set -# CONFIG_USB_GSPCA_KONICA is not set -# CONFIG_USB_GSPCA_MARS is not set -# CONFIG_USB_GSPCA_MR97310A is not set -# CONFIG_USB_GSPCA_NW80X is not set -# CONFIG_USB_GSPCA_OV519 is not set -# CONFIG_USB_GSPCA_OV534 is not set -# CONFIG_USB_GSPCA_OV534_9 is not set -# CONFIG_USB_GSPCA_PAC207 is not set -# CONFIG_USB_GSPCA_PAC7302 is not set -# CONFIG_USB_GSPCA_PAC7311 is not set -# CONFIG_USB_GSPCA_SE401 is not set -# CONFIG_USB_GSPCA_SN9C2028 is not set -# CONFIG_USB_GSPCA_SN9C20X is not set -# CONFIG_USB_GSPCA_SONIXB is not set -# CONFIG_USB_GSPCA_SONIXJ is not set -# CONFIG_USB_GSPCA_SPCA500 is not set -# CONFIG_USB_GSPCA_SPCA501 is not set -# CONFIG_USB_GSPCA_SPCA505 is not set -# CONFIG_USB_GSPCA_SPCA506 is not set -# CONFIG_USB_GSPCA_SPCA508 is not set -# CONFIG_USB_GSPCA_SPCA561 is not set -# CONFIG_USB_GSPCA_SPCA1528 is not set -# CONFIG_USB_GSPCA_SQ905 is not set -# CONFIG_USB_GSPCA_SQ905C is not set -# CONFIG_USB_GSPCA_SQ930X is not set -# CONFIG_USB_GSPCA_STK014 is not set -# CONFIG_USB_GSPCA_STK1135 is not set -# CONFIG_USB_GSPCA_STV0680 is not set -# CONFIG_USB_GSPCA_SUNPLUS is not set -# CONFIG_USB_GSPCA_T613 is not set -# CONFIG_USB_GSPCA_TOPRO is not set -# CONFIG_USB_GSPCA_TOUPTEK is not set -# CONFIG_USB_GSPCA_TV8532 is not set -# CONFIG_USB_GSPCA_VC032X is not set -# CONFIG_USB_GSPCA_VICAM is not set -# CONFIG_USB_GSPCA_XIRLINK_CIT is not set -# CONFIG_USB_GSPCA_ZC3XX is not set -# CONFIG_USB_PWC is not set -# CONFIG_VIDEO_CPIA2 is not set -# CONFIG_USB_ZR364XX is not set -# CONFIG_USB_STKWEBCAM is not set -# CONFIG_USB_S2255 is not set -# CONFIG_VIDEO_USBTV is not set - -# -# Analog TV USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_SYSFS=y -CONFIG_VIDEO_PVRUSB2_DVB=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_USBVISION=m -# CONFIG_VIDEO_STK1160_COMMON is not set -# CONFIG_VIDEO_GO7007 is not set - -# -# Analog/digital TV USB devices -# -CONFIG_VIDEO_AU0828=m -CONFIG_VIDEO_AU0828_V4L2=y -# CONFIG_VIDEO_AU0828_RC is not set -CONFIG_VIDEO_CX231XX=m -CONFIG_VIDEO_CX231XX_RC=y -CONFIG_VIDEO_CX231XX_ALSA=m -CONFIG_VIDEO_CX231XX_DVB=m -CONFIG_VIDEO_TM6000=m -CONFIG_VIDEO_TM6000_ALSA=m -CONFIG_VIDEO_TM6000_DVB=m - -# -# Digital TV USB devices -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_DIB0700=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_M920X=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_TTUSB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_USB_OPERA1=m -CONFIG_DVB_USB_AF9005=m -# CONFIG_DVB_USB_AF9005_REMOTE is not set -CONFIG_DVB_USB_PCTV452E=m -CONFIG_DVB_USB_DW2102=m -CONFIG_DVB_USB_CINERGY_T2=m -CONFIG_DVB_USB_DTV5100=m -CONFIG_DVB_USB_FRIIO=m -CONFIG_DVB_USB_AZ6027=m -CONFIG_DVB_USB_TECHNISAT_USB2=m -CONFIG_DVB_USB_V2=m -CONFIG_DVB_USB_AF9015=m -CONFIG_DVB_USB_AF9035=m -CONFIG_DVB_USB_ANYSEE=m -CONFIG_DVB_USB_AU6610=m -CONFIG_DVB_USB_AZ6007=m -CONFIG_DVB_USB_CE6230=m -CONFIG_DVB_USB_EC168=m -CONFIG_DVB_USB_GL861=m -CONFIG_DVB_USB_LME2510=m -CONFIG_DVB_USB_MXL111SF=m -CONFIG_DVB_USB_RTL28XXU=m -CONFIG_DVB_USB_DVBSKY=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_SMS_USB_DRV=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set -CONFIG_DVB_AS102=m - -# -# Webcam, TV (analog/digital) USB devices -# -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_EM28XX_V4L2=m -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_EM28XX_DVB=m -# CONFIG_VIDEO_EM28XX_RC is not set -# CONFIG_MEDIA_PCI_SUPPORT is not set -CONFIG_V4L_PLATFORM_DRIVERS=y -# CONFIG_VIDEO_CAFE_CCIC is not set -# CONFIG_SOC_CAMERA is not set -# CONFIG_V4L_MEM2MEM_DRIVERS is not set -# CONFIG_V4L_TEST_DRIVERS is not set -CONFIG_DVB_PLATFORM_DRIVERS=y - -# -# Supported MMC/SDIO adapters -# -# CONFIG_SMS_SDIO_DRV is not set -CONFIG_RADIO_ADAPTERS=y -# CONFIG_RADIO_SI470X is not set -# CONFIG_RADIO_SI4713 is not set -# CONFIG_USB_MR800 is not set -# CONFIG_USB_DSBR is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_SHARK is not set -# CONFIG_RADIO_SHARK2 is not set -# CONFIG_USB_KEENE is not set -# CONFIG_USB_RAREMONO is not set -# CONFIG_USB_MA901 is not set -# CONFIG_RADIO_TEA5764 is not set -# CONFIG_RADIO_SAA7706H is not set -# CONFIG_RADIO_TEF6862 is not set -# CONFIG_RADIO_WL1273 is not set - -# -# Texas Instruments WL128x FM driver (ST based) -# -CONFIG_MEDIA_COMMON_OPTIONS=y - -# -# common driver options -# -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_CYPRESS_FIRMWARE=m -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_SMS_SIANO_MDTV=m -CONFIG_SMS_SIANO_RC=y - -# -# Media ancillary drivers (tuners, sensors, i2c, frontends) -# -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=y - -# -# Encoders, decoders, sensors and other helper chips -# - -# -# Audio decoders, processors and mixers -# -# CONFIG_VIDEO_TVAUDIO is not set -# CONFIG_VIDEO_TDA7432 is not set -# CONFIG_VIDEO_TDA9840 is not set -# CONFIG_VIDEO_TEA6415C is not set -# CONFIG_VIDEO_TEA6420 is not set -CONFIG_VIDEO_MSP3400=m -# CONFIG_VIDEO_CS5345 is not set -CONFIG_VIDEO_CS53L32A=m -# CONFIG_VIDEO_TLV320AIC23B is not set -# CONFIG_VIDEO_UDA1342 is not set -CONFIG_VIDEO_WM8775=m -# CONFIG_VIDEO_WM8739 is not set -# CONFIG_VIDEO_VP27SMPX is not set -# CONFIG_VIDEO_SONY_BTF_MPX is not set - -# -# RDS decoders -# -# CONFIG_VIDEO_SAA6588 is not set - -# -# Video decoders -# -# CONFIG_VIDEO_ADV7183 is not set -# CONFIG_VIDEO_BT819 is not set -# CONFIG_VIDEO_BT856 is not set -# CONFIG_VIDEO_BT866 is not set -# CONFIG_VIDEO_KS0127 is not set -# CONFIG_VIDEO_ML86V7667 is not set -# CONFIG_VIDEO_SAA7110 is not set -CONFIG_VIDEO_SAA711X=m -# CONFIG_VIDEO_TVP514X is not set -# CONFIG_VIDEO_TVP5150 is not set -# CONFIG_VIDEO_TVP7002 is not set -# CONFIG_VIDEO_TW2804 is not set -# CONFIG_VIDEO_TW9903 is not set -# CONFIG_VIDEO_TW9906 is not set -# CONFIG_VIDEO_VPX3220 is not set - -# -# Video and audio decoders -# -# CONFIG_VIDEO_SAA717X is not set -CONFIG_VIDEO_CX25840=m - -# -# Video encoders -# -# CONFIG_VIDEO_SAA7127 is not set -# CONFIG_VIDEO_SAA7185 is not set -# CONFIG_VIDEO_ADV7170 is not set -# CONFIG_VIDEO_ADV7175 is not set -# CONFIG_VIDEO_ADV7343 is not set -# CONFIG_VIDEO_ADV7393 is not set -# CONFIG_VIDEO_AK881X is not set -# CONFIG_VIDEO_THS8200 is not set - -# -# Camera sensor devices -# -# CONFIG_VIDEO_OV2659 is not set -# CONFIG_VIDEO_OV7640 is not set -# CONFIG_VIDEO_OV7670 is not set -# CONFIG_VIDEO_VS6624 is not set -# CONFIG_VIDEO_MT9V011 is not set -# CONFIG_VIDEO_SR030PC30 is not set - -# -# Flash devices -# -# CONFIG_VIDEO_ADP1653 is not set -# CONFIG_VIDEO_AS3645A is not set -# CONFIG_VIDEO_LM3560 is not set -# CONFIG_VIDEO_LM3646 is not set - -# -# Video improvement chips -# -# CONFIG_VIDEO_UPD64031A is not set -# CONFIG_VIDEO_UPD64083 is not set - -# -# Audio/Video compression chips -# -# CONFIG_VIDEO_SAA6752HS is not set - -# -# Miscellaneous helper chips -# -# CONFIG_VIDEO_THS7303 is not set -# CONFIG_VIDEO_M52790 is not set - -# -# Sensors used on soc_camera driver -# -CONFIG_MEDIA_TUNER=y - -# -# Customize TV tuners -# -CONFIG_MEDIA_TUNER_SIMPLE=y -CONFIG_MEDIA_TUNER_TDA18250=y -CONFIG_MEDIA_TUNER_TDA8290=y -CONFIG_MEDIA_TUNER_TDA827X=y -CONFIG_MEDIA_TUNER_TDA18271=y -CONFIG_MEDIA_TUNER_TDA9887=y -CONFIG_MEDIA_TUNER_TEA5761=m -CONFIG_MEDIA_TUNER_TEA5767=m -CONFIG_MEDIA_TUNER_MSI001=m -CONFIG_MEDIA_TUNER_MT20XX=y -CONFIG_MEDIA_TUNER_MT2060=m -CONFIG_MEDIA_TUNER_MT2063=m -CONFIG_MEDIA_TUNER_MT2266=m -CONFIG_MEDIA_TUNER_MT2131=m -CONFIG_MEDIA_TUNER_QT1010=m -CONFIG_MEDIA_TUNER_XC2028=y -CONFIG_MEDIA_TUNER_XC5000=y -CONFIG_MEDIA_TUNER_XC4000=y -CONFIG_MEDIA_TUNER_MXL5005S=m -CONFIG_MEDIA_TUNER_MXL5007T=m -CONFIG_MEDIA_TUNER_MC44S803=y -CONFIG_MEDIA_TUNER_MAX2165=m -CONFIG_MEDIA_TUNER_TDA18218=m -CONFIG_MEDIA_TUNER_FC0011=m -CONFIG_MEDIA_TUNER_FC0012=m -CONFIG_MEDIA_TUNER_FC0013=m -CONFIG_MEDIA_TUNER_TDA18212=m -CONFIG_MEDIA_TUNER_E4000=m -CONFIG_MEDIA_TUNER_FC2580=m -CONFIG_MEDIA_TUNER_M88RS6000T=m -CONFIG_MEDIA_TUNER_TUA9001=m -CONFIG_MEDIA_TUNER_SI2157=m -CONFIG_MEDIA_TUNER_IT913X=m -CONFIG_MEDIA_TUNER_R820T=m -CONFIG_MEDIA_TUNER_MXL301RF=m -CONFIG_MEDIA_TUNER_QM1D1C0042=m - -# -# Customise DVB Frontends -# - -# -# Multistandard (satellite) frontends -# -CONFIG_DVB_STB0899=m -CONFIG_DVB_STB6100=m -CONFIG_DVB_STV090x=m -CONFIG_DVB_STV6110x=m -CONFIG_DVB_M88DS3103=m - -# -# Multistandard (cable + terrestrial) frontends -# -CONFIG_DVB_DRXK=m -CONFIG_DVB_TDA18271C2DD=m -CONFIG_DVB_SI2165=m - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_MT312=m -CONFIG_DVB_ZL10036=m -CONFIG_DVB_ZL10039=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_STV0288=m -CONFIG_DVB_STB6000=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_STV6110=m -CONFIG_DVB_STV0900=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_TDA10086=m -CONFIG_DVB_TDA8261=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TUNER_ITD1000=m -CONFIG_DVB_TUNER_CX24113=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TUA6100=m -CONFIG_DVB_CX24116=m -CONFIG_DVB_CX24117=m -CONFIG_DVB_CX24120=m -CONFIG_DVB_SI21XX=m -CONFIG_DVB_TS2020=m -CONFIG_DVB_DS3000=m -CONFIG_DVB_MB86A16=m -CONFIG_DVB_TDA10071=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_S5H1432=m -CONFIG_DVB_DRXD=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m -CONFIG_DVB_DIB9000=m -CONFIG_DVB_TDA10048=m -CONFIG_DVB_AF9013=m -CONFIG_DVB_EC100=m -CONFIG_DVB_HD29L2=m -CONFIG_DVB_STV0367=m -CONFIG_DVB_CXD2820R=m -CONFIG_DVB_CXD2841ER=m -CONFIG_DVB_RTL2830=m -CONFIG_DVB_RTL2832=m -CONFIG_DVB_SI2168=m -CONFIG_DVB_AS102_FE=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_DVB_LGDT3305=m -CONFIG_DVB_LGDT3306A=m -CONFIG_DVB_LG2160=m -CONFIG_DVB_S5H1409=m -CONFIG_DVB_AU8522=m -CONFIG_DVB_AU8522_DTV=m -CONFIG_DVB_AU8522_V4L=m -CONFIG_DVB_S5H1411=m - -# -# ISDB-T (terrestrial) frontends -# -CONFIG_DVB_S921=m -CONFIG_DVB_DIB8000=m -CONFIG_DVB_MB86A20S=m - -# -# ISDB-S (satellite) & ISDB-T (terrestrial) frontends -# -CONFIG_DVB_TC90522=m - -# -# Digital terrestrial only tuners/PLL -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TUNER_DIB0070=m -CONFIG_DVB_TUNER_DIB0090=m - -# -# SEC control devices for DVB-S -# -CONFIG_DVB_DRX39XYJ=m -CONFIG_DVB_LNBH25=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_LNBP22=m -CONFIG_DVB_ISL6405=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_ISL6423=m -CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m -CONFIG_DVB_LGS8GL5=m -CONFIG_DVB_LGS8GXX=m -CONFIG_DVB_ATBM8830=m -CONFIG_DVB_TDA665x=m -CONFIG_DVB_IX2505V=m -CONFIG_DVB_M88RS2000=m -CONFIG_DVB_AF9033=m -CONFIG_DVB_HORUS3A=m -CONFIG_DVB_ASCOT2E=m - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -CONFIG_VGA_ARB=y -CONFIG_VGA_ARB_MAX_GPUS=16 -# CONFIG_DRM is not set - -# -# Frame buffer Devices -# -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_CMDLINE=y -CONFIG_FB_NOTIFY=y -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_OPENCORES is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I740 is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_S3 is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_VT8623 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_ARK is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_CARMINE is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_IBM_GXT4500 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_FB_SSD1307 is not set -# CONFIG_FB_SM712 is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=m -# CONFIG_LCD_L4F00242T03 is not set -# CONFIG_LCD_LMS283GF05 is not set -# CONFIG_LCD_LTV350QV is not set -# CONFIG_LCD_ILI922X is not set -# CONFIG_LCD_ILI9320 is not set -# CONFIG_LCD_TDO24M is not set -# CONFIG_LCD_VGG2432A4 is not set -# CONFIG_LCD_PLATFORM is not set -# CONFIG_LCD_S6E63M0 is not set -# CONFIG_LCD_LD9040 is not set -# CONFIG_LCD_AMS369FG06 is not set -# CONFIG_LCD_LMS501KF03 is not set -# CONFIG_LCD_HX8357 is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_GENERIC=m -# CONFIG_BACKLIGHT_PM8941_WLED is not set -# CONFIG_BACKLIGHT_ADP8860 is not set -# CONFIG_BACKLIGHT_ADP8870 is not set -# CONFIG_BACKLIGHT_LM3639 is not set -# CONFIG_BACKLIGHT_GPIO is not set -# CONFIG_BACKLIGHT_LV5207LP is not set -# CONFIG_BACKLIGHT_BD6107 is not set -# CONFIG_ADF is not set -# CONFIG_VGASTATE is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set -# CONFIG_LOGO is not set -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_JACK=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -CONFIG_SND_PCM_TIMER=y -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_PROC_FS=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_PCI=y -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AW2 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_OXYGEN is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CTXFI is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set -# CONFIG_SND_INDIGOIOX is not set -# CONFIG_SND_INDIGODJX is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_LOLA is not set -# CONFIG_SND_LX6464ES is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SE6X is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VIRTUOSO is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# HD-Audio -# -# CONFIG_SND_HDA_INTEL is not set -CONFIG_SND_HDA_PREALLOC_SIZE=64 -CONFIG_SND_ARM=y -# CONFIG_SND_ARMAACI is not set -CONFIG_SND_SPI=y -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -# CONFIG_SND_USB_HIFACE is not set -# CONFIG_SND_BCD2000 is not set -# CONFIG_SND_USB_POD is not set -# CONFIG_SND_USB_PODHD is not set -# CONFIG_SND_USB_TONEPORT is not set -# CONFIG_SND_USB_VARIAX is not set -CONFIG_SND_SOC=y -# CONFIG_SND_ATMEL_SOC is not set -# CONFIG_SND_DESIGNWARE_I2S is not set - -# -# SoC Audio for Freescale CPUs -# - -# -# Common SoC Audio options for Freescale CPUs: -# -# CONFIG_SND_SOC_FSL_ASRC is not set -# CONFIG_SND_SOC_FSL_SAI is not set -# CONFIG_SND_SOC_FSL_SSI is not set -# CONFIG_SND_SOC_FSL_SPDIF is not set -# CONFIG_SND_SOC_FSL_ESAI is not set -# CONFIG_SND_SOC_IMX_AUDMUX is not set - -# -# Allwinner SoC Audio support -# -# CONFIG_SND_SUN4I_CODEC is not set -# CONFIG_SND_SOC_XTFPGA_I2S is not set -CONFIG_SND_SOC_I2C_AND_SPI=y - -# -# CODEC drivers -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_ADAU1701 is not set -# CONFIG_SND_SOC_AK4104 is not set -# CONFIG_SND_SOC_AK4554 is not set -# CONFIG_SND_SOC_AK4613 is not set -# CONFIG_SND_SOC_AK4642 is not set -# CONFIG_SND_SOC_AK5386 is not set -# CONFIG_SND_SOC_ALC5623 is not set -# CONFIG_SND_SOC_CS35L32 is not set -# CONFIG_SND_SOC_CS42L51_I2C is not set -# CONFIG_SND_SOC_CS42L52 is not set -# CONFIG_SND_SOC_CS42L56 is not set -# CONFIG_SND_SOC_CS42L73 is not set -# CONFIG_SND_SOC_CS4265 is not set -# CONFIG_SND_SOC_CS4270 is not set -# CONFIG_SND_SOC_CS4271_I2C is not set -# CONFIG_SND_SOC_CS4271_SPI is not set -# CONFIG_SND_SOC_CS42XX8_I2C is not set -# CONFIG_SND_SOC_CS4349 is not set -# CONFIG_SND_SOC_ES8328 is not set -# CONFIG_SND_SOC_GTM601 is not set -# CONFIG_SND_SOC_PCM1681 is not set -# CONFIG_SND_SOC_PCM1792A is not set -# CONFIG_SND_SOC_PCM512x_I2C is not set -# CONFIG_SND_SOC_PCM512x_SPI is not set -# CONFIG_SND_SOC_RT5631 is not set -# CONFIG_SND_SOC_RT5677_SPI is not set -# CONFIG_SND_SOC_SGTL5000 is not set -# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set -# CONFIG_SND_SOC_SPDIF is not set -# CONFIG_SND_SOC_SSM2602_SPI is not set -# CONFIG_SND_SOC_SSM2602_I2C is not set -# CONFIG_SND_SOC_SSM4567 is not set -# CONFIG_SND_SOC_STA32X is not set -# CONFIG_SND_SOC_STA350 is not set -# CONFIG_SND_SOC_STI_SAS is not set -# CONFIG_SND_SOC_TAS2552 is not set -# CONFIG_SND_SOC_TAS5086 is not set -# CONFIG_SND_SOC_TAS571X is not set -# CONFIG_SND_SOC_TFA9879 is not set -# CONFIG_SND_SOC_TLV320AIC23_I2C is not set -# CONFIG_SND_SOC_TLV320AIC23_SPI is not set -# CONFIG_SND_SOC_TLV320AIC31XX is not set -# CONFIG_SND_SOC_TLV320AIC3X is not set -# CONFIG_SND_SOC_TS3A227E is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8523 is not set -# CONFIG_SND_SOC_WM8580 is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8728 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8737 is not set -# CONFIG_SND_SOC_WM8741 is not set -# CONFIG_SND_SOC_WM8750 is not set -# CONFIG_SND_SOC_WM8753 is not set -# CONFIG_SND_SOC_WM8770 is not set -# CONFIG_SND_SOC_WM8776 is not set -# CONFIG_SND_SOC_WM8804_I2C is not set -# CONFIG_SND_SOC_WM8804_SPI is not set -# CONFIG_SND_SOC_WM8903 is not set -# CONFIG_SND_SOC_WM8962 is not set -# CONFIG_SND_SOC_WM8978 is not set -# CONFIG_SND_SOC_TPA6130A2 is not set -# CONFIG_SND_SIMPLE_CARD is not set -# CONFIG_SOUND_PRIME is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -# CONFIG_HID_BETOP_FF is not set -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_CORSAIR is not set -# CONFIG_HID_PRODIKEYS is not set -# CONFIG_HID_CP2112 is not set -CONFIG_HID_CYPRESS=y -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -# CONFIG_HID_ELO is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_GEMBIRD is not set -# CONFIG_HID_GFRM is not set -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_GT683R is not set -# CONFIG_HID_KEYTOUCH is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_ICADE is not set -# CONFIG_HID_TWINHAN is not set -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LENOVO is not set -CONFIG_HID_LOGITECH=y -# CONFIG_HID_LOGITECH_HIDPP is not set -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PENMOUNT is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PLANTRONICS is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_RMI is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TIVO is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THINGM is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -# CONFIG_HID_XINMO is not set -# CONFIG_HID_ZEROPLUS is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -CONFIG_USB_HIDDEV=y - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_ULPI_BUS is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_PCI=y -CONFIG_USB_XHCI_PLATFORM=y -CONFIG_USB_XHCI_HISILICON=y -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_EHCI_PCI=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_FOTG210_HCD is not set -# CONFIG_USB_MAX3421_HCD is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PCI=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HCD_TEST_MODE is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -# CONFIG_USB_PRINTER is not set -CONFIG_USB_WDM=m -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_STORAGE_ENE_UB6250 is not set -CONFIG_USB_UAS=y - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USBIP_CORE is not set -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_DWC3 is not set -# CONFIG_USB_DWC2 is not set -# CONFIG_USB_CHIPIDEA is not set -# CONFIG_USB_ISP1760 is not set - -# -# USB port drivers -# -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_SIMPLE is not set -# CONFIG_USB_SERIAL_AIRCABLE is not set -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_CH341=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -CONFIG_USB_SERIAL_CP210X=m -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -CONFIG_USB_SERIAL_F81232=m -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -CONFIG_USB_SERIAL_IUU=m -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_METRO is not set -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_MXUPORT is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_QCAUX is not set -# CONFIG_USB_SERIAL_QUALCOMM is not set -# CONFIG_USB_SERIAL_SPCP8X5 is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_SYMBOL is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -CONFIG_USB_SERIAL_WWAN=m -CONFIG_USB_SERIAL_OPTION=m -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_SERIAL_OPTICON is not set -# CONFIG_USB_SERIAL_XSENS_MT is not set -# CONFIG_USB_SERIAL_WISHBONE is not set -# CONFIG_USB_SERIAL_SSU100 is not set -# CONFIG_USB_SERIAL_QT2 is not set -# CONFIG_USB_SERIAL_DEBUG is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_EHSET_TEST_FIXTURE is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -CONFIG_USB_EZUSB_FX2=m -# CONFIG_USB_HSIC_USB3503 is not set -# CONFIG_USB_LINK_LAYER_TEST is not set -# CONFIG_USB_CHAOSKEY is not set - -# -# USB Physical Layer drivers -# -# CONFIG_USB_PHY is not set -# CONFIG_USB_OTG_WAKELOCK is not set -# CONFIG_NOP_USB_XCEIV is not set -# CONFIG_AM335X_PHY_USB is not set -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_ULPI is not set -# CONFIG_USB_GADGET is not set -# CONFIG_USB_LED_TRIG is not set -# CONFIG_UWB is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_EMBEDDED_SDIO=y -# CONFIG_MMC_PARANOID_SD_INIT is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=8 -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set -# CONFIG_MMC_SIMULATE_MAX_SPEED is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -CONFIG_HIMCIV300_SDIO_SYNOPSYS=y -# CONFIG_MMC_ARMMMCI is not set -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_TIFM_SD is not set -# CONFIG_MMC_CB710 is not set -# CONFIG_MMC_VIA_SDMMC is not set -# CONFIG_MMC_DW is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MMC_USDHI6ROL0 is not set -# CONFIG_MMC_TOSHIBA_PCI is not set -# CONFIG_MMC_MTK is not set -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -# CONFIG_LEDS_CLASS_FLASH is not set - -# -# LED drivers -# -# CONFIG_LEDS_BCM6328 is not set -# CONFIG_LEDS_BCM6358 is not set -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -# CONFIG_LEDS_GPIO is not set -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_LP8501 is not set -# CONFIG_LEDS_LP8860 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA963X is not set -# CONFIG_LEDS_DAC124S085 is not set -# CONFIG_LEDS_REGULATOR is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_TLC591XX is not set -# CONFIG_LEDS_LM355x is not set - -# -# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) -# -# CONFIG_LEDS_BLINKM is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -# CONFIG_LEDS_TRIGGER_TIMER is not set -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_CPU is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set -# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -# CONFIG_ACCESSIBILITY is not set -# CONFIG_INFINIBAND is not set -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -# CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -# CONFIG_VFIO is not set -# CONFIG_VIRT_DRIVERS is not set - -# -# Virtio drivers -# -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_MMIO is not set - -# -# Microsoft Hyper-V guest support -# -CONFIG_STAGING=y -CONFIG_PRISM2_USB=m -# CONFIG_COMEDI is not set -# CONFIG_RTL8192U is not set -CONFIG_RTLLIB=m -CONFIG_RTLLIB_CRYPTO_CCMP=m -CONFIG_RTLLIB_CRYPTO_TKIP=m -CONFIG_RTLLIB_CRYPTO_WEP=m -# CONFIG_RTL8192E is not set -CONFIG_R8712U=m -CONFIG_R8188EU=m -# CONFIG_88EU_AP_MODE is not set -CONFIG_R8723AU=m -CONFIG_8723AU_AP_MODE=y -CONFIG_8723AU_BT_COEXIST=y -# CONFIG_RTS5208 is not set -# CONFIG_VT6655 is not set -# CONFIG_VT6656 is not set -# CONFIG_FB_SM750 is not set -# CONFIG_FB_XGI is not set - -# -# Speakup console speech -# -# CONFIG_SPEAKUP is not set -# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set -CONFIG_STAGING_MEDIA=y -# CONFIG_I2C_BCM2048 is not set -# CONFIG_DVB_CXD2099 is not set -CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m - -# -# Android -# -CONFIG_ASHMEM=y -# CONFIG_ANDROID_LOGGER is not set -CONFIG_ANDROID_TIMED_OUTPUT=y -# CONFIG_ANDROID_TIMED_GPIO is not set -# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set -CONFIG_SYNC=y -CONFIG_SW_SYNC=y -CONFIG_SW_SYNC_USER=y -CONFIG_ION=y -# CONFIG_ION_TEST is not set -# CONFIG_ION_DUMMY is not set -CONFIG_ION_HISI=y -# CONFIG_FIQ_DEBUGGER is not set -# CONFIG_FIQ_WATCHDOG is not set -# CONFIG_STAGING_BOARD is not set -# CONFIG_WIMAX_GDM72XX is not set -# CONFIG_LTE_GDM724X is not set -# CONFIG_MTD_SPINAND_MT29F is not set -# CONFIG_LUSTRE_FS is not set -# CONFIG_DGNC is not set -# CONFIG_DGAP is not set -# CONFIG_GS_FPGABOOT is not set -# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set -# CONFIG_FB_TFT is not set -# CONFIG_WILC1000_DRIVER is not set -# CONFIG_MOST is not set -# CONFIG_GOLDFISH is not set -# CONFIG_CHROME_PLATFORMS is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -# CONFIG_COMMON_CLK_SI5351 is not set -# CONFIG_COMMON_CLK_SI514 is not set -# CONFIG_COMMON_CLK_SI570 is not set -# CONFIG_COMMON_CLK_CDCE925 is not set -# CONFIG_CLK_QORIQ is not set -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_CDCE706 is not set - -# -# Hardware Spinlock drivers -# - -# -# Clock Source drivers -# -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y -CONFIG_CLKSRC_MMIO=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_TIMER_SP804=y -# CONFIG_ATMEL_PIT is not set -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set -# CONFIG_MAILBOX is not set -CONFIG_IOMMU_API=y -CONFIG_IOMMU_SUPPORT=y - -# -# Generic IOMMU Pagetable Support -# -# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set -CONFIG_OF_IOMMU=y -CONFIG_HISI_IOMMU_API=y -CONFIG_HISI_IOMMU=y -# CONFIG_ARM_SMMU is not set - -# -# Remoteproc drivers -# -# CONFIG_STE_MODEM_RPROC is not set - -# -# Rpmsg drivers -# - -# -# SOC (System On Chip) specific Drivers -# -# CONFIG_SOC_BRCMSTB is not set -# CONFIG_SUNXI_SRAM is not set -# CONFIG_SOC_TI is not set -CONFIG_PM_DEVFREQ=y - -# -# DEVFREQ Governors -# -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set -# CONFIG_DEVFREQ_GOV_POWERSAVE is not set -# CONFIG_DEVFREQ_GOV_USERSPACE is not set - -# -# DEVFREQ Drivers -# -# CONFIG_PM_DEVFREQ_EVENT is not set -# CONFIG_EXTCON is not set -# CONFIG_MEMORY is not set -# CONFIG_IIO is not set -# CONFIG_NTB is not set -# CONFIG_VME_BUS is not set -# CONFIG_PWM is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -# CONFIG_IPACK_BUS is not set -CONFIG_RESET_CONTROLLER=y -# CONFIG_FMC is not set - -# -# PHY Subsystem -# -CONFIG_GENERIC_PHY=y -# CONFIG_PHY_PXA_28NM_HSIC is not set -# CONFIG_PHY_PXA_28NM_USB2 is not set -# CONFIG_BCM_KONA_USB2_PHY is not set -# CONFIG_POWERCAP is not set -# CONFIG_MCB is not set - -# -# Performance monitor support -# -CONFIG_ARM_PMU=y -CONFIG_RAS=y -# CONFIG_THUNDERBOLT is not set - -# -# Android -# -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDER_DEVICES="binder" -CONFIG_ANDROID_BINDER_IPC_32BIT=y -# CONFIG_NVMEM is not set -# CONFIG_STM is not set -# CONFIG_INTEL_TH is not set - -# -# FPGA Configuration Support -# -# CONFIG_FPGA is not set -# CONFIG_SWITCH is not set - -# -# Firmware Drivers -# -# CONFIG_FIRMWARE_MEMMAP is not set -CONFIG_HAVE_ARM_SMCCC=y - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -# CONFIG_EXT4_ENCRYPTION is not set -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -CONFIG_REISERFS_CHECK=y -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -CONFIG_JFS_DEBUG=y -CONFIG_JFS_STATISTICS=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_XFS_WARN is not set -# CONFIG_XFS_DEBUG is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_F2FS_FS=m -CONFIG_F2FS_STAT_FS=y -CONFIG_F2FS_FS_XATTR=y -CONFIG_F2FS_FS_POSIX_ACL=y -# CONFIG_F2FS_FS_SECURITY is not set -# CONFIG_F2FS_CHECK_FS is not set -# CONFIG_F2FS_FS_ENCRYPTION is not set -# CONFIG_F2FS_IO_TRACE is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=y -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_FANOTIFY is not set -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -CONFIG_QUOTA_TREE=m -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=y -# CONFIG_CUSE is not set -# CONFIG_OVERLAY_FS is not set - -# -# Caches -# -CONFIG_FSCACHE=y -# CONFIG_FSCACHE_STATS is not set -# CONFIG_FSCACHE_HISTOGRAM is not set -# CONFIG_FSCACHE_DEBUG is not set -# CONFIG_FSCACHE_OBJECT_LIST is not set -# CONFIG_CACHEFILES is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -CONFIG_UDF_FS=y -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -# CONFIG_PROC_CHILDREN is not set -CONFIG_KERNFS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TMPFS_XATTR=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_ECRYPT_FS is not set -# CONFIG_SDCARD_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_YAFFS_FS=y -CONFIG_YAFFS_YAFFS1=y -# CONFIG_YAFFS_9BYTE_TAGS is not set -# CONFIG_YAFFS_DOES_ECC is not set -CONFIG_YAFFS_YAFFS2=y -CONFIG_YAFFS_AUTO_YAFFS2=y -# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set -# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set -# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set -# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set -# CONFIG_YAFFS_DISABLE_BACKGROUND is not set -# CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING is not set -CONFIG_YAFFS_XATTR=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -# CONFIG_JFFS2_LZO is not set -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_ATIME_SUPPORT is not set -# CONFIG_LOGFS is not set -CONFIG_CRAMFS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_FILE_CACHE=y -# CONFIG_SQUASHFS_FILE_DIRECT is not set -CONFIG_SQUASHFS_DECOMP_SINGLE=y -# CONFIG_SQUASHFS_DECOMP_MULTI is not set -# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set -CONFIG_SQUASHFS_XATTR=y -CONFIG_SQUASHFS_ZLIB=y -# CONFIG_SQUASHFS_LZ4 is not set -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=y -# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_PSTORE is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V2=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_SWAP=y -CONFIG_NFS_V4_1=y -CONFIG_NFS_V4_2=y -CONFIG_PNFS_FILE_LAYOUT=y -CONFIG_PNFS_FLEXFILE_LAYOUT=m -CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" -# CONFIG_NFS_V4_1_MIGRATION is not set -CONFIG_ROOT_NFS=y -# CONFIG_NFS_FSCACHE is not set -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_USE_KERNEL_DNS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_GRACE_PERIOD=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_SUNRPC_BACKCHANNEL=y -CONFIG_SUNRPC_SWAP=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_SUNRPC_DEBUG is not set -# CONFIG_CEPH_FS is not set -CONFIG_CIFS=y -CONFIG_CIFS_STATS=y -# CONFIG_CIFS_STATS2 is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_UPCALL is not set -CONFIG_CIFS_XATTR=y -# CONFIG_CIFS_POSIX is not set -# CONFIG_CIFS_ACL is not set -# CONFIG_CIFS_DEBUG is not set -CONFIG_CIFS_DFS_UPCALL=y -CONFIG_CIFS_SMB2=y -CONFIG_CIFS_SMB311=y -CONFIG_CIFS_FSCACHE=y -# CONFIG_NCP_FS is not set -CONFIG_CODA_FS=m -# CONFIG_AFS_FS is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=y -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# - -# -# printk and dmesg options -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_BOOT_PRINTK_DELAY is not set -CONFIG_DYNAMIC_DEBUG=y - -# -# Compile-time checks and compiler options -# -# CONFIG_DEBUG_INFO is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1024 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_PAGE_OWNER is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -CONFIG_DEBUG_KERNEL=y - -# -# Memory Debugging -# -# CONFIG_PAGE_EXTENSION is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_SHIRQ is not set - -# -# Debug Lockups and Hangs -# -CONFIG_LOCKUP_DETECTOR=y -CONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y -CONFIG_HARDLOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y -CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1 -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -CONFIG_SCHED_DEBUG=y -# CONFIG_SCHED_INFO is not set -# CONFIG_PANIC_ON_RT_THROTTLING is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_SCHED_STACK_END_CHECK is not set -# CONFIG_DEBUG_TIMEKEEPING is not set -# CONFIG_TIMER_STATS is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_LOCK_TORTURE_TEST is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_PI_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_SPARSE_RCU_POINTER is not set -# CONFIG_TORTURE_TEST is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -# CONFIG_RCU_TRACE is not set -# CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_TRACING=y -CONFIG_GENERIC_TRACER=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -CONFIG_FUNCTION_TRACER=y -CONFIG_FUNCTION_GRAPH_TRACER=y -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_UPROBE_EVENT is not set -# CONFIG_PROBE_EVENTS is not set -CONFIG_DYNAMIC_FTRACE=y -# CONFIG_FUNCTION_PROFILER is not set -CONFIG_FTRACE_MCOUNT_RECORD=y -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_TRACEPOINT_BENCHMARK is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_TRACE_ENUM_MAP_FILE is not set -CONFIG_TRACING_EVENTS_GPIO=y - -# -# Runtime Testing -# -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_RBTREE_TEST is not set -# CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_PERCPU_TEST is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_TEST_HEXDUMP is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_DMA_API_DEBUG is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_TEST_FIRMWARE is not set -CONFIG_TEST_UDELAY=m -# CONFIG_MEMTEST is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_ARM_PTDUMP is not set -CONFIG_STRICT_DEVMEM=y -CONFIG_ARM_UNWIND=y -CONFIG_OLD_MCOUNT=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_LL is not set -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -# CONFIG_DEBUG_UART_8250 is not set -CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_DEBUG_SET_MODULE_RONX is not set -# CONFIG_CORESIGHT is not set - -# -# Security options -# -CONFIG_KEYS=y -# CONFIG_PERSISTENT_KEYRINGS is not set -# CONFIG_BIG_KEYS is not set -# CONFIG_ENCRYPTED_KEYS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -# CONFIG_SECURITY_PERF_EVENTS_RESTRICT is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set -CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y -CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y -# CONFIG_HARDENED_USERCOPY is not set -CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_SECURITY="" -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_PCOMP2=y -CONFIG_CRYPTO_AKCIPHER2=y -# CONFIG_CRYPTO_RSA is not set -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -CONFIG_CRYPTO_GF128MUL=m -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -# CONFIG_CRYPTO_MCRYPTD is not set -CONFIG_CRYPTO_AUTHENC=m -# CONFIG_CRYPTO_TEST is not set - -# -# Authenticated Encryption with Associated Data -# -CONFIG_CRYPTO_CCM=y -CONFIG_CRYPTO_GCM=m -# CONFIG_CRYPTO_CHACHA20POLY1305 is not set -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_ECHAINIV=m - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTR=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_ECB=y -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set -# CONFIG_CRYPTO_KEYWRAP is not set - -# -# Hash modes -# -CONFIG_CRYPTO_CMAC=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRC32=m -# CONFIG_CRYPTO_CRCT10DIF is not set -CONFIG_CRYPTO_GHASH=m -# CONFIG_CRYPTO_POLY1305 is not set -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_CHACHA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -CONFIG_CRYPTO_DEFLATE=y -# CONFIG_CRYPTO_ZLIB is not set -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_842 is not set -# CONFIG_CRYPTO_LZ4 is not set -# CONFIG_CRYPTO_LZ4HC is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_DRBG_HMAC=y -# CONFIG_CRYPTO_DRBG_HASH is not set -# CONFIG_CRYPTO_DRBG_CTR is not set -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_JITTERENTROPY=y -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_USER_API_RNG is not set -# CONFIG_CRYPTO_USER_API_AEAD is not set -CONFIG_CRYPTO_HW=y -# CONFIG_CRYPTO_DEV_HIFN_795X is not set -# CONFIG_ASYMMETRIC_KEY_TYPE is not set - -# -# Certificates for signature checking -# -# CONFIG_SYSTEM_TRUSTED_KEYRING is not set -# CONFIG_ARM_CRYPTO is not set -CONFIG_BINARY_PRINTF=y - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_RATIONAL=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_NET_UTILS=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=m -# CONFIG_CRC8 is not set -# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set -# CONFIG_RANDOM32_SELFTEST is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_LZ4_DECOMPRESS=y -CONFIG_XZ_DEC=y -CONFIG_XZ_DEC_X86=y -CONFIG_XZ_DEC_POWERPC=y -CONFIG_XZ_DEC_IA64=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_ARMTHUMB=y -CONFIG_XZ_DEC_SPARC=y -CONFIG_XZ_DEC_BCJ=y -# CONFIG_XZ_DEC_TEST is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_DECOMPRESS_BZIP2=y -CONFIG_DECOMPRESS_LZMA=y -CONFIG_DECOMPRESS_XZ=y -CONFIG_DECOMPRESS_LZO=y -CONFIG_DECOMPRESS_LZ4=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_DMA=y -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_GLOB=y -# CONFIG_GLOB_SELFTEST is not set -CONFIG_NLATTR=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -CONFIG_LIBFDT=y -CONFIG_OID_REGISTRY=y -# CONFIG_SG_SPLIT is not set -CONFIG_ARCH_HAS_SG_CHAIN=y -# CONFIG_VIRTUALIZATION is not set diff --git a/archive-patches/armbox/hd61/dib7000-linux_4.4.179.patch b/archive-patches/armbox/hd61/dib7000-linux_4.4.179.patch deleted file mode 100644 index b3ceefa..0000000 --- a/archive-patches/armbox/hd61/dib7000-linux_4.4.179.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -Nur a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c ---- a/drivers/media/usb/dvb-usb/dib0700_core.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dib0700_core.c 2019-02-23 09:05:14.000000000 +0100 -@@ -783,6 +783,9 @@ - - /* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ - -+ if (intf->altsetting[0].desc.bNumEndpoints < rc_ep + 1) -+ return -ENODEV; -+ - purb = usb_alloc_urb(0, GFP_KERNEL); - if (purb == NULL) { - err("rc usb alloc urb failed"); -diff -Nur a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c ---- a/drivers/media/usb/dvb-usb/dib0700_devices.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c 2019-02-23 09:05:14.000000000 +0100 -@@ -292,7 +292,7 @@ - stk7700d_dib7000p_mt2266_config) - != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -326,7 +326,7 @@ - stk7700d_dib7000p_mt2266_config) - != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -431,6 +431,7 @@ - state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); - break; - case XC2028_RESET_CLK: -+ case XC2028_I2C_FLUSH: - break; - default: - err("%s: unknown command %d, arg %d\n", __func__, -@@ -479,7 +480,7 @@ - &stk7700ph_dib7700_xc3028_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -1010,7 +1011,7 @@ - &dib7070p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -1068,7 +1069,7 @@ - &dib7770p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3036,7 +3037,7 @@ - - if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); -@@ -3089,7 +3090,7 @@ - /* initialize IC 0 */ - if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config[0]) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3119,7 +3120,7 @@ - i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1); - if (state->dib7000p_ops.i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3194,7 +3195,7 @@ - 1, 0x10, &tfe7790p_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, -@@ -3289,7 +3290,7 @@ - stk7070pd_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -@@ -3364,7 +3365,7 @@ - stk7070pd_dib7000p_config) != 0) { - err("%s: state->dib7000p_ops.i2c_enumeration failed. Cannot continue\n", - __func__); -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - } -@@ -3600,7 +3601,7 @@ - - if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { - /* Demodulator not found for some reason? */ -- dvb_detach(&state->dib7000p_ops); -+ dvb_detach(state->dib7000p_ops.set_wbd_ref); - return -ENODEV; - } - -diff -Nur a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c ---- a/drivers/media/usb/dvb-usb/dibusb-common.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dibusb-common.c 2019-02-23 09:05:14.000000000 +0100 -@@ -179,8 +179,20 @@ - - int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) - { -- u8 wbuf[1] = { offs }; -- return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1); -+ u8 *buf; -+ int rc; -+ -+ buf = kmalloc(2, GFP_KERNEL); -+ if (!buf) -+ return -ENOMEM; -+ -+ buf[0] = offs; -+ -+ rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1); -+ *val = buf[1]; -+ kfree(buf); -+ -+ return rc; - } - EXPORT_SYMBOL(dibusb_read_eeprom_byte); - diff --git a/archive-patches/armbox/hd61/dvb-usb-linux_4.4.179.patch b/archive-patches/armbox/hd61/dvb-usb-linux_4.4.179.patch deleted file mode 100644 index ec672ce..0000000 --- a/archive-patches/armbox/hd61/dvb-usb-linux_4.4.179.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -Nur a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c ---- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 2017-07-31 15:25:15.000000000 +0200 -+++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c 2019-02-23 09:05:14.000000000 +0100 -@@ -35,42 +35,51 @@ - - int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) - { -- struct hexline hx; -- u8 reset; -- int ret,pos=0; -+ struct hexline *hx; -+ u8 *buf; -+ int ret, pos = 0; -+ u16 cpu_cs_register = cypress[type].cpu_cs_register; -+ -+ buf = kmalloc(sizeof(*hx), GFP_KERNEL); -+ if (!buf) -+ return -ENOMEM; -+ hx = (struct hexline *)buf; - - /* stop the CPU */ -- reset = 1; -- if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1) -+ buf[0] = 1; -+ if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) - err("could not stop the USB controller CPU."); - -- while ((ret = dvb_usb_get_hexline(fw,&hx,&pos)) > 0) { -- deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n",hx.addr,hx.len,hx.chk); -- ret = usb_cypress_writemem(udev,hx.addr,hx.data,hx.len); -+ while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { -+ deb_fw("writing to address 0x%04x (buffer: 0x%02x %02x)\n", hx->addr, hx->len, hx->chk); -+ ret = usb_cypress_writemem(udev, hx->addr, hx->data, hx->len); - -- if (ret != hx.len) { -+ if (ret != hx->len) { - err("error while transferring firmware " - "(transferred size: %d, block size: %d)", -- ret,hx.len); -+ ret, hx->len); - ret = -EINVAL; - break; - } - } - if (ret < 0) { - err("firmware download failed at %d with %d",pos,ret); -+ kfree(buf); - return ret; - } - - if (ret == 0) { - /* restart the CPU */ -- reset = 0; -- if (ret || usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1) != 1) { -+ buf[0] = 0; -+ if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) { - err("could not restart the USB controller CPU."); - ret = -EINVAL; - } - } else - ret = -EIO; - -+ kfree(buf); -+ - return ret; - } - EXPORT_SYMBOL(usb_cypress_load_firmware); diff --git a/archive-patches/armbox/hd61/ieee80211-increase-scan-result-expire-time.patch b/archive-patches/armbox/hd61/ieee80211-increase-scan-result-expire-time.patch deleted file mode 100644 index 1ea4cdb..0000000 --- a/archive-patches/armbox/hd61/ieee80211-increase-scan-result-expire-time.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/wireless/scan.c -+++ b/net/wireless/scan.c -@@ -56,7 +56,7 @@ - * also linked into the probe response struct. - */ - --#define IEEE80211_SCAN_RESULT_EXPIRE (7 * HZ) -+#define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ) - - static void bss_free(struct cfg80211_internal_bss *bss) - { diff --git a/archive-patches/armbox/hd61/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch b/archive-patches/armbox/hd61/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch deleted file mode 100644 index 0fa0e04..0000000 --- a/archive-patches/armbox/hd61/includelinuxmodule_h_copy__init__exit_attrs_to_initcleanup_module.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 170051d60cf08f9ae2cf296fb8410afdf56a911f Mon Sep 17 00:00:00 2001 -From: Miguel Ojeda -Date: Sat, 19 Jan 2019 20:59:34 +0100 -Subject: include/linux/module.h: copy __init/__exit attrs to - init/cleanup_module - -[ Upstream commit a6e60d84989fa0e91db7f236eda40453b0e44afa ] - -The upcoming GCC 9 release extends the -Wmissing-attributes warnings -(enabled by -Wall) to C and aliases: it warns when particular function -attributes are missing in the aliases but not in their target. - -In particular, it triggers for all the init/cleanup_module -aliases in the kernel (defined by the module_init/exit macros), -ending up being very noisy. - -These aliases point to the __init/__exit functions of a module, -which are defined as __cold (among other attributes). However, -the aliases themselves do not have the __cold attribute. - -Since the compiler behaves differently when compiling a __cold -function as well as when compiling paths leading to calls -to __cold functions, the warning is trying to point out -the possibly-forgotten attribute in the alias. - -In order to keep the warning enabled, we decided to silence -this case. Ideally, we would mark the aliases directly -as __init/__exit. However, there are currently around 132 modules -in the kernel which are missing __init/__exit in their init/cleanup -functions (either because they are missing, or for other reasons, -e.g. the functions being called from somewhere else); and -a section mismatch is a hard error. - -A conservative alternative was to mark the aliases as __cold only. -However, since we would like to eventually enforce __init/__exit -to be always marked, we chose to use the new __copy function -attribute (introduced by GCC 9 as well to deal with this). -With it, we copy the attributes used by the target functions -into the aliases. This way, functions that were not marked -as __init/__exit won't have their aliases marked either, -and therefore there won't be a section mismatch. - -Note that the warning would go away marking either the extern -declaration, the definition, or both. However, we only mark -the definition of the alias, since we do not want callers -(which only see the declaration) to be compiled as if the function -was __cold (and therefore the paths leading to those calls -would be assumed to be unlikely). - -Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/ -Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/ -Suggested-by: Martin Sebor -Acked-by: Jessica Yu -Signed-off-by: Miguel Ojeda -Signed-off-by: Sasha Levin ---- - include/linux/module.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -(limited to 'include/linux/module.h') - -diff --git a/include/linux/module.h b/include/linux/module.h -index dfe5c2e25ba1..d237d0574179 100644 ---- a/include/linux/module.h -+++ b/include/linux/module.h -@@ -127,13 +127,13 @@ extern void cleanup_module(void); - #define module_init(initfn) \ - static inline initcall_t __maybe_unused __inittest(void) \ - { return initfn; } \ -- int init_module(void) __attribute__((alias(#initfn))); -+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn))); - - /* This is only required if you want to be unloadable. */ - #define module_exit(exitfn) \ - static inline exitcall_t __maybe_unused __exittest(void) \ - { return exitfn; } \ -- void cleanup_module(void) __attribute__((alias(#exitfn))); -+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn))); - - #endif - --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd61/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch b/archive-patches/armbox/hd61/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch deleted file mode 100644 index 14cb69e..0000000 --- a/archive-patches/armbox/hd61/mn88472_reset_stream_ID_reg_if_no_PLP_given.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 07d45a42fa21b54d83e563565699d25bde9f8cbe Mon Sep 17 00:00:00 2001 -From: Olli Salonen -Date: Sun, 30 Jul 2017 08:34:48 -0400 -Subject: media: mn88472: reset stream ID reg if no PLP given - -If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead. - -Signed-off-by: Olli Salonen -Signed-off-by: Mauro Carvalho Chehab ---- - drivers/media/dvb-frontends/mn88472.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -(limited to 'drivers/media/dvb-frontends/mn88472.c') - -diff --git a/drivers/media/dvb-frontends/mn88472.c b/drivers/media/dvb-frontends/mn88472.c -index f6938f9607ac..5e8fd63832e9 100644 ---- a/drivers/staging/media/mn88472/mn88472.c -+++ b/drivers/staging/media/mn88472/mn88472.c -@@ -377,7 +377,9 @@ static int mn88472_set_frontend(struct dvb_frontend *fe) - ret = regmap_write(dev->regmap[1], 0xf6, 0x05); - if (ret) - goto err; -- ret = regmap_write(dev->regmap[2], 0x32, c->stream_id); -+ ret = regmap_write(dev->regmap[2], 0x32, -+ (c->stream_id == NO_STREAM_ID_FILTER) ? 0 : -+ c->stream_id ); - if (ret) - goto err; - break; --- -cgit 1.2.3-1.el7 - diff --git a/archive-patches/armbox/hd61/modules_mark__inittest__exittest_as__maybe_unused.patch b/archive-patches/armbox/hd61/modules_mark__inittest__exittest_as__maybe_unused.patch deleted file mode 100644 index 8b3a33a..0000000 --- a/archive-patches/armbox/hd61/modules_mark__inittest__exittest_as__maybe_unused.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 89134f0918ec3bf4614ac2f9258543940e611f01 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -Date: Wed, 1 Feb 2017 18:00:14 +0100 -Subject: modules: mark __inittest/__exittest as __maybe_unused - -commit 1f318a8bafcfba9f0d623f4870c4e890fd22e659 upstream. - -clang warns about unused inline functions by default: - -arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function '__inittest' [-Wunused-function] -arch/arm/crypto/aes-cipher-glue.c:69:1: warning: unused function '__exittest' [-Wunused-function] - -As these appear in every single module, let's just disable the warnings by marking the -two functions as __maybe_unused. - -Signed-off-by: Arnd Bergmann -Reviewed-by: Miroslav Benes -Acked-by: Rusty Russell -Signed-off-by: Jessica Yu -Signed-off-by: Nathan Chancellor -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/module.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -(limited to 'include/linux/module.h') - -diff --git a/include/linux/module.h b/include/linux/module.h -index c9f2f85017ad..dfe5c2e25ba1 100644 ---- a/include/linux/module.h -+++ b/include/linux/module.h -@@ -125,13 +125,13 @@ extern void cleanup_module(void); - - /* Each module must use one module_init(). */ - #define module_init(initfn) \ -- static inline initcall_t __inittest(void) \ -+ static inline initcall_t __maybe_unused __inittest(void) \ - { return initfn; } \ - int init_module(void) __attribute__((alias(#initfn))); - - /* This is only required if you want to be unloadable. */ - #define module_exit(exitfn) \ -- static inline exitcall_t __exittest(void) \ -+ static inline exitcall_t __maybe_unused __exittest(void) \ - { return exitfn; } \ - void cleanup_module(void) __attribute__((alias(#exitfn))); - --- -cgit 1.2-0.3.lf.el7 - diff --git a/archive-patches/armbox/hd61/move-default-dialect-to-SMB3.patch b/archive-patches/armbox/hd61/move-default-dialect-to-SMB3.patch deleted file mode 100644 index 67ee03d..0000000 --- a/archive-patches/armbox/hd61/move-default-dialect-to-SMB3.patch +++ /dev/null @@ -1,36 +0,0 @@ -[SMB3] Improve security, move default dialect to SMB3 from old CIFS -Due to recent publicity about security vulnerabilities in the -much older CIFS dialect, move the default dialect to the -widely accepted (and quite secure) SMB3.0 dialect from the -old default of the CIFS dialect. - -We do not want to be encouraging use of less secure dialects, -and both Microsoft and CERT now strongly recommend not using the -older CIFS dialect (SMB Security Best Practices -"recommends disabling SMBv1"). - -SMB3 is both secure and widely available: in Windows 8 and later, -Samba and Macs. - -Users can still choose to explicitly mount with the less secure -dialect (for old servers) by choosing "vers=1.0" on the cifs -mount - -Signed-off-by: Steve French -Reviewed-by: Pavel Shilovsky - ---- a/fs/cifs/connect.c 2019-10-19 09:34:13.448215659 +0200 -+++ b/fs/cifs/connect.c 2019-10-19 09:41:22.938494534 +0200 -@@ -1245,9 +1245,9 @@ - - vol->actimeo = CIFS_DEF_ACTIMEO; - -- /* FIXME: add autonegotiation -- for now, SMB1 is default */ -- vol->ops = &smb1_operations; -- vol->vals = &smb1_values; -+ /* FIXME: add autonegotiation for SMB3 or later rather than just SMB3 */ -+ vol->ops = &smb30_operations; /* both secure and accepted widely */ -+ vol->vals = &smb302_values; - - if (!mountdata) - goto cifs_parse_mount_err; diff --git a/archive-patches/armbox/hd61/wifi-linux_4.4.183.patch b/archive-patches/armbox/hd61/wifi-linux_4.4.183.patch deleted file mode 100644 index 5eb9402..0000000 --- a/archive-patches/armbox/hd61/wifi-linux_4.4.183.patch +++ /dev/null @@ -1,8663 +0,0 @@ ---- - drivers/net/wireless/at76c50x-usb.c | 4 +- - drivers/net/wireless/ath/ath10k/core.c | 25 ++- - drivers/net/wireless/ath/ath10k/core.h | 4 + - drivers/net/wireless/ath/ath10k/debug.c | 9 + - drivers/net/wireless/ath/ath10k/htt_rx.c | 110 ++++++++-- - drivers/net/wireless/ath/ath10k/mac.c | 105 ++++++++-- - drivers/net/wireless/ath/ath10k/pci.c | 2 +- - drivers/net/wireless/ath/ath10k/spectral.c | 2 +- - drivers/net/wireless/ath/ath10k/trace.h | 12 +- - drivers/net/wireless/ath/ath10k/wmi-ops.h | 6 + - drivers/net/wireless/ath/ath10k/wmi-tlv.c | 25 ++- - drivers/net/wireless/ath/ath10k/wmi-tlv.h | 5 + - drivers/net/wireless/ath/ath10k/wmi.c | 10 +- - drivers/net/wireless/ath/ath10k/wmi.h | 3 +- - drivers/net/wireless/ath/ath5k/debug.c | 5 +- - drivers/net/wireless/ath/ath5k/mac80211-ops.c | 3 +- - .../net/wireless/ath/ath9k/ar9003_eeprom.h | 4 +- - drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 - - drivers/net/wireless/ath/ath9k/ath9k.h | 1 + - .../net/wireless/ath/ath9k/common-spectral.c | 8 +- - drivers/net/wireless/ath/ath9k/hif_usb.c | 4 + - drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 +- - drivers/net/wireless/ath/ath9k/hw.c | 4 + - drivers/net/wireless/ath/ath9k/init.c | 1 + - drivers/net/wireless/ath/ath9k/mac.c | 44 +++- - drivers/net/wireless/ath/ath9k/mac.h | 1 + - drivers/net/wireless/ath/ath9k/main.c | 35 ++-- - drivers/net/wireless/ath/ath9k/pci.c | 7 +- - drivers/net/wireless/ath/ath9k/tx99.c | 18 +- - drivers/net/wireless/ath/carl9170/main.c | 8 +- - drivers/net/wireless/ath/regd.c | 19 +- - drivers/net/wireless/ath/regd.h | 5 + - drivers/net/wireless/ath/regd_common.h | 13 ++ - drivers/net/wireless/ath/wcn36xx/main.c | 8 +- - drivers/net/wireless/ath/wcn36xx/txrx.c | 2 +- - drivers/net/wireless/ath/wil6210/main.c | 35 +++- - drivers/net/wireless/ath/wil6210/wmi.c | 8 +- - drivers/net/wireless/b43/phy_common.c | 2 +- - drivers/net/wireless/b43/phy_lp.c | 6 +- - .../net/wireless/brcm80211/brcmfmac/bcmsdh.c | 8 +- - drivers/net/wireless/brcm80211/brcmfmac/bus.h | 4 +- - .../wireless/brcm80211/brcmfmac/cfg80211.c | 70 ++++--- - .../net/wireless/brcm80211/brcmfmac/core.c | 68 +++--- - .../net/wireless/brcm80211/brcmfmac/fweh.c | 57 ++--- - .../net/wireless/brcm80211/brcmfmac/fweh.h | 82 ++++++-- - .../wireless/brcm80211/brcmfmac/fwil_types.h | 5 + - .../net/wireless/brcm80211/brcmfmac/msgbuf.c | 42 ++-- - drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 34 +-- - .../net/wireless/brcm80211/brcmfmac/sdio.c | 46 +++- - drivers/net/wireless/brcm80211/brcmfmac/usb.c | 29 +-- - .../net/wireless/brcm80211/brcmfmac/vendor.c | 5 +- - .../wireless/brcm80211/brcmsmac/mac80211_if.c | 8 +- - .../wireless/brcm80211/brcmsmac/phy/phy_n.c | 197 +++++++++--------- - drivers/net/wireless/cw1200/cw1200_spi.c | 9 +- - drivers/net/wireless/cw1200/main.c | 5 + - drivers/net/wireless/cw1200/pm.h | 9 +- - drivers/net/wireless/cw1200/scan.c | 18 +- - drivers/net/wireless/cw1200/sta.c | 4 +- - drivers/net/wireless/cw1200/sta.h | 4 +- - drivers/net/wireless/cw1200/wsm.c | 24 +-- - drivers/net/wireless/hostap/hostap_hw.c | 15 +- - drivers/net/wireless/iwlegacy/4965-mac.c | 8 +- - drivers/net/wireless/iwlegacy/4965.h | 4 +- - drivers/net/wireless/iwlwifi/dvm/mac80211.c | 9 +- - drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 70 +++++-- - drivers/net/wireless/iwlwifi/mvm/mac80211.c | 31 ++- - drivers/net/wireless/iwlwifi/mvm/nvm.c | 5 +- - drivers/net/wireless/iwlwifi/pcie/rx.c | 2 + - drivers/net/wireless/mac80211_hwsim.c | 90 +++++--- - .../net/wireless/mediatek/mt7601u/eeprom.h | 2 +- - drivers/net/wireless/mediatek/mt7601u/main.c | 8 +- - drivers/net/wireless/mediatek/mt7601u/mcu.c | 10 +- - drivers/net/wireless/mwifiex/11n_aggr.c | 19 +- - drivers/net/wireless/mwifiex/cfg80211.c | 25 ++- - drivers/net/wireless/mwifiex/cfp.c | 3 + - drivers/net/wireless/mwifiex/debugfs.c | 3 +- - drivers/net/wireless/mwifiex/pcie.c | 7 + - drivers/net/wireless/mwifiex/scan.c | 6 + - drivers/net/wireless/mwifiex/sta_ioctl.c | 2 - - drivers/net/wireless/mwifiex/usb.c | 3 + - drivers/net/wireless/mwifiex/util.c | 8 +- - drivers/net/wireless/mwifiex/wmm.c | 12 +- - drivers/net/wireless/mwl8k.c | 10 +- - drivers/net/wireless/p54/fwio.c | 2 +- - drivers/net/wireless/ray_cs.c | 7 +- - .../wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- - .../net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 6 +- - drivers/net/wireless/realtek/rtlwifi/base.c | 13 +- - drivers/net/wireless/realtek/rtlwifi/core.c | 18 +- - drivers/net/wireless/realtek/rtlwifi/pci.c | 25 ++- - drivers/net/wireless/realtek/rtlwifi/pci.h | 4 +- - drivers/net/wireless/realtek/rtlwifi/ps.c | 36 +++- - .../wireless/realtek/rtlwifi/rtl8192cu/rf.c | 3 - - .../wireless/realtek/rtlwifi/rtl8192ee/fw.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- - .../wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 +- - .../wireless/realtek/rtlwifi/rtl8821ae/dm.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8821ae/hw.c | 6 +- - .../wireless/realtek/rtlwifi/rtl8821ae/phy.c | 122 +++++++++-- - .../wireless/realtek/rtlwifi/rtl8821ae/reg.h | 1 + - drivers/net/wireless/realtek/rtlwifi/usb.c | 19 ++ - drivers/net/wireless/realtek/rtlwifi/usb.h | 3 +- - drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + - drivers/net/wireless/rndis_wlan.c | 6 + - drivers/net/wireless/rsi/rsi_91x_mac80211.c | 19 +- - drivers/net/wireless/rsi/rsi_91x_sdio.c | 2 - - drivers/net/wireless/rsi/rsi_common.h | 1 - - drivers/net/wireless/rt2x00/rt2800lib.c | 7 +- - drivers/net/wireless/rt2x00/rt2800lib.h | 4 +- - drivers/net/wireless/ti/wl1251/main.c | 4 +- - drivers/net/wireless/ti/wl18xx/event.c | 28 +++ - drivers/net/wireless/ti/wl18xx/event.h | 1 + - drivers/net/wireless/ti/wl18xx/main.c | 3 +- - drivers/net/wireless/ti/wlcore/acx.c | 5 +- - drivers/net/wireless/ti/wlcore/acx.h | 3 +- - drivers/net/wireless/ti/wlcore/init.c | 5 - - drivers/net/wireless/ti/wlcore/main.c | 21 +- - drivers/net/wireless/ti/wlcore/sdio.c | 5 + - drivers/net/wireless/ti/wlcore/spi.c | 2 +- - drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- - drivers/staging/rtl8188eu/core/rtw_recv.c | 3 + - drivers/staging/rtl8188eu/include/rtw_debug.h | 2 +- - .../staging/rtl8188eu/os_dep/ioctl_linux.c | 14 +- - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 3 + - .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 24 ++- - drivers/staging/rtl8192u/r8192U_core.c | 2 + - drivers/staging/rtl8712/ieee80211.h | 84 ++++---- - drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- - drivers/staging/rtl8712/rtl871x_recv.c | 7 +- - drivers/staging/rtl8712/rtl871x_xmit.c | 7 +- - drivers/staging/wlan-ng/p80211netdev.c | 2 +- - drivers/staging/wlan-ng/prism2mgmt.c | 2 +- - include/linux/mmc/sdio_ids.h | 1 + - include/linux/nospec.h | 68 ++++++ - include/net/cfg80211.h | 13 +- - include/net/mac80211.h | 64 ++++-- - include/uapi/linux/nl80211.h | 2 + - net/mac80211/agg-rx.c | 32 ++- - net/mac80211/agg-tx.c | 53 +++-- - net/mac80211/cfg.c | 10 +- - net/mac80211/debugfs.c | 7 +- - net/mac80211/driver-ops.c | 10 +- - net/mac80211/driver-ops.h | 7 +- - net/mac80211/ibss.c | 28 +-- - net/mac80211/ieee80211_i.h | 1 - - net/mac80211/iface.c | 4 +- - net/mac80211/key.c | 77 +++++-- - net/mac80211/main.c | 39 +++- - net/mac80211/mesh.c | 7 +- - net/mac80211/mesh_hwmp.c | 19 +- - net/mac80211/mesh_plink.c | 14 +- - net/mac80211/mesh_sync.c | 11 - - net/mac80211/mlme.c | 84 ++++++-- - net/mac80211/offchannel.c | 2 + - net/mac80211/pm.c | 1 + - net/mac80211/rx.c | 39 +++- - net/mac80211/sta_info.c | 5 +- - net/mac80211/status.c | 10 +- - net/mac80211/trace.h | 43 ++-- - net/mac80211/tx.c | 19 +- - net/mac80211/util.c | 8 +- - net/mac80211/wep.c | 3 +- - net/mac80211/wpa.c | 54 +++-- - net/rfkill/Kconfig | 5 - - net/rfkill/core.c | 4 +- - net/rfkill/rfkill-gpio.c | 7 +- - net/wireless/core.c | 11 +- - net/wireless/core.h | 2 + - net/wireless/mlme.c | 12 ++ - net/wireless/nl80211.c | 192 +++++++++-------- - net/wireless/reg.c | 5 +- - net/wireless/scan.c | 71 ++++++- - net/wireless/sme.c | 14 ++ - net/wireless/util.c | 2 +- - 174 files changed, 2220 insertions(+), 1047 deletions(-) - create mode 100644 include/linux/nospec.h - -diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c -index dab25136..da14eca2 100644 ---- a/drivers/net/wireless/at76c50x-usb.c -+++ b/drivers/net/wireless/at76c50x-usb.c -@@ -2582,8 +2582,8 @@ static int __init at76_mod_init(void) - if (result < 0) - printk(KERN_ERR DRIVER_NAME - ": usb_register failed (status %d)\n", result); -- -- led_trigger_register_simple("at76_usb-tx", &ledtrig_tx); -+ else -+ led_trigger_register_simple("at76_usb-tx", &ledtrig_tx); - return result; - } - -diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c -index 531de256..0c23768a 100644 ---- a/drivers/net/wireless/ath/ath10k/core.c -+++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -67,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA988X_BOARD_DATA_SZ, - .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_2_1_VERSION, -@@ -85,6 +86,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_2_1_VERSION, -@@ -103,6 +105,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_3_0_VERSION, -@@ -121,6 +124,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA6174_HW_3_2_VERSION, -@@ -140,6 +144,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA6174_BOARD_DATA_SZ, - .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA99X0_HW_2_0_DEV_VERSION, -@@ -159,6 +164,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA99X0_BOARD_DATA_SZ, - .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 1, - }, - { - .id = QCA9377_HW_1_0_DEV_VERSION, -@@ -177,6 +183,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA9377_BOARD_DATA_SZ, - .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - { - .id = QCA9377_HW_1_1_DEV_VERSION, -@@ -195,6 +202,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { - .board_size = QCA9377_BOARD_DATA_SZ, - .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, - }, -+ .decap_align_bytes = 4, - }, - }; - -@@ -548,8 +556,11 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar) - "boot get otp board id result 0x%08x board_id %d chip_id %d\n", - result, board_id, chip_id); - -- if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0) -+ if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0 || -+ (board_id == 0)) { -+ ath10k_warn(ar, "board id is not exist in otp, ignore it\n"); - return -EOPNOTSUPP; -+ } - - ar->id.bmi_ids_valid = true; - ar->id.bmi_board_id = board_id; -@@ -1607,6 +1618,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) - goto err_wmi_detach; - } - -+ /* If firmware indicates Full Rx Reorder support it must be used in a -+ * slightly different manner. Let HTT code know. -+ */ -+ ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER, -+ ar->wmi.svc_map)); -+ - status = ath10k_htt_rx_alloc(&ar->htt); - if (status) { - ath10k_err(ar, "failed to alloc htt rx: %d\n", status); -@@ -1669,12 +1686,6 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode) - goto err_hif_stop; - } - -- /* If firmware indicates Full Rx Reorder support it must be used in a -- * slightly different manner. Let HTT code know. -- */ -- ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER, -- ar->wmi.svc_map)); -- - status = ath10k_htt_rx_ring_refill(ar); - if (status) { - ath10k_err(ar, "failed to refill htt rx ring: %d\n", status); -diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h -index 858d75f4..257836a0 100644 ---- a/drivers/net/wireless/ath/ath10k/core.h -+++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -670,6 +670,10 @@ struct ath10k { - size_t board_size; - size_t board_ext_size; - } fw; -+ -+ /* Number of bytes used for alignment in rx_hdr_status */ -+ int decap_align_bytes; -+ - } hw_params; - - const struct firmware *board; -diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c -index 1a88a24f..30c35756 100644 ---- a/drivers/net/wireless/ath/ath10k/debug.c -+++ b/drivers/net/wireless/ath/ath10k/debug.c -@@ -1892,6 +1892,15 @@ static ssize_t ath10k_write_simulate_radar(struct file *file, - size_t count, loff_t *ppos) - { - struct ath10k *ar = file->private_data; -+ struct ath10k_vif *arvif; -+ -+ /* Just check for for the first vif alone, as all the vifs will be -+ * sharing the same channel and if the channel is disabled, all the -+ * vifs will share the same 'is_started' state. -+ */ -+ arvif = list_first_entry(&ar->arvifs, typeof(*arvif), list); -+ if (!arvif->is_started) -+ return -EINVAL; - - ieee80211_radar_detected(ar->hw); - -diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c -index 6060dda4..a65b5d7f 100644 ---- a/drivers/net/wireless/ath/ath10k/htt_rx.c -+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c -@@ -212,11 +212,12 @@ int ath10k_htt_rx_ring_refill(struct ath10k *ar) - spin_lock_bh(&htt->rx_ring.lock); - ret = ath10k_htt_rx_ring_fill_n(htt, (htt->rx_ring.fill_level - - htt->rx_ring.fill_cnt)); -- spin_unlock_bh(&htt->rx_ring.lock); - - if (ret) - ath10k_htt_rx_ring_free(htt); - -+ spin_unlock_bh(&htt->rx_ring.lock); -+ - return ret; - } - -@@ -230,7 +231,9 @@ void ath10k_htt_rx_free(struct ath10k_htt *htt) - skb_queue_purge(&htt->rx_compl_q); - skb_queue_purge(&htt->rx_in_ord_compl_q); - -+ spin_lock_bh(&htt->rx_ring.lock); - ath10k_htt_rx_ring_free(htt); -+ spin_unlock_bh(&htt->rx_ring.lock); - - dma_free_coherent(htt->ar->dev, - (htt->rx_ring.size * -@@ -979,7 +982,7 @@ static void ath10k_process_rx(struct ath10k *ar, - *status = *rx_status; - - ath10k_dbg(ar, ATH10K_DBG_DATA, -- "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", -+ "rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n", - skb, - skb->len, - ieee80211_get_SA(hdr), -@@ -1076,7 +1079,21 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, - hdr = (void *)msdu->data; - - /* Tail */ -- skb_trim(msdu, msdu->len - ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ if (status->flag & RX_FLAG_IV_STRIPPED) { -+ skb_trim(msdu, msdu->len - -+ ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ } else { -+ /* MIC */ -+ if ((status->flag & RX_FLAG_MIC_STRIPPED) && -+ enctype == HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2) -+ skb_trim(msdu, msdu->len - 8); -+ -+ /* ICV */ -+ if (status->flag & RX_FLAG_ICV_STRIPPED && -+ enctype != HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2) -+ skb_trim(msdu, msdu->len - -+ ath10k_htt_rx_crypto_tail_len(ar, enctype)); -+ } - - /* MMIC */ - if (!ieee80211_has_morefrags(hdr->frame_control) && -@@ -1095,12 +1112,14 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar, - static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar, - struct sk_buff *msdu, - struct ieee80211_rx_status *status, -- const u8 first_hdr[64]) -+ const u8 first_hdr[64], -+ enum htt_rx_mpdu_encrypt_type enctype) - { - struct ieee80211_hdr *hdr; - size_t hdr_len; - u8 da[ETH_ALEN]; - u8 sa[ETH_ALEN]; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [nwifi 802.11 header] <-- replaced with 802.11 hdr -@@ -1123,6 +1142,14 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar, - /* push original 802.11 header */ - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - - /* original 802.11 header has a different DA and in -@@ -1142,6 +1169,7 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, - size_t hdr_len, crypto_len; - void *rfc1042; - bool is_first, is_last, is_amsdu; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - rxd = (void *)msdu->data - sizeof(*rxd); - hdr = (void *)rxd->rx_hdr_status; -@@ -1158,8 +1186,8 @@ static void *ath10k_htt_rx_h_find_rfc1042(struct ath10k *ar, - hdr_len = ieee80211_hdrlen(hdr->frame_control); - crypto_len = ath10k_htt_rx_crypto_param_len(ar, enctype); - -- rfc1042 += round_up(hdr_len, 4) + -- round_up(crypto_len, 4); -+ rfc1042 += round_up(hdr_len, bytes_aligned) + -+ round_up(crypto_len, bytes_aligned); - } - - if (is_amsdu) -@@ -1180,6 +1208,7 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - void *rfc1042; - u8 da[ETH_ALEN]; - u8 sa[ETH_ALEN]; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [eth header] <-- replaced with 802.11 hdr & rfc1042/llc -@@ -1203,6 +1232,14 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - /* push original 802.11 header */ - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - - /* original 802.11 header has a different DA and in -@@ -1216,10 +1253,12 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, - static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar, - struct sk_buff *msdu, - struct ieee80211_rx_status *status, -- const u8 first_hdr[64]) -+ const u8 first_hdr[64], -+ enum htt_rx_mpdu_encrypt_type enctype) - { - struct ieee80211_hdr *hdr; - size_t hdr_len; -+ int bytes_aligned = ar->hw_params.decap_align_bytes; - - /* Delivered decapped frame: - * [amsdu header] <-- replaced with 802.11 hdr -@@ -1231,6 +1270,14 @@ static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar, - - hdr = (struct ieee80211_hdr *)first_hdr; - hdr_len = ieee80211_hdrlen(hdr->frame_control); -+ -+ if (!(status->flag & RX_FLAG_IV_STRIPPED)) { -+ memcpy(skb_push(msdu, -+ ath10k_htt_rx_crypto_param_len(ar, enctype)), -+ (void *)hdr + round_up(hdr_len, bytes_aligned), -+ ath10k_htt_rx_crypto_param_len(ar, enctype)); -+ } -+ - memcpy(skb_push(msdu, hdr_len), hdr, hdr_len); - } - -@@ -1265,13 +1312,15 @@ static void ath10k_htt_rx_h_undecap(struct ath10k *ar, - is_decrypted); - break; - case RX_MSDU_DECAP_NATIVE_WIFI: -- ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr); -+ ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr, -+ enctype); - break; - case RX_MSDU_DECAP_ETHERNET2_DIX: - ath10k_htt_rx_h_undecap_eth(ar, msdu, status, first_hdr, enctype); - break; - case RX_MSDU_DECAP_8023_SNAP_LLC: -- ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr); -+ ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr, -+ enctype); - break; - } - } -@@ -1314,7 +1363,8 @@ static void ath10k_htt_rx_h_csum_offload(struct sk_buff *msdu) - - static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - struct sk_buff_head *amsdu, -- struct ieee80211_rx_status *status) -+ struct ieee80211_rx_status *status, -+ bool fill_crypt_header) - { - struct sk_buff *first; - struct sk_buff *last; -@@ -1324,7 +1374,6 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - enum htt_rx_mpdu_encrypt_type enctype; - u8 first_hdr[64]; - u8 *qos; -- size_t hdr_len; - bool has_fcs_err; - bool has_crypto_err; - bool has_tkip_err; -@@ -1345,15 +1394,17 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - * decapped header. It'll be used for undecapping of each MSDU. - */ - hdr = (void *)rxd->rx_hdr_status; -- hdr_len = ieee80211_hdrlen(hdr->frame_control); -- memcpy(first_hdr, hdr, hdr_len); -+ memcpy(first_hdr, hdr, RX_HTT_HDR_STATUS_LEN); - - /* Each A-MSDU subframe will use the original header as the base and be - * reported as a separate MSDU so strip the A-MSDU bit from QoS Ctl. - */ - hdr = (void *)first_hdr; -- qos = ieee80211_get_qos_ctl(hdr); -- qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; -+ -+ if (ieee80211_is_data_qos(hdr->frame_control)) { -+ qos = ieee80211_get_qos_ctl(hdr); -+ qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; -+ } - - /* Some attention flags are valid only in the last MSDU. */ - last = skb_peek_tail(amsdu); -@@ -1387,11 +1438,17 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - if (has_tkip_err) - status->flag |= RX_FLAG_MMIC_ERROR; - -- if (is_decrypted) -+ if (is_decrypted) { - status->flag |= RX_FLAG_DECRYPTED | -- RX_FLAG_IV_STRIPPED | - RX_FLAG_MMIC_STRIPPED; - -+ if (fill_crypt_header) -+ status->flag |= RX_FLAG_MIC_STRIPPED | -+ RX_FLAG_ICV_STRIPPED; -+ else -+ status->flag |= RX_FLAG_IV_STRIPPED; -+ } -+ - skb_queue_walk(amsdu, msdu) { - ath10k_htt_rx_h_csum_offload(msdu); - ath10k_htt_rx_h_undecap(ar, msdu, status, first_hdr, enctype, -@@ -1404,6 +1461,9 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar, - if (!is_decrypted) - continue; - -+ if (fill_crypt_header) -+ continue; -+ - hdr = (void *)msdu->data; - hdr->frame_control &= ~__cpu_to_le16(IEEE80211_FCTL_PROTECTED); - } -@@ -1414,6 +1474,9 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar, - struct ieee80211_rx_status *status) - { - struct sk_buff *msdu; -+ struct sk_buff *first_subframe; -+ -+ first_subframe = skb_peek(amsdu); - - while ((msdu = __skb_dequeue(amsdu))) { - /* Setup per-MSDU flags */ -@@ -1422,6 +1485,13 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar, - else - status->flag |= RX_FLAG_AMSDU_MORE; - -+ if (msdu == first_subframe) { -+ first_subframe = NULL; -+ status->flag &= ~RX_FLAG_ALLOW_SAME_PN; -+ } else { -+ status->flag |= RX_FLAG_ALLOW_SAME_PN; -+ } -+ - ath10k_process_rx(ar, status, msdu); - } - } -@@ -1607,7 +1677,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt, - ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff); - ath10k_htt_rx_h_unchain(ar, &amsdu, ret > 0); - ath10k_htt_rx_h_filter(ar, &amsdu, rx_status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status, true); - ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status); - } - -@@ -1653,7 +1723,7 @@ static void ath10k_htt_rx_frag_handler(struct ath10k_htt *htt, - - ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff); - ath10k_htt_rx_h_filter(ar, &amsdu, rx_status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status, true); - ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status); - - if (fw_desc_len > 0) { -@@ -1952,7 +2022,7 @@ static void ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb) - */ - ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id); - ath10k_htt_rx_h_filter(ar, &amsdu, status); -- ath10k_htt_rx_h_mpdu(ar, &amsdu, status); -+ ath10k_htt_rx_h_mpdu(ar, &amsdu, status, false); - ath10k_htt_rx_h_deliver(ar, &amsdu, status); - break; - case -EAGAIN: -diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c -index 1e1bef34..398068ad 100644 ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1127,6 +1127,36 @@ static int ath10k_monitor_recalc(struct ath10k *ar) - return ath10k_monitor_stop(ar); - } - -+static bool ath10k_mac_can_set_cts_prot(struct ath10k_vif *arvif) -+{ -+ struct ath10k *ar = arvif->ar; -+ -+ lockdep_assert_held(&ar->conf_mutex); -+ -+ if (!arvif->is_started) { -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "defer cts setup, vdev is not ready yet\n"); -+ return false; -+ } -+ -+ return true; -+} -+ -+static int ath10k_mac_set_cts_prot(struct ath10k_vif *arvif) -+{ -+ struct ath10k *ar = arvif->ar; -+ u32 vdev_param; -+ -+ lockdep_assert_held(&ar->conf_mutex); -+ -+ vdev_param = ar->wmi.vdev_param->protection_mode; -+ -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev %d cts_protection %d\n", -+ arvif->vdev_id, arvif->use_cts_prot); -+ -+ return ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -+ arvif->use_cts_prot ? 1 : 0); -+} -+ - static int ath10k_recalc_rtscts_prot(struct ath10k_vif *arvif) - { - struct ath10k *ar = arvif->ar; -@@ -2871,6 +2901,13 @@ static int ath10k_update_channel_list(struct ath10k *ar) - passive = channel->flags & IEEE80211_CHAN_NO_IR; - ch->passive = passive; - -+ /* the firmware is ignoring the "radar" flag of the -+ * channel and is scanning actively using Probe Requests -+ * on "Radar detection"/DFS channels which are not -+ * marked as "available" -+ */ -+ ch->passive |= ch->chan_radar; -+ - ch->freq = channel->center_freq; - ch->band_center_freq1 = channel->center_freq; - ch->min_power = 0; -@@ -4180,7 +4217,8 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar) - lockdep_assert_held(&ar->conf_mutex); - - list_for_each_entry(arvif, &ar->arvifs, list) { -- WARN_ON(arvif->txpower < 0); -+ if (arvif->txpower <= 0) -+ continue; - - if (txpower == -1) - txpower = arvif->txpower; -@@ -4188,8 +4226,8 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar) - txpower = min(txpower, arvif->txpower); - } - -- if (WARN_ON(txpower == -1)) -- return -EINVAL; -+ if (txpower == -1) -+ return 0; - - ret = ath10k_mac_txpower_setup(ar, txpower); - if (ret) { -@@ -4432,7 +4470,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, - } - - ar->free_vdev_map &= ~(1LL << arvif->vdev_id); -+ spin_lock_bh(&ar->data_lock); - list_add(&arvif->list, &ar->arvifs); -+ spin_unlock_bh(&ar->data_lock); - - /* It makes no sense to have firmware do keepalives. mac80211 already - * takes care of this with idle connection polling. -@@ -4565,7 +4605,9 @@ err_peer_delete: - err_vdev_delete: - ath10k_wmi_vdev_delete(ar, arvif->vdev_id); - ar->free_vdev_map |= 1LL << arvif->vdev_id; -+ spin_lock_bh(&ar->data_lock); - list_del(&arvif->list); -+ spin_unlock_bh(&ar->data_lock); - - err: - if (arvif->beacon_buf) { -@@ -4609,7 +4651,9 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw, - arvif->vdev_id, ret); - - ar->free_vdev_map |= 1LL << arvif->vdev_id; -+ spin_lock_bh(&ar->data_lock); - list_del(&arvif->list); -+ spin_unlock_bh(&ar->data_lock); - - if (arvif->vdev_type == WMI_VDEV_TYPE_AP || - arvif->vdev_type == WMI_VDEV_TYPE_IBSS) { -@@ -4787,20 +4831,18 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw, - - if (changed & BSS_CHANGED_ERP_CTS_PROT) { - arvif->use_cts_prot = info->use_cts_prot; -- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev %d cts_prot %d\n", -- arvif->vdev_id, info->use_cts_prot); - - ret = ath10k_recalc_rtscts_prot(arvif); - if (ret) - ath10k_warn(ar, "failed to recalculate rts/cts prot for vdev %d: %d\n", - arvif->vdev_id, ret); - -- vdev_param = ar->wmi.vdev_param->protection_mode; -- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, -- info->use_cts_prot ? 1 : 0); -- if (ret) -- ath10k_warn(ar, "failed to set protection mode %d on vdev %i: %d\n", -- info->use_cts_prot, arvif->vdev_id, ret); -+ if (ath10k_mac_can_set_cts_prot(arvif)) { -+ ret = ath10k_mac_set_cts_prot(arvif); -+ if (ret) -+ ath10k_warn(ar, "failed to set cts protection for vdev %d: %d\n", -+ arvif->vdev_id, ret); -+ } - } - - if (changed & BSS_CHANGED_ERP_SLOT) { -@@ -5256,9 +5298,8 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) - sta->addr, smps, err); - } - -- if (changed & IEEE80211_RC_SUPP_RATES_CHANGED || -- changed & IEEE80211_RC_NSS_CHANGED) { -- ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates/nss\n", -+ if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) { -+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac update sta %pM supp rates\n", - sta->addr); - - err = ath10k_station_assoc(ar, arvif->vif, sta, true); -@@ -5468,6 +5509,16 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, - "mac vdev %d peer delete %pM (sta gone)\n", - arvif->vdev_id, sta->addr); - -+ if (sta->tdls) { -+ ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id, -+ sta, -+ WMI_TDLS_PEER_STATE_TEARDOWN); -+ if (ret) -+ ath10k_warn(ar, "failed to update tdls peer state for %pM state %d: %i\n", -+ sta->addr, -+ WMI_TDLS_PEER_STATE_TEARDOWN, ret); -+ } -+ - ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr); - if (ret) - ath10k_warn(ar, "failed to delete peer %pM for vdev %d: %i\n", -@@ -6273,10 +6324,20 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, - { - struct ath10k *ar = hw->priv; - struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; -+ struct ath10k_vif *arvif = (void *)vif->drv_priv; -+ struct ath10k_peer *peer; - u32 bw, smps; - - spin_lock_bh(&ar->data_lock); - -+ peer = ath10k_peer_find(ar, arvif->vdev_id, sta->addr); -+ if (!peer) { -+ spin_unlock_bh(&ar->data_lock); -+ ath10k_warn(ar, "mac sta rc update failed to find peer %pM on vdev %i\n", -+ sta->addr, arvif->vdev_id); -+ return; -+ } -+ - ath10k_dbg(ar, ATH10K_DBG_MAC, - "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n", - sta->addr, changed, sta->bandwidth, sta->rx_nss, -@@ -6351,12 +6412,13 @@ static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - - static int ath10k_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath10k *ar = hw->priv; - struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - - ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ampdu vdev_id %i sta %pM tid %hu action %d\n", - arvif->vdev_id, sta->addr, tid, action); -@@ -6397,7 +6459,7 @@ ath10k_mac_update_rx_channel(struct ath10k *ar, - lockdep_assert_held(&ar->data_lock); - - WARN_ON(ctx && vifs); -- WARN_ON(vifs && n_vifs != 1); -+ WARN_ON(vifs && !n_vifs); - - /* FIXME: Sort of an optimization and a workaround. Peers and vifs are - * on a linked list now. Doing a lookup peer -> vif -> chanctx for each -@@ -6711,6 +6773,13 @@ ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, - arvif->is_up = true; - } - -+ if (ath10k_mac_can_set_cts_prot(arvif)) { -+ ret = ath10k_mac_set_cts_prot(arvif); -+ if (ret) -+ ath10k_warn(ar, "failed to set cts protection for vdev %d: %d\n", -+ arvif->vdev_id, ret); -+ } -+ - mutex_unlock(&ar->conf_mutex); - return 0; - -diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c -index 930785a7..907fd60c 100644 ---- a/drivers/net/wireless/ath/ath10k/pci.c -+++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -3050,7 +3050,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, - goto err_core_destroy; - } - -- if (QCA_REV_6174(ar)) -+ if (QCA_REV_6174(ar) || QCA_REV_9377(ar)) - ath10k_pci_override_ce_config(ar); - - ret = ath10k_pci_alloc_pipes(ar); -diff --git a/drivers/net/wireless/ath/ath10k/spectral.c b/drivers/net/wireless/ath/ath10k/spectral.c -index 4671cfbc..a0e7eebc 100644 ---- a/drivers/net/wireless/ath/ath10k/spectral.c -+++ b/drivers/net/wireless/ath/ath10k/spectral.c -@@ -338,7 +338,7 @@ static ssize_t write_file_spec_scan_ctl(struct file *file, - } else { - res = -EINVAL; - } -- } else if (strncmp("background", buf, 9) == 0) { -+ } else if (strncmp("background", buf, 10) == 0) { - res = ath10k_spectral_scan_config(ar, SPECTRAL_BACKGROUND); - } else if (strncmp("manual", buf, 6) == 0) { - res = ath10k_spectral_scan_config(ar, SPECTRAL_MANUAL); -diff --git a/drivers/net/wireless/ath/ath10k/trace.h b/drivers/net/wireless/ath/ath10k/trace.h -index 71bdb368..0194bebb 100644 ---- a/drivers/net/wireless/ath/ath10k/trace.h -+++ b/drivers/net/wireless/ath/ath10k/trace.h -@@ -152,10 +152,9 @@ TRACE_EVENT(ath10k_log_dbg_dump, - ); - - TRACE_EVENT(ath10k_wmi_cmd, -- TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len, -- int ret), -+ TP_PROTO(struct ath10k *ar, int id, const void *buf, size_t buf_len), - -- TP_ARGS(ar, id, buf, buf_len, ret), -+ TP_ARGS(ar, id, buf, buf_len), - - TP_STRUCT__entry( - __string(device, dev_name(ar->dev)) -@@ -163,7 +162,6 @@ TRACE_EVENT(ath10k_wmi_cmd, - __field(unsigned int, id) - __field(size_t, buf_len) - __dynamic_array(u8, buf, buf_len) -- __field(int, ret) - ), - - TP_fast_assign( -@@ -171,17 +169,15 @@ TRACE_EVENT(ath10k_wmi_cmd, - __assign_str(driver, dev_driver_string(ar->dev)); - __entry->id = id; - __entry->buf_len = buf_len; -- __entry->ret = ret; - memcpy(__get_dynamic_array(buf), buf, buf_len); - ), - - TP_printk( -- "%s %s id %d len %zu ret %d", -+ "%s %s id %d len %zu", - __get_str(driver), - __get_str(device), - __entry->id, -- __entry->buf_len, -- __entry->ret -+ __entry->buf_len - ) - ); - -diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h -index 8f4f6a89..cfed5808 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-ops.h -+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h -@@ -639,6 +639,9 @@ ath10k_wmi_vdev_spectral_conf(struct ath10k *ar, - struct sk_buff *skb; - u32 cmd_id; - -+ if (!ar->wmi.ops->gen_vdev_spectral_conf) -+ return -EOPNOTSUPP; -+ - skb = ar->wmi.ops->gen_vdev_spectral_conf(ar, arg); - if (IS_ERR(skb)) - return PTR_ERR(skb); -@@ -654,6 +657,9 @@ ath10k_wmi_vdev_spectral_enable(struct ath10k *ar, u32 vdev_id, u32 trigger, - struct sk_buff *skb; - u32 cmd_id; - -+ if (!ar->wmi.ops->gen_vdev_spectral_enable) -+ return -EOPNOTSUPP; -+ - skb = ar->wmi.ops->gen_vdev_spectral_enable(ar, vdev_id, trigger, - enable); - if (IS_ERR(skb)) -diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -index 6fbd17b6..c27fff39 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c -+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c -@@ -1105,8 +1105,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_pdev *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1126,8 +1128,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_vdev *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1145,8 +1149,10 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, - struct ath10k_fw_stats_peer *dst; - - src = data; -- if (data_len < sizeof(*src)) -+ if (data_len < sizeof(*src)) { -+ kfree(tb); - return -EPROTO; -+ } - - data += sizeof(*src); - data_len -= sizeof(*src); -@@ -1418,6 +1424,11 @@ static struct sk_buff *ath10k_wmi_tlv_op_gen_init(struct ath10k *ar) - cfg->keep_alive_pattern_size = __cpu_to_le32(0); - cfg->max_tdls_concurrent_sleep_sta = __cpu_to_le32(1); - cfg->max_tdls_concurrent_buffer_sta = __cpu_to_le32(1); -+ cfg->wmi_send_separate = __cpu_to_le32(0); -+ cfg->num_ocb_vdevs = __cpu_to_le32(0); -+ cfg->num_ocb_channels = __cpu_to_le32(0); -+ cfg->num_ocb_schedules = __cpu_to_le32(0); -+ cfg->host_capab = __cpu_to_le32(0); - - ath10k_wmi_put_host_mem_chunks(ar, chunks); - -@@ -1448,10 +1459,10 @@ ath10k_wmi_tlv_op_gen_start_scan(struct ath10k *ar, - bssid_len = arg->n_bssids * sizeof(struct wmi_mac_addr); - ie_len = roundup(arg->ie_len, 4); - len = (sizeof(*tlv) + sizeof(*cmd)) + -- (arg->n_channels ? sizeof(*tlv) + chan_len : 0) + -- (arg->n_ssids ? sizeof(*tlv) + ssid_len : 0) + -- (arg->n_bssids ? sizeof(*tlv) + bssid_len : 0) + -- (arg->ie_len ? sizeof(*tlv) + ie_len : 0); -+ sizeof(*tlv) + chan_len + -+ sizeof(*tlv) + ssid_len + -+ sizeof(*tlv) + bssid_len + -+ sizeof(*tlv) + ie_len; - - skb = ath10k_wmi_alloc_skb(ar, len); - if (!skb) -diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h -index ad655c44..f5031f39 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h -+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h -@@ -1209,6 +1209,11 @@ struct wmi_tlv_resource_config { - __le32 keep_alive_pattern_size; - __le32 max_tdls_concurrent_sleep_sta; - __le32 max_tdls_concurrent_buffer_sta; -+ __le32 wmi_send_separate; -+ __le32 num_ocb_vdevs; -+ __le32 num_ocb_channels; -+ __le32 num_ocb_schedules; -+ __le32 host_capab; - } __packed; - - struct wmi_tlv_init_cmd { -diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c -index 7569db0f..b867875a 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi.c -+++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -1642,8 +1642,8 @@ int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, - cmd_hdr->cmd_id = __cpu_to_le32(cmd); - - memset(skb_cb, 0, sizeof(*skb_cb)); -+ trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len); - ret = ath10k_htc_send(&ar->htc, ar->wmi.eid, skb); -- trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len, ret); - - if (ret) - goto err_pull; -@@ -1749,6 +1749,12 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id) - if (ret) - dev_kfree_skb_any(skb); - -+ if (ret == -EAGAIN) { -+ ath10k_warn(ar, "wmi command %d timeout, restarting hardware\n", -+ cmd_id); -+ queue_work(ar->workqueue, &ar->restart_work); -+ } -+ - return ret; - } - -@@ -4059,7 +4065,7 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar, - rate_code[i], - type); - snprintf(buff, sizeof(buff), "%8d ", tpc[j]); -- strncat(tpc_value, buff, strlen(buff)); -+ strlcat(tpc_value, buff, sizeof(tpc_value)); - } - tpc_stats->tpc_table[type].pream_idx[i] = pream_idx; - tpc_stats->tpc_table[type].rate_code[i] = rate_code[i]; -diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h -index 72a4ef70..a8b2553e 100644 ---- a/drivers/net/wireless/ath/ath10k/wmi.h -+++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -4826,7 +4826,8 @@ enum wmi_10_4_vdev_param { - #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3) - - #define WMI_TXBF_STS_CAP_OFFSET_LSB 4 --#define WMI_TXBF_STS_CAP_OFFSET_MASK 0xf0 -+#define WMI_TXBF_STS_CAP_OFFSET_MASK 0x70 -+#define WMI_TXBF_CONF_IMPLICIT_BF BIT(7) - #define WMI_BF_SOUND_DIM_OFFSET_LSB 8 - #define WMI_BF_SOUND_DIM_OFFSET_MASK 0xf00 - -diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c -index 654a1e33..7c5f189c 100644 ---- a/drivers/net/wireless/ath/ath5k/debug.c -+++ b/drivers/net/wireless/ath/ath5k/debug.c -@@ -939,7 +939,10 @@ static int open_file_eeprom(struct inode *inode, struct file *file) - } - - for (i = 0; i < eesize; ++i) { -- AR5K_EEPROM_READ(i, val); -+ if (!ath5k_hw_nvram_read(ah, i, &val)) { -+ ret = -EIO; -+ goto freebuf; -+ } - buf[i] = val; - } - -diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -index dc44cfef..16e052d0 100644 ---- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c -+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c -@@ -502,8 +502,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - break; - return -EOPNOTSUPP; - default: -- WARN_ON(1); -- return -EINVAL; -+ return -EOPNOTSUPP; - } - - mutex_lock(&ah->lock); -diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -index 694ca2e6..74670e08 100644 ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -@@ -73,13 +73,13 @@ - #define AR9300_OTP_BASE \ - ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30000 : 0x14000) - #define AR9300_OTP_STATUS \ -- ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30018 : 0x15f18) -+ ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x31018 : 0x15f18) - #define AR9300_OTP_STATUS_TYPE 0x7 - #define AR9300_OTP_STATUS_VALID 0x4 - #define AR9300_OTP_STATUS_ACCESS_BUSY 0x2 - #define AR9300_OTP_STATUS_SM_BUSY 0x1 - #define AR9300_OTP_READ_DATA \ -- ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3001c : 0x15f1c) -+ ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3101c : 0x15f1c) - - enum targetPowerHTRates { - HT_TARGET_RATE_0_8_16, -diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -index 201425e7..fbc8c9a9 100644 ---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -@@ -1815,8 +1815,6 @@ static void ar9003_hw_spectral_scan_wait(struct ath_hw *ah) - static void ar9003_hw_tx99_start(struct ath_hw *ah, u32 qnum) - { - REG_SET_BIT(ah, AR_PHY_TEST, PHY_AGC_CLR); -- REG_SET_BIT(ah, 0x9864, 0x7f000); -- REG_SET_BIT(ah, 0x9924, 0x7f00fe); - REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_DIS); - REG_WRITE(ah, AR_CR, AR_CR_RXD); - REG_WRITE(ah, AR_DLCL_IFS(qnum), 0); -diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h -index b42f4a96..a660e40f 100644 ---- a/drivers/net/wireless/ath/ath9k/ath9k.h -+++ b/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -959,6 +959,7 @@ struct ath_softc { - struct survey_info *cur_survey; - struct survey_info survey[ATH9K_NUM_CHANNELS]; - -+ spinlock_t intr_lock; - struct tasklet_struct intr_tq; - struct tasklet_struct bcon_tasklet; - struct ath_hw *sc_ah; -diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c -index a8762711..03945731 100644 ---- a/drivers/net/wireless/ath/ath9k/common-spectral.c -+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c -@@ -528,6 +528,9 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h - if (!(radar_info->pulse_bw_info & SPECTRAL_SCAN_BITMASK)) - return 0; - -+ if (!spec_priv->rfs_chan_spec_scan) -+ return 1; -+ - /* Output buffers are full, no need to process anything - * since there is no space to put the result anyway - */ -@@ -1072,7 +1075,7 @@ static struct rchan_callbacks rfs_spec_scan_cb = { - - void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv) - { -- if (config_enabled(CONFIG_ATH9K_DEBUGFS)) { -+ if (config_enabled(CONFIG_ATH9K_DEBUGFS) && spec_priv->rfs_chan_spec_scan) { - relay_close(spec_priv->rfs_chan_spec_scan); - spec_priv->rfs_chan_spec_scan = NULL; - } -@@ -1086,6 +1089,9 @@ void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, - debugfs_phy, - 1024, 256, &rfs_spec_scan_cb, - NULL); -+ if (!spec_priv->rfs_chan_spec_scan) -+ return; -+ - debugfs_create_file("spectral_scan_ctl", - S_IRUSR | S_IWUSR, - debugfs_phy, spec_priv, -diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c -index 165dd202..c92564b3 100644 ---- a/drivers/net/wireless/ath/ath9k/hif_usb.c -+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -37,6 +37,7 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { - { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */ - { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ - { USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */ -+ { USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */ - - { USB_DEVICE(0x0cf3, 0x7015), - .driver_info = AR9287_USB }, /* Atheros */ -@@ -1216,6 +1217,9 @@ static int send_eject_command(struct usb_interface *interface) - u8 bulk_out_ep; - int r; - -+ if (iface_desc->desc.bNumEndpoints < 2) -+ return -ENODEV; -+ - /* Find bulk out endpoint */ - for (r = 1; r >= 0; r--) { - endpoint = &iface_desc->endpoint[r].desc; -diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -index a680a970..e4281438 100644 ---- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c -+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c -@@ -1657,13 +1657,14 @@ static void ath9k_htc_reset_tsf(struct ieee80211_hw *hw, - - static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath9k_htc_priv *priv = hw->priv; - struct ath9k_htc_sta *ista; - int ret = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - - mutex_lock(&priv->mutex); - ath9k_htc_ps_wakeup(priv); -diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c -index 41382f89..4435c7bb 100644 ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1595,6 +1595,10 @@ bool ath9k_hw_check_alive(struct ath_hw *ah) - int count = 50; - u32 reg, last_val; - -+ /* Check if chip failed to wake up */ -+ if (REG_READ(ah, AR_CFG) == 0xdeadbeef) -+ return false; -+ - if (AR_SREV_9300(ah)) - return !ath9k_hw_detect_mac_hang(ah); - -diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c -index bc70ce62..0f5672f5 100644 ---- a/drivers/net/wireless/ath/ath9k/init.c -+++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -619,6 +619,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, - common->bt_ant_diversity = 1; - - spin_lock_init(&common->cc_lock); -+ spin_lock_init(&sc->intr_lock); - spin_lock_init(&sc->sc_serial_rw); - spin_lock_init(&sc->sc_pm_lock); - spin_lock_init(&sc->chan_lock); -diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c -index bba85d1a..d937c39b 100644 ---- a/drivers/net/wireless/ath/ath9k/mac.c -+++ b/drivers/net/wireless/ath/ath9k/mac.c -@@ -805,21 +805,12 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah) - } - EXPORT_SYMBOL(ath9k_hw_disable_interrupts); - --void ath9k_hw_enable_interrupts(struct ath_hw *ah) -+static void __ath9k_hw_enable_interrupts(struct ath_hw *ah) - { - struct ath_common *common = ath9k_hw_common(ah); - u32 sync_default = AR_INTR_SYNC_DEFAULT; - u32 async_mask; - -- if (!(ah->imask & ATH9K_INT_GLOBAL)) -- return; -- -- if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { -- ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -- atomic_read(&ah->intr_ref_cnt)); -- return; -- } -- - if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || - AR_SREV_9561(ah)) - sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; -@@ -841,6 +832,39 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) - ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", - REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); - } -+ -+void ath9k_hw_resume_interrupts(struct ath_hw *ah) -+{ -+ struct ath_common *common = ath9k_hw_common(ah); -+ -+ if (!(ah->imask & ATH9K_INT_GLOBAL)) -+ return; -+ -+ if (atomic_read(&ah->intr_ref_cnt) != 0) { -+ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -+ atomic_read(&ah->intr_ref_cnt)); -+ return; -+ } -+ -+ __ath9k_hw_enable_interrupts(ah); -+} -+EXPORT_SYMBOL(ath9k_hw_resume_interrupts); -+ -+void ath9k_hw_enable_interrupts(struct ath_hw *ah) -+{ -+ struct ath_common *common = ath9k_hw_common(ah); -+ -+ if (!(ah->imask & ATH9K_INT_GLOBAL)) -+ return; -+ -+ if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { -+ ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", -+ atomic_read(&ah->intr_ref_cnt)); -+ return; -+ } -+ -+ __ath9k_hw_enable_interrupts(ah); -+} - EXPORT_SYMBOL(ath9k_hw_enable_interrupts); - - void ath9k_hw_set_interrupts(struct ath_hw *ah) -diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h -index 7fbf7f96..1b63d26f 100644 ---- a/drivers/net/wireless/ath/ath9k/mac.h -+++ b/drivers/net/wireless/ath/ath9k/mac.h -@@ -748,6 +748,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah); - void ath9k_hw_enable_interrupts(struct ath_hw *ah); - void ath9k_hw_disable_interrupts(struct ath_hw *ah); - void ath9k_hw_kill_interrupts(struct ath_hw *ah); -+void ath9k_hw_resume_interrupts(struct ath_hw *ah); - - void ar9002_hw_attach_mac_ops(struct ath_hw *ah); - -diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c -index 8c5d2cf9..3abc6457 100644 ---- a/drivers/net/wireless/ath/ath9k/main.c -+++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -373,21 +373,20 @@ void ath9k_tasklet(unsigned long data) - struct ath_common *common = ath9k_hw_common(ah); - enum ath_reset_type type; - unsigned long flags; -- u32 status = sc->intrstatus; -+ u32 status; - u32 rxmask; - -+ spin_lock_irqsave(&sc->intr_lock, flags); -+ status = sc->intrstatus; -+ sc->intrstatus = 0; -+ spin_unlock_irqrestore(&sc->intr_lock, flags); -+ - ath9k_ps_wakeup(sc); - spin_lock(&sc->sc_pcu_lock); - - if (status & ATH9K_INT_FATAL) { - type = RESET_TYPE_FATAL_INT; - ath9k_queue_reset(sc, type); -- -- /* -- * Increment the ref. counter here so that -- * interrupts are enabled in the reset routine. -- */ -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, "FATAL: Skipping interrupts\n"); - goto out; - } -@@ -403,11 +402,6 @@ void ath9k_tasklet(unsigned long data) - type = RESET_TYPE_BB_WATCHDOG; - ath9k_queue_reset(sc, type); - -- /* -- * Increment the ref. counter here so that -- * interrupts are enabled in the reset routine. -- */ -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, - "BB_WATCHDOG: Skipping interrupts\n"); - goto out; -@@ -420,7 +414,6 @@ void ath9k_tasklet(unsigned long data) - if ((sc->gtt_cnt >= MAX_GTT_CNT) && !ath9k_hw_check_alive(ah)) { - type = RESET_TYPE_TX_GTT; - ath9k_queue_reset(sc, type); -- atomic_inc(&ah->intr_ref_cnt); - ath_dbg(common, RESET, - "GTT: Skipping interrupts\n"); - goto out; -@@ -477,7 +470,7 @@ void ath9k_tasklet(unsigned long data) - ath9k_btcoex_handle_interrupt(sc, status); - - /* re-enable hardware interrupt */ -- ath9k_hw_enable_interrupts(ah); -+ ath9k_hw_resume_interrupts(ah); - out: - spin_unlock(&sc->sc_pcu_lock); - ath9k_ps_restore(sc); -@@ -541,7 +534,9 @@ irqreturn_t ath_isr(int irq, void *dev) - return IRQ_NONE; - - /* Cache the status */ -- sc->intrstatus = status; -+ spin_lock(&sc->intr_lock); -+ sc->intrstatus |= status; -+ spin_unlock(&sc->intr_lock); - - if (status & SCHED_INTR) - sched = true; -@@ -587,7 +582,7 @@ chip_reset: - - if (sched) { - /* turn off every interrupt */ -- ath9k_hw_disable_interrupts(ah); -+ ath9k_hw_kill_interrupts(ah); - tasklet_schedule(&sc->intr_tq); - } - -@@ -1860,14 +1855,16 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - - static int ath9k_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct ath_softc *sc = hw->priv; - struct ath_common *common = ath9k_hw_common(sc->sc_ah); - bool flush = false; - int ret = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - mutex_lock(&sc->mutex); - -diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c -index 7cdaf40c..ea7b8c25 100644 ---- a/drivers/net/wireless/ath/ath9k/pci.c -+++ b/drivers/net/wireless/ath/ath9k/pci.c -@@ -27,7 +27,6 @@ static const struct pci_device_id ath_pci_id_table[] = { - { PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI */ - { PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */ - { PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */ -- { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ - - #ifdef CONFIG_ATH9K_PCOEM - /* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */ -@@ -38,7 +37,7 @@ static const struct pci_device_id ath_pci_id_table[] = { - .driver_data = ATH9K_PCI_LED_ACT_HI }, - #endif - -- { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ -+ { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ - - #ifdef CONFIG_ATH9K_PCOEM - { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, -@@ -86,7 +85,11 @@ static const struct pci_device_id ath_pci_id_table[] = { - 0x10CF, /* Fujitsu */ - 0x1536), - .driver_data = ATH9K_PCI_D3_L1_WAR }, -+#endif - -+ { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ -+ -+#ifdef CONFIG_ATH9K_PCOEM - /* AR9285 card for Asus */ - { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, - 0x002B, -diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c -index ac4781f3..7ee1a318 100644 ---- a/drivers/net/wireless/ath/ath9k/tx99.c -+++ b/drivers/net/wireless/ath/ath9k/tx99.c -@@ -180,6 +180,9 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf, - ssize_t len; - int r; - -+ if (count < 1) -+ return -EINVAL; -+ - if (sc->cur_chan->nvifs > 1) - return -EOPNOTSUPP; - -@@ -187,25 +190,32 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf, - if (copy_from_user(buf, user_buf, len)) - return -EFAULT; - -+ buf[len] = '\0'; -+ - if (strtobool(buf, &start)) - return -EINVAL; - -+ mutex_lock(&sc->mutex); -+ - if (start == sc->tx99_state) { - if (!start) -- return count; -+ goto out; - ath_dbg(common, XMIT, "Resetting TX99\n"); - ath9k_tx99_deinit(sc); - } - - if (!start) { - ath9k_tx99_deinit(sc); -- return count; -+ goto out; - } - - r = ath9k_tx99_init(sc); -- if (r) -+ if (r) { -+ mutex_unlock(&sc->mutex); - return r; -- -+ } -+out: -+ mutex_unlock(&sc->mutex); - return count; - } - -diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c -index 19d3d644..4d1527a2 100644 ---- a/drivers/net/wireless/ath/carl9170/main.c -+++ b/drivers/net/wireless/ath/carl9170/main.c -@@ -1413,10 +1413,12 @@ static void carl9170_ampdu_work(struct work_struct *work) - - static int carl9170_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- u16 tid, u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - struct ar9170 *ar = hw->priv; - struct carl9170_sta_info *sta_info = (void *) sta->drv_priv; - struct carl9170_sta_tid *tid_info; -diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c -index 06ea6cc9..62077bda 100644 ---- a/drivers/net/wireless/ath/regd.c -+++ b/drivers/net/wireless/ath/regd.c -@@ -254,8 +254,12 @@ bool ath_is_49ghz_allowed(u16 regdomain) - EXPORT_SYMBOL(ath_is_49ghz_allowed); - - /* Frequency is one where radar detection is required */ --static bool ath_is_radar_freq(u16 center_freq) -+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); - } - -@@ -306,7 +310,7 @@ __ath_reg_apply_beaconing_flags(struct wiphy *wiphy, - enum nl80211_reg_initiator initiator, - struct ieee80211_channel *ch) - { -- if (ath_is_radar_freq(ch->center_freq) || -+ if (ath_is_radar_freq(ch->center_freq, reg) || - (ch->flags & IEEE80211_CHAN_RADAR)) - return; - -@@ -395,8 +399,9 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy, - } - } - --/* Always apply Radar/DFS rules on freq range 5260 MHz - 5700 MHz */ --static void ath_reg_apply_radar_flags(struct wiphy *wiphy) -+/* Always apply Radar/DFS rules on freq range 5500 MHz - 5700 MHz */ -+static void ath_reg_apply_radar_flags(struct wiphy *wiphy, -+ struct ath_regulatory *reg) - { - struct ieee80211_supported_band *sband; - struct ieee80211_channel *ch; -@@ -409,7 +414,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) - - for (i = 0; i < sband->n_channels; i++) { - ch = &sband->channels[i]; -- if (!ath_is_radar_freq(ch->center_freq)) -+ if (!ath_is_radar_freq(ch->center_freq, reg)) - continue; - /* We always enable radar detection/DFS on this - * frequency range. Additionally we also apply on -@@ -505,7 +510,7 @@ void ath_reg_notifier_apply(struct wiphy *wiphy, - struct ath_common *common = container_of(reg, struct ath_common, - regulatory); - /* We always apply this */ -- ath_reg_apply_radar_flags(wiphy); -+ ath_reg_apply_radar_flags(wiphy, reg); - - /* - * This would happen when we have sent a custom regulatory request -@@ -653,7 +658,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg, - } - - wiphy_apply_custom_regulatory(wiphy, regd); -- ath_reg_apply_radar_flags(wiphy); -+ ath_reg_apply_radar_flags(wiphy, reg); - ath_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg); - return 0; - } -diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h -index 37f53bd8..184b6810 100644 ---- a/drivers/net/wireless/ath/regd.h -+++ b/drivers/net/wireless/ath/regd.h -@@ -68,12 +68,14 @@ enum CountryCode { - CTRY_AUSTRALIA = 36, - CTRY_AUSTRIA = 40, - CTRY_AZERBAIJAN = 31, -+ CTRY_BAHAMAS = 44, - CTRY_BAHRAIN = 48, - CTRY_BANGLADESH = 50, - CTRY_BARBADOS = 52, - CTRY_BELARUS = 112, - CTRY_BELGIUM = 56, - CTRY_BELIZE = 84, -+ CTRY_BERMUDA = 60, - CTRY_BOLIVIA = 68, - CTRY_BOSNIA_HERZ = 70, - CTRY_BRAZIL = 76, -@@ -159,6 +161,7 @@ enum CountryCode { - CTRY_ROMANIA = 642, - CTRY_RUSSIA = 643, - CTRY_SAUDI_ARABIA = 682, -+ CTRY_SERBIA = 688, - CTRY_SERBIA_MONTENEGRO = 891, - CTRY_SINGAPORE = 702, - CTRY_SLOVAKIA = 703, -@@ -170,11 +173,13 @@ enum CountryCode { - CTRY_SWITZERLAND = 756, - CTRY_SYRIA = 760, - CTRY_TAIWAN = 158, -+ CTRY_TANZANIA = 834, - CTRY_THAILAND = 764, - CTRY_TRINIDAD_Y_TOBAGO = 780, - CTRY_TUNISIA = 788, - CTRY_TURKEY = 792, - CTRY_UAE = 784, -+ CTRY_UGANDA = 800, - CTRY_UKRAINE = 804, - CTRY_UNITED_KINGDOM = 826, - CTRY_UNITED_STATES = 840, -diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h -index bdd2b4d6..15bbd1e0 100644 ---- a/drivers/net/wireless/ath/regd_common.h -+++ b/drivers/net/wireless/ath/regd_common.h -@@ -35,6 +35,7 @@ enum EnumRd { - FRANCE_RES = 0x31, - FCC3_FCCA = 0x3A, - FCC3_WORLD = 0x3B, -+ FCC3_ETSIC = 0x3F, - - ETSI1_WORLD = 0x37, - ETSI3_ETSIA = 0x32, -@@ -44,6 +45,7 @@ enum EnumRd { - ETSI4_ETSIC = 0x38, - ETSI5_WORLD = 0x39, - ETSI6_WORLD = 0x34, -+ ETSI8_WORLD = 0x3D, - ETSI_RESERVED = 0x33, - - MKK1_MKKA = 0x40, -@@ -59,6 +61,7 @@ enum EnumRd { - MKK1_MKKA1 = 0x4A, - MKK1_MKKA2 = 0x4B, - MKK1_MKKC = 0x4C, -+ APL2_FCCA = 0x4D, - - APL3_FCCA = 0x50, - APL1_WORLD = 0x52, -@@ -67,6 +70,7 @@ enum EnumRd { - APL1_ETSIC = 0x55, - APL2_ETSIC = 0x56, - APL5_WORLD = 0x58, -+ APL13_WORLD = 0x5A, - APL6_WORLD = 0x5B, - APL7_FCCA = 0x5C, - APL8_WORLD = 0x5D, -@@ -168,6 +172,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {FCC2_ETSIC, CTL_FCC, CTL_ETSI}, - {FCC3_FCCA, CTL_FCC, CTL_FCC}, - {FCC3_WORLD, CTL_FCC, CTL_ETSI}, -+ {FCC3_ETSIC, CTL_FCC, CTL_ETSI}, - {FCC4_FCCA, CTL_FCC, CTL_FCC}, - {FCC5_FCCA, CTL_FCC, CTL_FCC}, - {FCC6_FCCA, CTL_FCC, CTL_FCC}, -@@ -179,6 +184,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {ETSI4_WORLD, CTL_ETSI, CTL_ETSI}, - {ETSI5_WORLD, CTL_ETSI, CTL_ETSI}, - {ETSI6_WORLD, CTL_ETSI, CTL_ETSI}, -+ {ETSI8_WORLD, CTL_ETSI, CTL_ETSI}, - - /* XXX: For ETSI3_ETSIA, Was NO_CTL meant for the 2 GHz band ? */ - {ETSI3_ETSIA, CTL_ETSI, CTL_ETSI}, -@@ -188,9 +194,11 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { - {FCC1_FCCA, CTL_FCC, CTL_FCC}, - {APL1_WORLD, CTL_FCC, CTL_ETSI}, - {APL2_WORLD, CTL_FCC, CTL_ETSI}, -+ {APL2_FCCA, CTL_FCC, CTL_FCC}, - {APL3_WORLD, CTL_FCC, CTL_ETSI}, - {APL4_WORLD, CTL_FCC, CTL_ETSI}, - {APL5_WORLD, CTL_FCC, CTL_ETSI}, -+ {APL13_WORLD, CTL_ETSI, CTL_ETSI}, - {APL6_WORLD, CTL_ETSI, CTL_ETSI}, - {APL8_WORLD, CTL_ETSI, CTL_ETSI}, - {APL9_WORLD, CTL_ETSI, CTL_ETSI}, -@@ -298,6 +306,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_AUSTRALIA2, FCC6_WORLD, "AU"}, - {CTRY_AUSTRIA, ETSI1_WORLD, "AT"}, - {CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"}, -+ {CTRY_BAHAMAS, FCC3_WORLD, "BS"}, - {CTRY_BAHRAIN, APL6_WORLD, "BH"}, - {CTRY_BANGLADESH, NULL1_WORLD, "BD"}, - {CTRY_BARBADOS, FCC2_WORLD, "BB"}, -@@ -305,6 +314,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_BELGIUM, ETSI1_WORLD, "BE"}, - {CTRY_BELGIUM2, ETSI4_WORLD, "BL"}, - {CTRY_BELIZE, APL1_ETSIC, "BZ"}, -+ {CTRY_BERMUDA, FCC3_FCCA, "BM"}, - {CTRY_BOLIVIA, APL1_ETSIC, "BO"}, - {CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"}, - {CTRY_BRAZIL, FCC3_WORLD, "BR"}, -@@ -444,6 +454,7 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_ROMANIA, NULL1_WORLD, "RO"}, - {CTRY_RUSSIA, NULL1_WORLD, "RU"}, - {CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"}, -+ {CTRY_SERBIA, ETSI1_WORLD, "RS"}, - {CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"}, - {CTRY_SINGAPORE, APL6_WORLD, "SG"}, - {CTRY_SLOVAKIA, ETSI1_WORLD, "SK"}, -@@ -455,10 +466,12 @@ static struct country_code_to_enum_rd allCountries[] = { - {CTRY_SWITZERLAND, ETSI1_WORLD, "CH"}, - {CTRY_SYRIA, NULL1_WORLD, "SY"}, - {CTRY_TAIWAN, APL3_FCCA, "TW"}, -+ {CTRY_TANZANIA, APL1_WORLD, "TZ"}, - {CTRY_THAILAND, FCC3_WORLD, "TH"}, - {CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"}, - {CTRY_TUNISIA, ETSI3_WORLD, "TN"}, - {CTRY_TURKEY, ETSI3_WORLD, "TR"}, -+ {CTRY_UGANDA, FCC3_WORLD, "UG"}, - {CTRY_UKRAINE, NULL1_WORLD, "UA"}, - {CTRY_UAE, NULL1_WORLD, "AE"}, - {CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"}, -diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c -index 7c169abd..a27279c2 100644 ---- a/drivers/net/wireless/ath/wcn36xx/main.c -+++ b/drivers/net/wireless/ath/wcn36xx/main.c -@@ -857,12 +857,14 @@ static int wcn36xx_resume(struct ieee80211_hw *hw) - - static int wcn36xx_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct wcn36xx *wcn = hw->priv; - struct wcn36xx_sta *sta_priv = NULL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - wcn36xx_dbg(WCN36XX_DBG_MAC, "mac ampdu action action %d tid %d\n", - action, tid); -diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c -index 9bec8237..99c21aac 100644 ---- a/drivers/net/wireless/ath/wcn36xx/txrx.c -+++ b/drivers/net/wireless/ath/wcn36xx/txrx.c -@@ -57,7 +57,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb) - RX_FLAG_MMIC_STRIPPED | - RX_FLAG_DECRYPTED; - -- wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag); -+ wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%llx\n", status.flag); - - memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); - -diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c -index bb69a594..f09fafaa 100644 ---- a/drivers/net/wireless/ath/wil6210/main.c -+++ b/drivers/net/wireless/ath/wil6210/main.c -@@ -125,9 +125,15 @@ void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src, - u32 *d = dst; - const volatile u32 __iomem *s = src; - -- /* size_t is unsigned, if (count%4 != 0) it will wrap */ -- for (count += 4; count > 4; count -= 4) -+ for (; count >= 4; count -= 4) - *d++ = __raw_readl(s++); -+ -+ if (unlikely(count)) { -+ /* count can be 1..3 */ -+ u32 tmp = __raw_readl(s); -+ -+ memcpy(d, &tmp, count); -+ } - } - - void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, -@@ -136,8 +142,16 @@ void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src, - volatile u32 __iomem *d = dst; - const u32 *s = src; - -- for (count += 4; count > 4; count -= 4) -+ for (; count >= 4; count -= 4) - __raw_writel(*s++, d++); -+ -+ if (unlikely(count)) { -+ /* count can be 1..3 */ -+ u32 tmp = 0; -+ -+ memcpy(&tmp, s, count); -+ __raw_writel(tmp, d); -+ } - } - - static void wil_disconnect_cid(struct wil6210_priv *wil, int cid, -@@ -330,18 +344,19 @@ static void wil_fw_error_worker(struct work_struct *work) - - wil->last_fw_recovery = jiffies; - -+ wil_info(wil, "fw error recovery requested (try %d)...\n", -+ wil->recovery_count); -+ if (!no_fw_recovery) -+ wil->recovery_state = fw_recovery_running; -+ if (wil_wait_for_recovery(wil) != 0) -+ return; -+ - mutex_lock(&wil->mutex); - switch (wdev->iftype) { - case NL80211_IFTYPE_STATION: - case NL80211_IFTYPE_P2P_CLIENT: - case NL80211_IFTYPE_MONITOR: -- wil_info(wil, "fw error recovery requested (try %d)...\n", -- wil->recovery_count); -- if (!no_fw_recovery) -- wil->recovery_state = fw_recovery_running; -- if (0 != wil_wait_for_recovery(wil)) -- break; -- -+ /* silent recovery, upper layers will see disconnect */ - __wil_down(wil); - __wil_up(wil); - break; -diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c -index 6ed26bac..7af8479a 100644 ---- a/drivers/net/wireless/ath/wil6210/wmi.c -+++ b/drivers/net/wireless/ath/wil6210/wmi.c -@@ -1035,8 +1035,14 @@ int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) - }; - int rc; - u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; -- struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); -+ struct wmi_set_appie_cmd *cmd; - -+ if (len < ie_len) { -+ rc = -EINVAL; -+ goto out; -+ } -+ -+ cmd = kzalloc(len, GFP_KERNEL); - if (!cmd) { - rc = -ENOMEM; - goto out; -diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c -index ec2b9c57..3644c9ed 100644 ---- a/drivers/net/wireless/b43/phy_common.c -+++ b/drivers/net/wireless/b43/phy_common.c -@@ -616,7 +616,7 @@ struct b43_c32 b43_cordic(int theta) - u8 i; - s32 tmp; - s8 signx = 1; -- u32 angle = 0; -+ s32 angle = 0; - struct b43_c32 ret = { .i = 39797, .q = 0, }; - - while (theta > (180 << 16)) -diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c -index 058a9f23..55cb0769 100644 ---- a/drivers/net/wireless/b43/phy_lp.c -+++ b/drivers/net/wireless/b43/phy_lp.c -@@ -1834,7 +1834,7 @@ static void lpphy_papd_cal(struct b43_wldev *dev, struct lpphy_tx_gains gains, - static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) - { - struct b43_phy_lp *lpphy = dev->phy.lp; -- struct lpphy_tx_gains gains, oldgains; -+ struct lpphy_tx_gains oldgains; - int old_txpctl, old_afe_ovr, old_rf, old_bbmult; - - lpphy_read_tx_pctl_mode_from_hardware(dev); -@@ -1848,9 +1848,9 @@ static void lpphy_papd_cal_txpwr(struct b43_wldev *dev) - lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF); - - if (dev->dev->chip_id == 0x4325 && dev->dev->chip_rev == 0) -- lpphy_papd_cal(dev, gains, 0, 1, 30); -+ lpphy_papd_cal(dev, oldgains, 0, 1, 30); - else -- lpphy_papd_cal(dev, gains, 0, 1, 65); -+ lpphy_papd_cal(dev, oldgains, 0, 1, 65); - - if (old_afe_ovr) - lpphy_set_tx_gains(dev, oldgains); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -index 59cef6c6..72e1796c 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c -@@ -705,7 +705,7 @@ done: - int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - struct sk_buff_head *pktq, uint totlen) - { -- struct sk_buff *glom_skb; -+ struct sk_buff *glom_skb = NULL; - struct sk_buff *skb; - u32 addr = sdiodev->sbwad; - int err = 0; -@@ -726,10 +726,8 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - return -ENOMEM; - err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr, - glom_skb); -- if (err) { -- brcmu_pkt_buf_free_skb(glom_skb); -+ if (err) - goto done; -- } - - skb_queue_walk(pktq, skb) { - memcpy(skb->data, glom_skb->data, skb->len); -@@ -740,6 +738,7 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev, - pktq); - - done: -+ brcmu_pkt_buf_free_skb(glom_skb); - return err; - } - -@@ -1109,6 +1108,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43340), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43341), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43362), -+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43364), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4335_4339), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43430), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4345), -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/brcm80211/brcmfmac/bus.h -index 230cad78..84b8b1ea 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/bus.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/bus.h -@@ -214,7 +214,9 @@ bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, struct sk_buff *pkt, - int prec); - - /* Receive frame for delivery to OS. Callee disposes of rxp. */ --void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp); -+void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp, bool handle_event); -+/* Receive async event packet from firmware. Callee disposes of rxp. */ -+void brcmf_rx_event(struct device *dev, struct sk_buff *rxp); - - /* Indication from bus module regarding presence/insertion of dongle. */ - int brcmf_attach(struct device *dev); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -index 70a69853..231c0ba6 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -@@ -876,7 +876,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - - eth_broadcast_addr(params_le->bssid); - params_le->bss_type = DOT11_BSSTYPE_ANY; -- params_le->scan_type = 0; -+ params_le->scan_type = BRCMF_SCANTYPE_ACTIVE; - params_le->channel_num = 0; - params_le->nprobes = cpu_to_le32(-1); - params_le->active_time = cpu_to_le32(-1); -@@ -884,12 +884,9 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - params_le->home_time = cpu_to_le32(-1); - memset(¶ms_le->ssid_le, 0, sizeof(params_le->ssid_le)); - -- /* if request is null exit so it will be all channel broadcast scan */ -- if (!request) -- return; -- - n_ssids = request->n_ssids; - n_channels = request->n_channels; -+ - /* Copy channel array if applicable */ - brcmf_dbg(SCAN, "### List of channelspecs to scan ### %d\n", - n_channels); -@@ -926,16 +923,8 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, - ptr += sizeof(ssid_le); - } - } else { -- brcmf_dbg(SCAN, "Broadcast scan %p\n", request->ssids); -- if ((request->ssids) && request->ssids->ssid_len) { -- brcmf_dbg(SCAN, "SSID %s len=%d\n", -- params_le->ssid_le.SSID, -- request->ssids->ssid_len); -- params_le->ssid_le.SSID_len = -- cpu_to_le32(request->ssids->ssid_len); -- memcpy(¶ms_le->ssid_le.SSID, request->ssids->ssid, -- request->ssids->ssid_len); -- } -+ brcmf_dbg(SCAN, "Performing passive scan\n"); -+ params_le->scan_type = BRCMF_SCANTYPE_PASSIVE; - } - /* Adding mask to channel numbers */ - params_le->channel_num = -@@ -2914,6 +2903,7 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - struct brcmf_cfg80211_info *cfg = ifp->drvr->config; - s32 status; - struct brcmf_escan_result_le *escan_result_le; -+ u32 escan_buflen; - struct brcmf_bss_info_le *bss_info_le; - struct brcmf_bss_info_le *bss = NULL; - u32 bi_length; -@@ -2930,11 +2920,23 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - - if (status == BRCMF_E_STATUS_PARTIAL) { - brcmf_dbg(SCAN, "ESCAN Partial result\n"); -+ if (e->datalen < sizeof(*escan_result_le)) { -+ brcmf_err("invalid event data length\n"); -+ goto exit; -+ } - escan_result_le = (struct brcmf_escan_result_le *) data; - if (!escan_result_le) { - brcmf_err("Invalid escan result (NULL pointer)\n"); - goto exit; - } -+ escan_buflen = le32_to_cpu(escan_result_le->buflen); -+ if (escan_buflen > WL_ESCAN_BUF_SIZE || -+ escan_buflen > e->datalen || -+ escan_buflen < sizeof(*escan_result_le)) { -+ brcmf_err("Invalid escan buffer length: %d\n", -+ escan_buflen); -+ goto exit; -+ } - if (le16_to_cpu(escan_result_le->bss_count) != 1) { - brcmf_err("Invalid bss_count %d: ignoring\n", - escan_result_le->bss_count); -@@ -2951,9 +2953,8 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, - } - - bi_length = le32_to_cpu(bss_info_le->length); -- if (bi_length != (le32_to_cpu(escan_result_le->buflen) - -- WL_ESCAN_RESULTS_FIXED_SIZE)) { -- brcmf_err("Invalid bss_info length %d: ignoring\n", -+ if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) { -+ brcmf_err("Ignoring invalid bss_info length: %d\n", - bi_length); - goto exit; - } -@@ -3327,9 +3328,15 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - struct brcmf_pno_scanresults_le *pfn_result; - u32 result_count; - u32 status; -+ u32 datalen; - - brcmf_dbg(SCAN, "Enter\n"); - -+ if (e->datalen < (sizeof(*pfn_result) + sizeof(*netinfo))) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - if (e->event_code == BRCMF_E_PFN_NET_LOST) { - brcmf_dbg(SCAN, "PFN NET LOST event. Do Nothing\n"); - return 0; -@@ -3348,6 +3355,14 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - if (result_count > 0) { - int i; - -+ data += sizeof(struct brcmf_pno_scanresults_le); -+ netinfo_start = (struct brcmf_pno_net_info_le *)data; -+ datalen = e->datalen - ((void *)netinfo_start - (void *)pfn_result); -+ if (datalen < result_count * sizeof(*netinfo)) { -+ brcmf_err("insufficient event data\n"); -+ goto out_err; -+ } -+ - request = kzalloc(sizeof(*request), GFP_KERNEL); - ssid = kcalloc(result_count, sizeof(*ssid), GFP_KERNEL); - channel = kcalloc(result_count, sizeof(*channel), GFP_KERNEL); -@@ -3357,9 +3372,6 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - } - - request->wiphy = wiphy; -- data += sizeof(struct brcmf_pno_scanresults_le); -- netinfo_start = (struct brcmf_pno_net_info_le *)data; -- - for (i = 0; i < result_count; i++) { - netinfo = &netinfo_start[i]; - if (!netinfo) { -@@ -3369,6 +3381,8 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, - goto out_err; - } - -+ if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN) -+ netinfo->SSID_len = IEEE80211_MAX_SSID_LEN; - brcmf_dbg(SCAN, "SSID:%s Channel:%d\n", - netinfo->SSID, netinfo->channel); - memcpy(ssid[i].ssid, netinfo->SSID, netinfo->SSID_len); -@@ -4294,9 +4308,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) - err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0); - if (err < 0) - brcmf_err("setting AP mode failed %d\n", err); -- err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 0); -- if (err < 0) -- brcmf_err("setting INFRA mode failed %d\n", err); - if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) - brcmf_fil_iovar_int_set(ifp, "mbss", 0); - err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, -@@ -4472,6 +4483,11 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, - cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true, - GFP_KERNEL); - } else if (ieee80211_is_action(mgmt->frame_control)) { -+ if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) { -+ brcmf_err("invalid action frame length\n"); -+ err = -EINVAL; -+ goto exit; -+ } - af_params = kzalloc(sizeof(*af_params), GFP_KERNEL); - if (af_params == NULL) { - brcmf_err("unable to allocate frame\n"); -@@ -4833,6 +4849,8 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, - conn_info->req_ie = - kmemdup(cfg->extra_buf, conn_info->req_ie_len, - GFP_KERNEL); -+ if (!conn_info->req_ie) -+ conn_info->req_ie_len = 0; - } else { - conn_info->req_ie_len = 0; - conn_info->req_ie = NULL; -@@ -4849,6 +4867,8 @@ static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, - conn_info->resp_ie = - kmemdup(cfg->extra_buf, conn_info->resp_ie_len, - GFP_KERNEL); -+ if (!conn_info->resp_ie) -+ conn_info->resp_ie_len = 0; - } else { - conn_info->resp_ie_len = 0; - conn_info->resp_ie = NULL; -@@ -6164,7 +6184,7 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, - req->alpha2[0], req->alpha2[1]); - - /* ignore non-ISO3166 country codes */ -- for (i = 0; i < sizeof(req->alpha2); i++) -+ for (i = 0; i < 2; i++) - if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { - brcmf_err("not a ISO3166 code\n"); - return; -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/core.c b/drivers/net/wireless/brcm80211/brcmfmac/core.c -index b5ab98ee..3082391c 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/core.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c -@@ -211,7 +211,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - int ret; - struct brcmf_if *ifp = netdev_priv(ndev); - struct brcmf_pub *drvr = ifp->drvr; -- struct ethhdr *eh = (struct ethhdr *)(skb->data); -+ struct ethhdr *eh; - - brcmf_dbg(DATA, "Enter, idx=%d\n", ifp->bssidx); - -@@ -232,22 +232,13 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - goto done; - } - -- /* Make sure there's enough room for any header */ -- if (skb_headroom(skb) < drvr->hdrlen) { -- struct sk_buff *skb2; -- -- brcmf_dbg(INFO, "%s: insufficient headroom\n", -+ /* Make sure there's enough writable headroom*/ -+ ret = skb_cow_head(skb, drvr->hdrlen); -+ if (ret < 0) { -+ brcmf_err("%s: skb_cow_head failed\n", - brcmf_ifname(drvr, ifp->bssidx)); -- drvr->bus_if->tx_realloc++; -- skb2 = skb_realloc_headroom(skb, drvr->hdrlen); - dev_kfree_skb(skb); -- skb = skb2; -- if (skb == NULL) { -- brcmf_err("%s: skb_realloc_headroom failed\n", -- brcmf_ifname(drvr, ifp->bssidx)); -- ret = -ENOMEM; -- goto done; -- } -+ goto done; - } - - /* validate length for ether packet */ -@@ -257,6 +248,8 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, - goto done; - } - -+ eh = (struct ethhdr *)(skb->data); -+ - if (eh->h_proto == htons(ETH_P_PAE)) - atomic_inc(&ifp->pend_8021x_cnt); - -@@ -310,15 +303,9 @@ void brcmf_txflowblock(struct device *dev, bool state) - - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb) - { -- skb->dev = ifp->ndev; -- skb->protocol = eth_type_trans(skb, skb->dev); -- - if (skb->pkt_type == PACKET_MULTICAST) - ifp->stats.multicast++; - -- /* Process special event packets */ -- brcmf_fweh_process_skb(ifp->drvr, skb); -- - if (!(ifp->ndev->flags & IFF_UP)) { - brcmu_pkt_buf_free_skb(skb); - return; -@@ -533,7 +520,7 @@ netif_rx: - } - } - --void brcmf_rx_frame(struct device *dev, struct sk_buff *skb) -+void brcmf_rx_frame(struct device *dev, struct sk_buff *skb, bool handle_event) - { - struct brcmf_if *ifp; - struct brcmf_bus *bus_if = dev_get_drvdata(dev); -@@ -553,11 +540,44 @@ void brcmf_rx_frame(struct device *dev, struct sk_buff *skb) - return; - } - -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ - rd = (struct brcmf_skb_reorder_data *)skb->cb; -- if (rd->reorder) -+ if (rd->reorder) { - brcmf_rxreorder_process_info(ifp, rd->reorder, skb); -- else -+ } else { -+ /* Process special event packets */ -+ if (handle_event) -+ brcmf_fweh_process_skb(ifp->drvr, skb, -+ BCMILCP_SUBTYPE_VENDOR_LONG); -+ - brcmf_netif_rx(ifp, skb); -+ } -+} -+ -+void brcmf_rx_event(struct device *dev, struct sk_buff *skb) -+{ -+ struct brcmf_if *ifp; -+ struct brcmf_bus *bus_if = dev_get_drvdata(dev); -+ struct brcmf_pub *drvr = bus_if->drvr; -+ int ret; -+ -+ brcmf_dbg(EVENT, "Enter: %s: rxp=%p\n", dev_name(dev), skb); -+ -+ /* process and remove protocol-specific header */ -+ ret = brcmf_proto_hdrpull(drvr, true, skb, &ifp); -+ -+ if (ret || !ifp || !ifp->ndev) { -+ if (ret != -ENODATA && ifp) -+ ifp->stats.rx_errors++; -+ brcmu_pkt_buf_free_skb(skb); -+ return; -+ } -+ -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ -+ brcmf_fweh_process_skb(ifp->drvr, skb, 0); -+ brcmu_pkt_buf_free_skb(skb); - } - - void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success) -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -index 3878b6f6..f9aa3703 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c -@@ -25,50 +25,6 @@ - #include "fweh.h" - #include "fwil.h" - --/** -- * struct brcm_ethhdr - broadcom specific ether header. -- * -- * @subtype: subtype for this packet. -- * @length: TODO: length of appended data. -- * @version: version indication. -- * @oui: OUI of this packet. -- * @usr_subtype: subtype for this OUI. -- */ --struct brcm_ethhdr { -- __be16 subtype; -- __be16 length; -- u8 version; -- u8 oui[3]; -- __be16 usr_subtype; --} __packed; -- --struct brcmf_event_msg_be { -- __be16 version; -- __be16 flags; -- __be32 event_type; -- __be32 status; -- __be32 reason; -- __be32 auth_type; -- __be32 datalen; -- u8 addr[ETH_ALEN]; -- char ifname[IFNAMSIZ]; -- u8 ifidx; -- u8 bsscfgidx; --} __packed; -- --/** -- * struct brcmf_event - contents of broadcom event packet. -- * -- * @eth: standard ether header. -- * @hdr: broadcom specific ether header. -- * @msg: common part of the actual event message. -- */ --struct brcmf_event { -- struct ethhdr eth; -- struct brcm_ethhdr hdr; -- struct brcmf_event_msg_be msg; --} __packed; -- - /** - * struct brcmf_fweh_queue_item - event item on event queue. - * -@@ -85,6 +41,7 @@ struct brcmf_fweh_queue_item { - u8 ifidx; - u8 ifaddr[ETH_ALEN]; - struct brcmf_event_msg_be emsg; -+ u32 datalen; - u8 data[0]; - }; - -@@ -294,6 +251,11 @@ static void brcmf_fweh_event_worker(struct work_struct *work) - brcmf_dbg_hex_dump(BRCMF_EVENT_ON(), event->data, - min_t(u32, emsg.datalen, 64), - "event payload, len=%d\n", emsg.datalen); -+ if (emsg.datalen > event->datalen) { -+ brcmf_err("event invalid length header=%d, msg=%d\n", -+ event->datalen, emsg.datalen); -+ goto event_free; -+ } - - /* special handling of interface event */ - if (event->code == BRCMF_E_IF) { -@@ -439,7 +401,8 @@ int brcmf_fweh_activate_events(struct brcmf_if *ifp) - * dispatch the event to a registered handler (using worker). - */ - void brcmf_fweh_process_event(struct brcmf_pub *drvr, -- struct brcmf_event *event_packet) -+ struct brcmf_event *event_packet, -+ u32 packet_len) - { - enum brcmf_fweh_event_code code; - struct brcmf_fweh_info *fweh = &drvr->fweh; -@@ -459,6 +422,9 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr, - if (code != BRCMF_E_IF && !fweh->evt_handler[code]) - return; - -+ if (datalen > BRCMF_DCMD_MAXLEN) -+ return; -+ - if (in_interrupt()) - alloc_flag = GFP_ATOMIC; - -@@ -472,6 +438,7 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr, - /* use memcpy to get aligned event message */ - memcpy(&event->emsg, &event_packet->msg, sizeof(event->emsg)); - memcpy(event->data, data, datalen); -+ event->datalen = datalen; - memcpy(event->ifaddr, event_packet->eth.h_dest, ETH_ALEN); - - brcmf_fweh_queue_event(fweh, event); -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -index d9a94284..b53db923 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.h -@@ -27,7 +27,6 @@ - struct brcmf_pub; - struct brcmf_if; - struct brcmf_cfg80211_info; --struct brcmf_event; - - /* list of firmware events */ - #define BRCMF_FWEH_EVENT_ENUM_DEFLIST \ -@@ -180,11 +179,53 @@ enum brcmf_fweh_event_code { - /** - * definitions for event packet validation. - */ --#define BRCMF_EVENT_OUI_OFFSET 19 --#define BRCM_OUI "\x00\x10\x18" --#define DOT11_OUI_LEN 3 --#define BCMILCP_BCM_SUBTYPE_EVENT 1 -+#define BRCM_OUI "\x00\x10\x18" -+#define BCMILCP_BCM_SUBTYPE_EVENT 1 -+#define BCMILCP_SUBTYPE_VENDOR_LONG 32769 - -+/** -+ * struct brcm_ethhdr - broadcom specific ether header. -+ * -+ * @subtype: subtype for this packet. -+ * @length: TODO: length of appended data. -+ * @version: version indication. -+ * @oui: OUI of this packet. -+ * @usr_subtype: subtype for this OUI. -+ */ -+struct brcm_ethhdr { -+ __be16 subtype; -+ __be16 length; -+ u8 version; -+ u8 oui[3]; -+ __be16 usr_subtype; -+} __packed; -+ -+struct brcmf_event_msg_be { -+ __be16 version; -+ __be16 flags; -+ __be32 event_type; -+ __be32 status; -+ __be32 reason; -+ __be32 auth_type; -+ __be32 datalen; -+ u8 addr[ETH_ALEN]; -+ char ifname[IFNAMSIZ]; -+ u8 ifidx; -+ u8 bsscfgidx; -+} __packed; -+ -+/** -+ * struct brcmf_event - contents of broadcom event packet. -+ * -+ * @eth: standard ether header. -+ * @hdr: broadcom specific ether header. -+ * @msg: common part of the actual event message. -+ */ -+struct brcmf_event { -+ struct ethhdr eth; -+ struct brcm_ethhdr hdr; -+ struct brcmf_event_msg_be msg; -+} __packed; - - /** - * struct brcmf_event_msg - firmware event message. -@@ -256,34 +297,43 @@ void brcmf_fweh_unregister(struct brcmf_pub *drvr, - enum brcmf_fweh_event_code code); - int brcmf_fweh_activate_events(struct brcmf_if *ifp); - void brcmf_fweh_process_event(struct brcmf_pub *drvr, -- struct brcmf_event *event_packet); -+ struct brcmf_event *event_packet, -+ u32 packet_len); - void brcmf_fweh_p2pdev_setup(struct brcmf_if *ifp, bool ongoing); - - static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr, -- struct sk_buff *skb) -+ struct sk_buff *skb, u16 stype) - { - struct brcmf_event *event_packet; -- u8 *data; -- u16 usr_stype; -+ u16 subtype, usr_stype; - - /* only process events when protocol matches */ - if (skb->protocol != cpu_to_be16(ETH_P_LINK_CTL)) - return; - -- /* check for BRCM oui match */ -+ if ((skb->len + ETH_HLEN) < sizeof(*event_packet)) -+ return; -+ - event_packet = (struct brcmf_event *)skb_mac_header(skb); -- data = (u8 *)event_packet; -- data += BRCMF_EVENT_OUI_OFFSET; -- if (memcmp(BRCM_OUI, data, DOT11_OUI_LEN)) -+ -+ /* check subtype if needed */ -+ if (unlikely(stype)) { -+ subtype = get_unaligned_be16(&event_packet->hdr.subtype); -+ if (subtype != stype) -+ return; -+ } -+ -+ /* check for BRCM oui match */ -+ if (memcmp(BRCM_OUI, &event_packet->hdr.oui[0], -+ sizeof(event_packet->hdr.oui))) - return; - - /* final match on usr_subtype */ -- data += DOT11_OUI_LEN; -- usr_stype = get_unaligned_be16(data); -+ usr_stype = get_unaligned_be16(&event_packet->hdr.usr_subtype); - if (usr_stype != BCMILCP_BCM_SUBTYPE_EVENT) - return; - -- brcmf_fweh_process_event(drvr, event_packet); -+ brcmf_fweh_process_event(drvr, event_packet, skb->len + ETH_HLEN); - } - - #endif /* FWEH_H_ */ -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -index daa427b4..4320c4ca 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h -@@ -45,6 +45,11 @@ - #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff - #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 - -+/* scan type definitions */ -+#define BRCMF_SCANTYPE_DEFAULT 0xFF -+#define BRCMF_SCANTYPE_ACTIVE 0 -+#define BRCMF_SCANTYPE_PASSIVE 1 -+ - /* primary (ie tx) key */ - #define BRCMF_PRIMARY_KEY (1 << 1) - #define DOT11_BSSTYPE_ANY 2 -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -index 44e618f9..6f7138ce 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c -@@ -20,6 +20,7 @@ - - #include - #include -+#include - - #include - #include -@@ -1076,28 +1077,13 @@ static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf) - } - - --static void --brcmf_msgbuf_rx_skb(struct brcmf_msgbuf *msgbuf, struct sk_buff *skb, -- u8 ifidx) --{ -- struct brcmf_if *ifp; -- -- ifp = brcmf_get_ifp(msgbuf->drvr, ifidx); -- if (!ifp || !ifp->ndev) { -- brcmf_err("Received pkt for invalid ifidx %d\n", ifidx); -- brcmu_pkt_buf_free_skb(skb); -- return; -- } -- brcmf_netif_rx(ifp, skb); --} -- -- - static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf) - { - struct msgbuf_rx_event *event; - u32 idx; - u16 buflen; - struct sk_buff *skb; -+ struct brcmf_if *ifp; - - event = (struct msgbuf_rx_event *)buf; - idx = le32_to_cpu(event->msg.request_id); -@@ -1117,7 +1103,19 @@ static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf) - - skb_trim(skb, buflen); - -- brcmf_msgbuf_rx_skb(msgbuf, skb, event->msg.ifidx); -+ ifp = brcmf_get_ifp(msgbuf->drvr, event->msg.ifidx); -+ if (!ifp || !ifp->ndev) { -+ brcmf_err("Received pkt for invalid ifidx %d\n", -+ event->msg.ifidx); -+ goto exit; -+ } -+ -+ skb->protocol = eth_type_trans(skb, ifp->ndev); -+ -+ brcmf_fweh_process_skb(ifp->drvr, skb, 0); -+ -+exit: -+ brcmu_pkt_buf_free_skb(skb); - } - - -@@ -1129,6 +1127,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - u16 data_offset; - u16 buflen; - u32 idx; -+ struct brcmf_if *ifp; - - brcmf_msgbuf_update_rxbufpost_count(msgbuf, 1); - -@@ -1149,7 +1148,14 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - - skb_trim(skb, buflen); - -- brcmf_msgbuf_rx_skb(msgbuf, skb, rx_complete->msg.ifidx); -+ ifp = brcmf_get_ifp(msgbuf->drvr, rx_complete->msg.ifidx); -+ if (!ifp || !ifp->ndev) { -+ brcmf_err("Received pkt for invalid ifidx %d\n", -+ rx_complete->msg.ifidx); -+ brcmu_pkt_buf_free_skb(skb); -+ return; -+ } -+ brcmf_netif_rx(ifp, skb); - } - - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -index d224b3dd..e6c8b0d5 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c -@@ -461,25 +461,23 @@ static int brcmf_p2p_set_firmware(struct brcmf_if *ifp, u8 *p2p_mac) - * @dev_addr: optional device address. - * - * P2P needs mac addresses for P2P device and interface. If no device -- * address it specified, these are derived from the primary net device, ie. -- * the permanent ethernet address of the device. -+ * address it specified, these are derived from a random ethernet -+ * address. - */ - static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr) - { -- struct brcmf_if *pri_ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; -- bool local_admin = false; -+ bool random_addr = false; - -- if (!dev_addr || is_zero_ether_addr(dev_addr)) { -- dev_addr = pri_ifp->mac_addr; -- local_admin = true; -- } -+ if (!dev_addr || is_zero_ether_addr(dev_addr)) -+ random_addr = true; - -- /* Generate the P2P Device Address. This consists of the device's -- * primary MAC address with the locally administered bit set. -+ /* Generate the P2P Device Address obtaining a random ethernet -+ * address with the locally administered bit set. - */ -- memcpy(p2p->dev_addr, dev_addr, ETH_ALEN); -- if (local_admin) -- p2p->dev_addr[0] |= 0x02; -+ if (random_addr) -+ eth_random_addr(p2p->dev_addr); -+ else -+ memcpy(p2p->dev_addr, dev_addr, ETH_ALEN); - - /* Generate the P2P Interface Address. If the discovery and connection - * BSSCFGs need to simultaneously co-exist, then this address must be -@@ -1367,6 +1365,11 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, - u16 mgmt_type; - u8 action; - -+ if (e->datalen < sizeof(*rxframe)) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - ch.chspec = be16_to_cpu(rxframe->chanspec); - cfg->d11inf.decchspec(&ch); - /* Check if wpa_supplicant has registered for this frame */ -@@ -1864,6 +1867,11 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp, - brcmf_dbg(INFO, "Enter: event %d reason %d\n", e->event_code, - e->reason); - -+ if (e->datalen < sizeof(*rxframe)) { -+ brcmf_dbg(SCAN, "Event data to small. Ignore\n"); -+ return 0; -+ } -+ - ch.chspec = be16_to_cpu(rxframe->chanspec); - cfg->d11inf.decchspec(&ch); - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -index bcf29bf6..9954e641 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -@@ -1394,6 +1394,17 @@ static inline u8 brcmf_sdio_getdatoffset(u8 *swheader) - return (u8)((hdrvalue & SDPCM_DOFFSET_MASK) >> SDPCM_DOFFSET_SHIFT); - } - -+static inline bool brcmf_sdio_fromevntchan(u8 *swheader) -+{ -+ u32 hdrvalue; -+ u8 ret; -+ -+ hdrvalue = *(u32 *)swheader; -+ ret = (u8)((hdrvalue & SDPCM_CHANNEL_MASK) >> SDPCM_CHANNEL_SHIFT); -+ -+ return (ret == SDPCM_EVENT_CHANNEL); -+} -+ - static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, - struct brcmf_sdio_hdrinfo *rd, - enum brcmf_sdio_frmtype type) -@@ -1754,7 +1765,11 @@ static u8 brcmf_sdio_rxglom(struct brcmf_sdio *bus, u8 rxseq) - pfirst->len, pfirst->next, - pfirst->prev); - skb_unlink(pfirst, &bus->glom); -- brcmf_rx_frame(bus->sdiodev->dev, pfirst); -+ if (brcmf_sdio_fromevntchan(&dptr[SDPCM_HWHDR_LEN])) -+ brcmf_rx_event(bus->sdiodev->dev, pfirst); -+ else -+ brcmf_rx_frame(bus->sdiodev->dev, pfirst, -+ false); - bus->sdcnt.rxglompkts++; - } - -@@ -2081,18 +2096,19 @@ static uint brcmf_sdio_readframes(struct brcmf_sdio *bus, uint maxframes) - __skb_trim(pkt, rd->len); - skb_pull(pkt, rd->dat_offset); - -+ if (pkt->len == 0) -+ brcmu_pkt_buf_free_skb(pkt); -+ else if (rd->channel == SDPCM_EVENT_CHANNEL) -+ brcmf_rx_event(bus->sdiodev->dev, pkt); -+ else -+ brcmf_rx_frame(bus->sdiodev->dev, pkt, -+ false); -+ - /* prepare the descriptor for the next read */ - rd->len = rd->len_nxtfrm << 4; - rd->len_nxtfrm = 0; - /* treat all packet as event if we don't know */ - rd->channel = SDPCM_EVENT_CHANNEL; -- -- if (pkt->len == 0) { -- brcmu_pkt_buf_free_skb(pkt); -- continue; -- } -- -- brcmf_rx_frame(bus->sdiodev->dev, pkt); - } - - rxcount = maxframes - rxleft; -@@ -3401,6 +3417,10 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus, - goto err; - } - -+ /* Allow full data communication using DPC from now on. */ -+ brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA); -+ bcmerror = 0; -+ - err: - brcmf_sdio_clkctl(bus, CLK_SDONLY, false); - sdio_release_host(bus->sdiodev->func[1]); -@@ -4108,9 +4128,6 @@ static void brcmf_sdio_firmware_callback(struct device *dev, - } - - if (err == 0) { -- /* Allow full data communication using DPC from now on. */ -- brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA); -- - err = brcmf_sdiod_intr_register(sdiodev); - if (err != 0) - brcmf_err("intr register failed:%d\n", err); -@@ -4290,6 +4307,13 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus) - brcmf_dbg(TRACE, "Enter\n"); - - if (bus) { -+ /* Stop watchdog task */ -+ if (bus->watchdog_tsk) { -+ send_sig(SIGTERM, bus->watchdog_tsk, 1); -+ kthread_stop(bus->watchdog_tsk); -+ bus->watchdog_tsk = NULL; -+ } -+ - /* De-register interrupt handler */ - brcmf_sdiod_intr_unregister(bus->sdiodev); - -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c -index 689e64d0..3002268e 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c -@@ -144,7 +144,7 @@ struct brcmf_usbdev_info { - - struct usb_device *usbdev; - struct device *dev; -- struct mutex dev_init_lock; -+ struct completion dev_init_done; - - int ctl_in_pipe, ctl_out_pipe; - struct urb *ctl_urb; /* URB for control endpoint */ -@@ -502,7 +502,7 @@ static void brcmf_usb_rx_complete(struct urb *urb) - - if (devinfo->bus_pub.state == BRCMFMAC_USB_STATE_UP) { - skb_put(skb, urb->actual_length); -- brcmf_rx_frame(devinfo->dev, skb); -+ brcmf_rx_frame(devinfo->dev, skb, true); - brcmf_usb_rx_refill(devinfo, req); - } else { - brcmu_pkt_buf_free_skb(skb); -@@ -669,12 +669,18 @@ static int brcmf_usb_up(struct device *dev) - - static void brcmf_cancel_all_urbs(struct brcmf_usbdev_info *devinfo) - { -+ int i; -+ - if (devinfo->ctl_urb) - usb_kill_urb(devinfo->ctl_urb); - if (devinfo->bulk_urb) - usb_kill_urb(devinfo->bulk_urb); -- brcmf_usb_free_q(&devinfo->tx_postq, true); -- brcmf_usb_free_q(&devinfo->rx_postq, true); -+ if (devinfo->tx_reqs) -+ for (i = 0; i < devinfo->bus_pub.ntxq; i++) -+ usb_kill_urb(devinfo->tx_reqs[i].urb); -+ if (devinfo->rx_reqs) -+ for (i = 0; i < devinfo->bus_pub.nrxq; i++) -+ usb_kill_urb(devinfo->rx_reqs[i].urb); - } - - static void brcmf_usb_down(struct device *dev) -@@ -1226,11 +1232,11 @@ static void brcmf_usb_probe_phase2(struct device *dev, - if (ret) - goto error; - -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - return; - error: - brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), ret); -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - device_release_driver(dev); - } - -@@ -1268,7 +1274,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) - if (ret) - goto fail; - /* we are done */ -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - return 0; - } - bus->chip = bus_pub->devid; -@@ -1322,11 +1328,10 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) - - devinfo->usbdev = usb; - devinfo->dev = &usb->dev; -- /* Take an init lock, to protect for disconnect while still loading. -+ /* Init completion, to protect for disconnect while still loading. - * Necessary because of the asynchronous firmware load construction - */ -- mutex_init(&devinfo->dev_init_lock); -- mutex_lock(&devinfo->dev_init_lock); -+ init_completion(&devinfo->dev_init_done); - - usb_set_intfdata(intf, devinfo); - -@@ -1402,7 +1407,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) - return 0; - - fail: -- mutex_unlock(&devinfo->dev_init_lock); -+ complete(&devinfo->dev_init_done); - kfree(devinfo); - usb_set_intfdata(intf, NULL); - return ret; -@@ -1417,7 +1422,7 @@ brcmf_usb_disconnect(struct usb_interface *intf) - devinfo = (struct brcmf_usbdev_info *)usb_get_intfdata(intf); - - if (devinfo) { -- mutex_lock(&devinfo->dev_init_lock); -+ wait_for_completion(&devinfo->dev_init_done); - /* Make sure that devinfo still exists. Firmware probe routines - * may have released the device and cleared the intfdata. - */ -diff --git a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -index 8eff2753..d493021f 100644 ---- a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -+++ b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c -@@ -35,9 +35,10 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, - struct brcmf_if *ifp; - const struct brcmf_vndr_dcmd_hdr *cmdhdr = data; - struct sk_buff *reply; -- int ret, payload, ret_len; -+ unsigned int payload, ret_len; - void *dcmd_buf = NULL, *wr_pointer; - u16 msglen, maxmsglen = PAGE_SIZE - 0x100; -+ int ret; - - if (len < sizeof(*cmdhdr)) { - brcmf_err("vendor command too short: %d\n", len); -@@ -65,7 +66,7 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy, - brcmf_err("oversize return buffer %d\n", ret_len); - ret_len = BRCMF_DCMD_MAXLEN; - } -- payload = max(ret_len, len) + 1; -+ payload = max_t(unsigned int, ret_len, len) + 1; - dcmd_buf = vzalloc(payload); - if (NULL == dcmd_buf) - return -ENOMEM; -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -index bec2dc1c..61ae2768 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -@@ -818,13 +818,15 @@ brcms_ops_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - static int - brcms_ops_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct brcms_info *wl = hw->priv; - struct scb *scb = &wl->wlc->pri_scb; - int status; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u8 buf_size = params->buf_size; - - if (WARN_ON(scb->magic != SCB_MAGIC)) - return -EIDRM; -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -index 99dac9b8..c75bfd3f 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c -@@ -14764,8 +14764,8 @@ static void wlc_phy_ipa_restore_tx_digi_filts_nphy(struct brcms_phy *pi) - } - - static void --wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, u8 *events, u8 *dlys, -- u8 len) -+wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, const u8 *events, -+ const u8 *dlys, u8 len) - { - u32 t1_offset, t2_offset; - u8 ctr; -@@ -15240,16 +15240,16 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev5(struct brcms_phy *pi) - static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - { - u16 currband; -- s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 }; -- s8 *lna1_gain_db = NULL; -- s8 *lna1_gain_db_2 = NULL; -- s8 *lna2_gain_db = NULL; -- s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 }; -- s8 *tia_gain_db; -- s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 }; -- s8 *tia_gainbits; -- u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f }; -- u16 *rfseq_init_gain; -+ static const s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 }; -+ const s8 *lna1_gain_db = NULL; -+ const s8 *lna1_gain_db_2 = NULL; -+ const s8 *lna2_gain_db = NULL; -+ static const s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 }; -+ const s8 *tia_gain_db; -+ static const s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 }; -+ const s8 *tia_gainbits; -+ static const u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f }; -+ const u16 *rfseq_init_gain; - u16 init_gaincode; - u16 clip1hi_gaincode; - u16 clip1md_gaincode = 0; -@@ -15310,10 +15310,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - - if ((freq <= 5080) || (freq == 5825)) { - -- s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 11, 17, 22, 25}; -- s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; -+ static const s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 11, 17, 22, 25}; -+ static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; - - crsminu_th = 0x3e; - lna1_gain_db = lna1A_gain_db_rev7; -@@ -15321,10 +15320,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - lna2_gain_db = lna2A_gain_db_rev7; - } else if ((freq >= 5500) && (freq <= 5700)) { - -- s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 12, 18, 22, 26}; -- s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 }; -+ static const s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26}; -+ static const s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 }; - - crsminu_th = 0x45; - clip1md_gaincode_B = 0x14; -@@ -15335,10 +15333,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi) - lna2_gain_db = lna2A_gain_db_rev7; - } else { - -- s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 }; -- s8 lna1A_gain_db_2_rev7[] = { -- 12, 18, 22, 26}; -- s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; -+ static const s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 }; -+ static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26}; -+ static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 }; - - crsminu_th = 0x41; - lna1_gain_db = lna1A_gain_db_rev7; -@@ -15450,65 +15447,65 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_CLR_HIQ_DIS, - NPHY_RFSEQ_CMD_SET_HPF_BW - }; -- u8 rfseq_updategainu_dlys[] = { 10, 30, 1 }; -- s8 lna1G_gain_db[] = { 7, 11, 16, 23 }; -- s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 }; -- s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 }; -- s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 }; -- s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 }; -- s8 lna1A_gain_db[] = { 7, 11, 17, 23 }; -- s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 }; -- s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 }; -- s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 }; -- s8 *lna1_gain_db = NULL; -- s8 lna2G_gain_db[] = { -5, 6, 10, 14 }; -- s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 }; -- s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 }; -- s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 }; -- s8 lna2A_gain_db[] = { -6, 2, 6, 10 }; -- s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 }; -- s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 }; -- s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 }; -- s8 *lna2_gain_db = NULL; -- s8 tiaG_gain_db[] = { -+ static const u8 rfseq_updategainu_dlys[] = { 10, 30, 1 }; -+ static const s8 lna1G_gain_db[] = { 7, 11, 16, 23 }; -+ static const s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 }; -+ static const s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 }; -+ static const s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 }; -+ static const s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 }; -+ static const s8 lna1A_gain_db[] = { 7, 11, 17, 23 }; -+ static const s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 }; -+ static const s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 }; -+ static const s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 }; -+ const s8 *lna1_gain_db = NULL; -+ static const s8 lna2G_gain_db[] = { -5, 6, 10, 14 }; -+ static const s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 }; -+ static const s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 }; -+ static const s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 }; -+ static const s8 lna2A_gain_db[] = { -6, 2, 6, 10 }; -+ static const s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 }; -+ static const s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 }; -+ static const s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 }; -+ const s8 *lna2_gain_db = NULL; -+ static const s8 tiaG_gain_db[] = { - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A }; -- s8 tiaA_gain_db[] = { -+ static const s8 tiaA_gain_db[] = { - 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 }; -- s8 tiaA_gain_db_rev4[] = { -+ static const s8 tiaA_gain_db_rev4[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 tiaA_gain_db_rev5[] = { -+ static const s8 tiaA_gain_db_rev5[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 tiaA_gain_db_rev6[] = { -+ static const s8 tiaA_gain_db_rev6[] = { - 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d }; -- s8 *tia_gain_db; -- s8 tiaG_gainbits[] = { -+ const s8 *tia_gain_db; -+ static const s8 tiaG_gainbits[] = { - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 }; -- s8 tiaA_gainbits[] = { -+ static const s8 tiaA_gainbits[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 }; -- s8 tiaA_gainbits_rev4[] = { -+ static const s8 tiaA_gainbits_rev4[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 tiaA_gainbits_rev5[] = { -+ static const s8 tiaA_gainbits_rev5[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 tiaA_gainbits_rev6[] = { -+ static const s8 tiaA_gainbits_rev6[] = { - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }; -- s8 *tia_gainbits; -- s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 }; -- s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 }; -- u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f }; -- u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f }; -- u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f }; -- u16 rfseqG_init_gain_rev5_elna[] = { -+ const s8 *tia_gainbits; -+ static const s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 }; -+ static const s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 }; -+ static const u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f }; -+ static const u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f }; -+ static const u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f }; -+ static const u16 rfseqG_init_gain_rev5_elna[] = { - 0x013f, 0x013f, 0x013f, 0x013f }; -- u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f }; -- u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f }; -- u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f }; -- u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f }; -- u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f }; -- u16 rfseqA_init_gain_rev4_elna[] = { -+ static const u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f }; -+ static const u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f }; -+ static const u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f }; -+ static const u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f }; -+ static const u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f }; -+ static const u16 rfseqA_init_gain_rev4_elna[] = { - 0x314f, 0x314f, 0x314f, 0x314f }; -- u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f }; -- u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f }; -- u16 *rfseq_init_gain; -+ static const u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f }; -+ static const u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f }; -+ const u16 *rfseq_init_gain; - u16 initG_gaincode = 0x627e; - u16 initG_gaincode_rev4 = 0x527e; - u16 initG_gaincode_rev5 = 0x427e; -@@ -15538,10 +15535,10 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - u16 clip1mdA_gaincode_rev6 = 0x2084; - u16 clip1md_gaincode = 0; - u16 clip1loG_gaincode = 0x0074; -- u16 clip1loG_gaincode_rev5[] = { -+ static const u16 clip1loG_gaincode_rev5[] = { - 0x0062, 0x0064, 0x006a, 0x106a, 0x106c, 0x1074, 0x107c, 0x207c - }; -- u16 clip1loG_gaincode_rev6[] = { -+ static const u16 clip1loG_gaincode_rev6[] = { - 0x106a, 0x106c, 0x1074, 0x107c, 0x007e, 0x107e, 0x207e, 0x307e - }; - u16 clip1loG_gaincode_rev6_224B0 = 0x1074; -@@ -16066,7 +16063,7 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi) - - static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - { -- u8 rfseq_rx2tx_events[] = { -+ static const u8 rfseq_rx2tx_events[] = { - NPHY_RFSEQ_CMD_NOP, - NPHY_RFSEQ_CMD_RXG_FBW, - NPHY_RFSEQ_CMD_TR_SWITCH, -@@ -16076,7 +16073,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_EXT_PA - }; - u8 rfseq_rx2tx_dlys[] = { 8, 6, 6, 2, 4, 60, 1 }; -- u8 rfseq_tx2rx_events[] = { -+ static const u8 rfseq_tx2rx_events[] = { - NPHY_RFSEQ_CMD_NOP, - NPHY_RFSEQ_CMD_EXT_PA, - NPHY_RFSEQ_CMD_TX_GAIN, -@@ -16085,8 +16082,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_RFSEQ_CMD_RXG_FBW, - NPHY_RFSEQ_CMD_CLR_HIQ_DIS - }; -- u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 }; -- u8 rfseq_tx2rx_events_rev3[] = { -+ static const u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 }; -+ static const u8 rfseq_tx2rx_events_rev3[] = { - NPHY_REV3_RFSEQ_CMD_EXT_PA, - NPHY_REV3_RFSEQ_CMD_INT_PA_PU, - NPHY_REV3_RFSEQ_CMD_TX_GAIN, -@@ -16096,7 +16093,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_REV3_RFSEQ_CMD_CLR_HIQ_DIS, - NPHY_REV3_RFSEQ_CMD_END - }; -- u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 }; -+ static const u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 }; - u8 rfseq_rx2tx_events_rev3[] = { - NPHY_REV3_RFSEQ_CMD_NOP, - NPHY_REV3_RFSEQ_CMD_RXG_FBW, -@@ -16110,7 +16107,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - }; - u8 rfseq_rx2tx_dlys_rev3[] = { 8, 6, 6, 4, 4, 18, 42, 1, 1 }; - -- u8 rfseq_rx2tx_events_rev3_ipa[] = { -+ static const u8 rfseq_rx2tx_events_rev3_ipa[] = { - NPHY_REV3_RFSEQ_CMD_NOP, - NPHY_REV3_RFSEQ_CMD_RXG_FBW, - NPHY_REV3_RFSEQ_CMD_TR_SWITCH, -@@ -16121,15 +16118,15 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - NPHY_REV3_RFSEQ_CMD_INT_PA_PU, - NPHY_REV3_RFSEQ_CMD_END - }; -- u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 }; -- u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f }; -+ static const u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 }; -+ static const u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f }; - - s16 alpha0, alpha1, alpha2; - s16 beta0, beta1, beta2; - u32 leg_data_weights, ht_data_weights, nss1_data_weights, - stbc_data_weights; - u8 chan_freq_range = 0; -- u16 dac_control = 0x0002; -+ static const u16 dac_control = 0x0002; - u16 aux_adc_vmid_rev7_core0[] = { 0x8e, 0x96, 0x96, 0x96 }; - u16 aux_adc_vmid_rev7_core1[] = { 0x8f, 0x9f, 0x9f, 0x96 }; - u16 aux_adc_vmid_rev4[] = { 0xa2, 0xb4, 0xb4, 0x89 }; -@@ -16139,8 +16136,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - u16 aux_adc_gain_rev4[] = { 0x02, 0x02, 0x02, 0x00 }; - u16 aux_adc_gain_rev3[] = { 0x02, 0x02, 0x02, 0x00 }; - u16 *aux_adc_gain; -- u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 }; -- u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 }; -+ static const u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 }; -+ static const u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 }; - s32 min_nvar_val = 0x18d; - s32 min_nvar_offset_6mbps = 20; - u8 pdetrange; -@@ -16151,9 +16148,9 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi) - u16 rfseq_rx2tx_lpf_h_hpc_rev7 = 0x77; - u16 rfseq_tx2rx_lpf_h_hpc_rev7 = 0x77; - u16 rfseq_pktgn_lpf_h_hpc_rev7 = 0x77; -- u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 }; -- u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -- u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -+ static const u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 }; -+ static const u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; -+ static const u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 }; - u16 ipalvlshift_3p3_war_en = 0; - u16 rccal_bcap_val, rccal_scap_val; - u16 rccal_tx20_11b_bcap = 0; -@@ -24291,13 +24288,13 @@ static void wlc_phy_update_txcal_ladder_nphy(struct brcms_phy *pi, u16 core) - u16 bbmult; - u16 tblentry; - -- struct nphy_txiqcal_ladder ladder_lo[] = { -+ static const struct nphy_txiqcal_ladder ladder_lo[] = { - {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0}, - {25, 0}, {25, 1}, {25, 2}, {25, 3}, {25, 4}, {25, 5}, - {25, 6}, {25, 7}, {35, 7}, {50, 7}, {71, 7}, {100, 7} - }; - -- struct nphy_txiqcal_ladder ladder_iq[] = { -+ static const struct nphy_txiqcal_ladder ladder_iq[] = { - {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0}, - {25, 0}, {35, 0}, {50, 0}, {71, 0}, {100, 0}, {100, 1}, - {100, 2}, {100, 3}, {100, 4}, {100, 5}, {100, 6}, {100, 7} -@@ -25773,67 +25770,67 @@ wlc_phy_cal_txiqlo_nphy(struct brcms_phy *pi, struct nphy_txgains target_gain, - u16 cal_gain[2]; - struct nphy_iqcal_params cal_params[2]; - u32 tbl_len; -- void *tbl_ptr; -+ const void *tbl_ptr; - bool ladder_updated[2]; - u8 mphase_cal_lastphase = 0; - int bcmerror = 0; - bool phyhang_avoid_state = false; - -- u16 tbl_tx_iqlo_cal_loft_ladder_20[] = { -+ static const u16 tbl_tx_iqlo_cal_loft_ladder_20[] = { - 0x0300, 0x0500, 0x0700, 0x0900, 0x0d00, 0x1100, 0x1900, 0x1901, - 0x1902, - 0x1903, 0x1904, 0x1905, 0x1906, 0x1907, 0x2407, 0x3207, 0x4607, - 0x6407 - }; - -- u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = { -+ static const u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = { - 0x0200, 0x0300, 0x0600, 0x0900, 0x0d00, 0x1100, 0x1900, 0x2400, - 0x3200, - 0x4600, 0x6400, 0x6401, 0x6402, 0x6403, 0x6404, 0x6405, 0x6406, - 0x6407 - }; - -- u16 tbl_tx_iqlo_cal_loft_ladder_40[] = { -+ static const u16 tbl_tx_iqlo_cal_loft_ladder_40[] = { - 0x0200, 0x0300, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1201, - 0x1202, - 0x1203, 0x1204, 0x1205, 0x1206, 0x1207, 0x1907, 0x2307, 0x3207, - 0x4707 - }; - -- u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = { -+ static const u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = { - 0x0100, 0x0200, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1900, - 0x2300, - 0x3200, 0x4700, 0x4701, 0x4702, 0x4703, 0x4704, 0x4705, 0x4706, - 0x4707 - }; - -- u16 tbl_tx_iqlo_cal_startcoefs[] = { -+ static const u16 tbl_tx_iqlo_cal_startcoefs[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000 - }; - -- u16 tbl_tx_iqlo_cal_cmds_fullcal[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_fullcal[] = { - 0x8123, 0x8264, 0x8086, 0x8245, 0x8056, - 0x9123, 0x9264, 0x9086, 0x9245, 0x9056 - }; - -- u16 tbl_tx_iqlo_cal_cmds_recal[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_recal[] = { - 0x8101, 0x8253, 0x8053, 0x8234, 0x8034, - 0x9101, 0x9253, 0x9053, 0x9234, 0x9034 - }; - -- u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000 - }; - -- u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = { - 0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234, - 0x9434, 0x9334, 0x9084, 0x9267, 0x9056, 0x9234 - }; - -- u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = { -+ static const u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = { - 0x8423, 0x8323, 0x8073, 0x8256, 0x8045, 0x8223, - 0x9423, 0x9323, 0x9073, 0x9256, 0x9045, 0x9223 - }; -diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c -index a7400836..63f95e9c 100644 ---- a/drivers/net/wireless/cw1200/cw1200_spi.c -+++ b/drivers/net/wireless/cw1200/cw1200_spi.c -@@ -446,8 +446,7 @@ static int cw1200_spi_disconnect(struct spi_device *func) - return 0; - } - --#ifdef CONFIG_PM --static int cw1200_spi_suspend(struct device *dev) -+static int __maybe_unused cw1200_spi_suspend(struct device *dev) - { - struct hwbus_priv *self = spi_get_drvdata(to_spi_device(dev)); - -@@ -460,16 +459,12 @@ static int cw1200_spi_suspend(struct device *dev) - - static SIMPLE_DEV_PM_OPS(cw1200_pm_ops, cw1200_spi_suspend, NULL); - --#endif -- - static struct spi_driver spi_driver = { - .probe = cw1200_spi_probe, - .remove = cw1200_spi_disconnect, - .driver = { - .name = "cw1200_wlan_spi", --#ifdef CONFIG_PM -- .pm = &cw1200_pm_ops, --#endif -+ .pm = IS_ENABLED(CONFIG_PM) ? &cw1200_pm_ops : NULL, - }, - }; - -diff --git a/drivers/net/wireless/cw1200/main.c b/drivers/net/wireless/cw1200/main.c -index 0e51e27d..317daa96 100644 ---- a/drivers/net/wireless/cw1200/main.c -+++ b/drivers/net/wireless/cw1200/main.c -@@ -345,6 +345,11 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, - mutex_init(&priv->wsm_cmd_mux); - mutex_init(&priv->conf_mutex); - priv->workqueue = create_singlethread_workqueue("cw1200_wq"); -+ if (!priv->workqueue) { -+ ieee80211_free_hw(hw); -+ return NULL; -+ } -+ - sema_init(&priv->scan.lock, 1); - INIT_WORK(&priv->scan.work, cw1200_scan_work); - INIT_DELAYED_WORK(&priv->scan.probe_work, cw1200_probe_work); -diff --git a/drivers/net/wireless/cw1200/pm.h b/drivers/net/wireless/cw1200/pm.h -index 3ed90ff2..53454847 100644 ---- a/drivers/net/wireless/cw1200/pm.h -+++ b/drivers/net/wireless/cw1200/pm.h -@@ -31,13 +31,18 @@ int cw1200_pm_init(struct cw1200_pm_state *pm, - void cw1200_pm_deinit(struct cw1200_pm_state *pm); - int cw1200_wow_suspend(struct ieee80211_hw *hw, - struct cfg80211_wowlan *wowlan); --int cw1200_wow_resume(struct ieee80211_hw *hw); - int cw1200_can_suspend(struct cw1200_common *priv); -+int cw1200_wow_resume(struct ieee80211_hw *hw); - void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, - unsigned long tmo); - #else - static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, -- unsigned long tmo) { -+ unsigned long tmo) -+{ -+} -+static inline int cw1200_can_suspend(struct cw1200_common *priv) -+{ -+ return 0; - } - #endif - #endif -diff --git a/drivers/net/wireless/cw1200/scan.c b/drivers/net/wireless/cw1200/scan.c -index bff81b8d..2ce01936 100644 ---- a/drivers/net/wireless/cw1200/scan.c -+++ b/drivers/net/wireless/cw1200/scan.c -@@ -78,27 +78,30 @@ int cw1200_hw_scan(struct ieee80211_hw *hw, - if (req->n_ssids > WSM_SCAN_MAX_NUM_OF_SSIDS) - return -EINVAL; - -+ /* will be unlocked in cw1200_scan_work() */ -+ down(&priv->scan.lock); -+ mutex_lock(&priv->conf_mutex); -+ - frame.skb = ieee80211_probereq_get(hw, priv->vif->addr, NULL, 0, - req->ie_len); -- if (!frame.skb) -+ if (!frame.skb) { -+ mutex_unlock(&priv->conf_mutex); -+ up(&priv->scan.lock); - return -ENOMEM; -+ } - - if (req->ie_len) - memcpy(skb_put(frame.skb, req->ie_len), req->ie, req->ie_len); - -- /* will be unlocked in cw1200_scan_work() */ -- down(&priv->scan.lock); -- mutex_lock(&priv->conf_mutex); -- - ret = wsm_set_template_frame(priv, &frame); - if (!ret) { - /* Host want to be the probe responder. */ - ret = wsm_set_probe_responder(priv, true); - } - if (ret) { -+ dev_kfree_skb(frame.skb); - mutex_unlock(&priv->conf_mutex); - up(&priv->scan.lock); -- dev_kfree_skb(frame.skb); - return ret; - } - -@@ -120,10 +123,9 @@ int cw1200_hw_scan(struct ieee80211_hw *hw, - ++priv->scan.n_ssids; - } - -- mutex_unlock(&priv->conf_mutex); -- - if (frame.skb) - dev_kfree_skb(frame.skb); -+ mutex_unlock(&priv->conf_mutex); - queue_work(priv->workqueue, &priv->scan.work); - return 0; - } -diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c -index 95a7fdb3..c602a1e6 100644 ---- a/drivers/net/wireless/cw1200/sta.c -+++ b/drivers/net/wireless/cw1200/sta.c -@@ -2135,9 +2135,7 @@ void cw1200_mcast_timeout(unsigned long arg) - - int cw1200_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - /* Aggregation is implemented fully in firmware, - * including block ack negotiation. Do not allow -diff --git a/drivers/net/wireless/cw1200/sta.h b/drivers/net/wireless/cw1200/sta.h -index bebb3379..a0bacaa3 100644 ---- a/drivers/net/wireless/cw1200/sta.h -+++ b/drivers/net/wireless/cw1200/sta.h -@@ -109,9 +109,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev, - u32 changed); - int cw1200_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - - void cw1200_suspend_resume(struct cw1200_common *priv, - struct wsm_suspend_resume *arg); -diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c -index 9e0ca304..5a595f9f 100644 ---- a/drivers/net/wireless/cw1200/wsm.c -+++ b/drivers/net/wireless/cw1200/wsm.c -@@ -379,7 +379,6 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, - { - int ret; - int count; -- int i; - - count = WSM_GET32(buf); - if (WARN_ON(count <= 0)) -@@ -395,11 +394,10 @@ static int wsm_multi_tx_confirm(struct cw1200_common *priv, - } - - cw1200_debug_txed_multi(priv, count); -- for (i = 0; i < count; ++i) { -+ do { - ret = wsm_tx_confirm(priv, buf, link_id); -- if (ret) -- return ret; -- } -+ } while (!ret && --count); -+ - return ret; - - underflow: -@@ -1807,16 +1805,18 @@ static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size) - { - size_t pos = buf->data - buf->begin; - size_t size = pos + extra_size; -+ u8 *tmp; - - size = round_up(size, FWLOAD_BLOCK_SIZE); - -- buf->begin = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); -- if (buf->begin) { -- buf->data = &buf->begin[pos]; -- buf->end = &buf->begin[size]; -- return 0; -- } else { -- buf->end = buf->data = buf->begin; -+ tmp = krealloc(buf->begin, size, GFP_KERNEL | GFP_DMA); -+ if (!tmp) { -+ wsm_buf_deinit(buf); - return -ENOMEM; - } -+ -+ buf->begin = tmp; -+ buf->data = &buf->begin[pos]; -+ buf->end = &buf->begin[size]; -+ return 0; - } -diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c -index 6df3ee56..515aa3f9 100644 ---- a/drivers/net/wireless/hostap/hostap_hw.c -+++ b/drivers/net/wireless/hostap/hostap_hw.c -@@ -836,25 +836,30 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len, - spin_lock_bh(&local->baplock); - - res = hfa384x_setup_bap(dev, BAP0, rid, 0); -- if (!res) -- res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); -+ if (res) -+ goto unlock; -+ -+ res = hfa384x_from_bap(dev, BAP0, &rec, sizeof(rec)); -+ if (res) -+ goto unlock; - - if (le16_to_cpu(rec.len) == 0) { - /* RID not available */ - res = -ENODATA; -+ goto unlock; - } - - rlen = (le16_to_cpu(rec.len) - 1) * 2; -- if (!res && exact_len && rlen != len) { -+ if (exact_len && rlen != len) { - printk(KERN_DEBUG "%s: hfa384x_get_rid - RID len mismatch: " - "rid=0x%04x, len=%d (expected %d)\n", - dev->name, rid, rlen, len); - res = -ENODATA; - } - -- if (!res) -- res = hfa384x_from_bap(dev, BAP0, buf, len); -+ res = hfa384x_from_bap(dev, BAP0, buf, len); - -+unlock: - spin_unlock_bh(&local->baplock); - mutex_unlock(&local->rid_bap_mtx); - -diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c -index 6656215a..04b0349a 100644 ---- a/drivers/net/wireless/iwlegacy/4965-mac.c -+++ b/drivers/net/wireless/iwlegacy/4965-mac.c -@@ -5982,12 +5982,14 @@ il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - - int - il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 * ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct il_priv *il = hw->priv; - int ret = -EINVAL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - D_HT("A-MPDU action on addr %pM tid %d\n", sta->addr, tid); - -diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h -index 8ab8706f..e432715e 100644 ---- a/drivers/net/wireless/iwlegacy/4965.h -+++ b/drivers/net/wireless/iwlegacy/4965.h -@@ -182,9 +182,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, - struct ieee80211_sta *sta, u32 iv32, - u16 *phase1key); - int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 * ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int il4965_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta); - void -diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c -index b3ad34e8..1eb1a823 100644 ---- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c -+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c -@@ -729,12 +729,15 @@ static inline bool iwl_enable_tx_ampdu(const struct iwl_cfg *cfg) - - static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); - int ret = -EINVAL; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - struct iwl_station_priv *sta_priv = (void *) sta->drv_priv; - - IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", -diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -index d8298491..95b82cc1 100644 ---- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -+++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c -@@ -73,6 +73,7 @@ - /* NVM offsets (in words) definitions */ - enum wkp_nvm_offsets { - /* NVM HW-Section offset (in words) definitions */ -+ SUBSYSTEM_ID = 0x0A, - HW_ADDR = 0x15, - - /* NVM SW-Section offset (in words) definitions */ -@@ -257,13 +258,12 @@ static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, bool is_5ghz, - static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - struct iwl_nvm_data *data, - const __le16 * const nvm_ch_flags, -- bool lar_supported) -+ bool lar_supported, bool no_wide_in_5ghz) - { - int ch_idx; - int n_channels = 0; - struct ieee80211_channel *channel; - u16 ch_flags; -- bool is_5ghz; - int num_of_ch, num_2ghz_channels; - const u8 *nvm_chan; - -@@ -278,12 +278,20 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - } - - for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { -+ bool is_5ghz = (ch_idx >= num_2ghz_channels); -+ - ch_flags = __le16_to_cpup(nvm_ch_flags + ch_idx); - -- if (ch_idx >= num_2ghz_channels && -- !data->sku_cap_band_52GHz_enable) -+ if (is_5ghz && !data->sku_cap_band_52GHz_enable) - continue; - -+ /* workaround to disable wide channels in 5GHz */ -+ if (no_wide_in_5ghz && is_5ghz) { -+ ch_flags &= ~(NVM_CHANNEL_40MHZ | -+ NVM_CHANNEL_80MHZ | -+ NVM_CHANNEL_160MHZ); -+ } -+ - if (!lar_supported && !(ch_flags & NVM_CHANNEL_VALID)) { - /* - * Channels might become valid later if lar is -@@ -303,8 +311,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - n_channels++; - - channel->hw_value = nvm_chan[ch_idx]; -- channel->band = (ch_idx < num_2ghz_channels) ? -- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; -+ channel->band = is_5ghz ? -+ IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; - channel->center_freq = - ieee80211_channel_to_frequency( - channel->hw_value, channel->band); -@@ -316,7 +324,6 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, - * is not used in mvm, and is used for backwards compatibility - */ - channel->max_power = IWL_DEFAULT_MAX_TX_POWER; -- is_5ghz = channel->band == IEEE80211_BAND_5GHZ; - - /* don't put limitations in case we're using LAR */ - if (!lar_supported) -@@ -405,7 +412,8 @@ static void iwl_init_vht_hw_capab(const struct iwl_cfg *cfg, - static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, - struct iwl_nvm_data *data, - const __le16 *ch_section, -- u8 tx_chains, u8 rx_chains, bool lar_supported) -+ u8 tx_chains, u8 rx_chains, bool lar_supported, -+ bool no_wide_in_5ghz) - { - int n_channels; - int n_used = 0; -@@ -414,12 +422,14 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, - if (cfg->device_family != IWL_DEVICE_FAMILY_8000) - n_channels = iwl_init_channel_map( - dev, cfg, data, -- &ch_section[NVM_CHANNELS], lar_supported); -+ &ch_section[NVM_CHANNELS], lar_supported, -+ no_wide_in_5ghz); - else - n_channels = iwl_init_channel_map( - dev, cfg, data, - &ch_section[NVM_CHANNELS_FAMILY_8000], -- lar_supported); -+ lar_supported, -+ no_wide_in_5ghz); - - sband = &data->bands[IEEE80211_BAND_2GHZ]; - sband->band = IEEE80211_BAND_2GHZ; -@@ -582,6 +592,39 @@ static void iwl_set_hw_address_family_8000(struct device *dev, - - #define IWL_4165_DEVICE_ID 0x5501 - -+static bool -+iwl_nvm_no_wide_in_5ghz(struct device *dev, const struct iwl_cfg *cfg, -+ const __le16 *nvm_hw) -+{ -+ /* -+ * Workaround a bug in Indonesia SKUs where the regulatory in -+ * some 7000-family OTPs erroneously allow wide channels in -+ * 5GHz. To check for Indonesia, we take the SKU value from -+ * bits 1-4 in the subsystem ID and check if it is either 5 or -+ * 9. In those cases, we need to force-disable wide channels -+ * in 5GHz otherwise the FW will throw a sysassert when we try -+ * to use them. -+ */ -+ if (cfg->device_family == IWL_DEVICE_FAMILY_7000) { -+ /* -+ * Unlike the other sections in the NVM, the hw -+ * section uses big-endian. -+ */ -+ u16 subsystem_id = be16_to_cpup((const __be16 *)nvm_hw -+ + SUBSYSTEM_ID); -+ u8 sku = (subsystem_id & 0x1e) >> 1; -+ -+ if (sku == 5 || sku == 9) { -+ IWL_DEBUG_EEPROM(dev, -+ "disabling wide channels in 5GHz (0x%0x %d)\n", -+ subsystem_id, sku); -+ return true; -+ } -+ } -+ -+ return false; -+} -+ - struct iwl_nvm_data * - iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - const __le16 *nvm_hw, const __le16 *nvm_sw, -@@ -591,6 +634,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - u32 mac_addr0, u32 mac_addr1, u32 hw_id) - { - struct iwl_nvm_data *data; -+ bool no_wide_in_5ghz = iwl_nvm_no_wide_in_5ghz(dev, cfg, nvm_hw); - u32 sku; - u32 radio_cfg; - u16 lar_config; -@@ -657,7 +701,8 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - iwl_set_hw_address(cfg, data, nvm_hw); - - iwl_init_sbands(dev, cfg, data, nvm_sw, -- tx_chains, rx_chains, lar_fw_supported); -+ tx_chains, rx_chains, lar_fw_supported, -+ no_wide_in_5ghz); - } else { - u16 lar_offset = data->nvm_version < 0xE39 ? - NVM_LAR_OFFSET_FAMILY_8000_OLD : -@@ -673,7 +718,8 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, - - iwl_init_sbands(dev, cfg, data, regulatory, - tx_chains, rx_chains, -- lar_fw_supported && data->lar_enabled); -+ lar_fw_supported && data->lar_enabled, -+ no_wide_in_5ghz); - } - - data->calib_version = 255; -diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c -index ce12717e..7b2a7d84 100644 ---- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c -+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c -@@ -322,8 +322,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, - goto out; - } - -- if (changed) -- *changed = (resp->status == MCC_RESP_NEW_CHAN_PROFILE); -+ if (changed) { -+ u32 status = le32_to_cpu(resp->status); -+ -+ *changed = (status == MCC_RESP_NEW_CHAN_PROFILE || -+ status == MCC_RESP_ILLEGAL); -+ } - - regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, - __le32_to_cpu(resp->n_channels), -@@ -826,13 +830,16 @@ iwl_mvm_ampdu_check_trigger(struct iwl_mvm *mvm, struct ieee80211_vif *vif, - - static int iwl_mvm_mac_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); - int ret; - bool tx_agg_ref = false; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - - IWL_DEBUG_HT(mvm, "A-MPDU action on addr %pM tid %d: action %d\n", - sta->addr, tid, action); -@@ -1903,6 +1910,11 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac, - struct iwl_mvm_mc_iter_data *data = _data; - struct iwl_mvm *mvm = data->mvm; - struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd; -+ struct iwl_host_cmd hcmd = { -+ .id = MCAST_FILTER_CMD, -+ .flags = CMD_ASYNC, -+ .dataflags[0] = IWL_HCMD_DFL_NOCOPY, -+ }; - int ret, len; - - /* if we don't have free ports, mcast frames will be dropped */ -@@ -1917,7 +1929,10 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac, - memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); - len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); - -- ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd); -+ hcmd.len[0] = len; -+ hcmd.data[0] = cmd; -+ -+ ret = iwl_mvm_send_cmd(mvm, &hcmd); - if (ret) - IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret); - } -@@ -4039,10 +4054,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, - struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); - -- if (!fw_has_capa(&mvm->fw->ucode_capa, -- IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) -- return; -- - /* if beacon filtering isn't on mac80211 does it anyway */ - if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) - return; -diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c -index 2ee0f6fe..5509c502 100644 ---- a/drivers/net/wireless/iwlwifi/mvm/nvm.c -+++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c -@@ -667,9 +667,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2, - - n_channels = __le32_to_cpu(mcc_resp->n_channels); - IWL_DEBUG_LAR(mvm, -- "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n", -- status, mcc, mcc >> 8, mcc & 0xff, -- !!(status == MCC_RESP_NEW_CHAN_PROFILE), n_channels); -+ "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n", -+ status, mcc, mcc >> 8, mcc & 0xff, n_channels); - - resp_len = sizeof(*mcc_resp) + n_channels * sizeof(__le32); - resp_cp = kmemdup(mcc_resp, resp_len, GFP_KERNEL); -diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c -index e06591f6..d6f9858f 100644 ---- a/drivers/net/wireless/iwlwifi/pcie/rx.c -+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c -@@ -713,6 +713,8 @@ int iwl_pcie_rx_init(struct iwl_trans *trans) - WQ_HIGHPRI | WQ_UNBOUND, 1); - INIT_WORK(&rba->rx_alloc, iwl_pcie_rx_allocator_work); - -+ cancel_work_sync(&rba->rx_alloc); -+ - spin_lock(&rba->lock); - atomic_set(&rba->req_pending, 0); - atomic_set(&rba->req_ready, 0); -diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c -index 0cd95120..0f582117 100644 ---- a/drivers/net/wireless/mac80211_hwsim.c -+++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -699,16 +699,21 @@ static int hwsim_fops_ps_write(void *dat, u64 val) - val != PS_MANUAL_POLL) - return -EINVAL; - -- old_ps = data->ps; -- data->ps = val; -- -- local_bh_disable(); - if (val == PS_MANUAL_POLL) { -+ if (data->ps != PS_ENABLED) -+ return -EINVAL; -+ local_bh_disable(); - ieee80211_iterate_active_interfaces_atomic( - data->hw, IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_ps_poll, data); -- data->ps_poll_pending = true; -- } else if (old_ps == PS_DISABLED && val != PS_DISABLED) { -+ local_bh_enable(); -+ return 0; -+ } -+ old_ps = data->ps; -+ data->ps = val; -+ -+ local_bh_disable(); -+ if (old_ps == PS_DISABLED && val != PS_DISABLED) { - ieee80211_iterate_active_interfaces_atomic( - data->hw, IEEE80211_IFACE_ITER_NORMAL, - hwsim_send_nullfunc_ps, data); -@@ -1817,10 +1822,12 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw, - - static int mac80211_hwsim_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ - switch (action) { - case IEEE80211_AMPDU_TX_START: - ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); -@@ -2446,9 +2453,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - IEEE80211_VHT_CAP_SHORT_GI_80 | - IEEE80211_VHT_CAP_SHORT_GI_160 | - IEEE80211_VHT_CAP_TXSTBC | -- IEEE80211_VHT_CAP_RXSTBC_1 | -- IEEE80211_VHT_CAP_RXSTBC_2 | -- IEEE80211_VHT_CAP_RXSTBC_3 | - IEEE80211_VHT_CAP_RXSTBC_4 | - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; - sband->vht_cap.vht_mcs.rx_mcs_map = -@@ -2511,6 +2515,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - if (param->no_vif) - ieee80211_hw_set(hw, NO_AUTO_VIF); - -+ tasklet_hrtimer_init(&data->beacon_timer, -+ mac80211_hwsim_beacon, -+ CLOCK_MONOTONIC, HRTIMER_MODE_ABS); -+ - err = ieee80211_register_hw(hw); - if (err < 0) { - printk(KERN_DEBUG "mac80211_hwsim: ieee80211_register_hw failed (%d)\n", -@@ -2535,16 +2543,11 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, - data->debugfs, - data, &hwsim_simulate_radar); - -- tasklet_hrtimer_init(&data->beacon_timer, -- mac80211_hwsim_beacon, -- CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS); -- - spin_lock_bh(&hwsim_radio_lock); - list_add_tail(&data->list, &hwsim_radios); - spin_unlock_bh(&hwsim_radio_lock); - -- if (idx > 0) -- hwsim_mcast_new_radio(idx, info, param); -+ hwsim_mcast_new_radio(idx, info, param); - - return idx; - -@@ -2882,6 +2885,8 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2, - static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - { - struct hwsim_new_radio_params param = { 0 }; -+ const char *hwname = NULL; -+ int ret; - - param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG]; - param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE]; -@@ -2895,8 +2900,14 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (info->attrs[HWSIM_ATTR_NO_VIF]) - param.no_vif = true; - -- if (info->attrs[HWSIM_ATTR_RADIO_NAME]) -- param.hwname = nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); -+ if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { -+ hwname = kasprintf(GFP_KERNEL, "%.*s", -+ nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), -+ (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); -+ if (!hwname) -+ return -ENOMEM; -+ param.hwname = hwname; -+ } - - if (info->attrs[HWSIM_ATTR_USE_CHANCTX]) - param.use_chanctx = true; -@@ -2910,12 +2921,16 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (info->attrs[HWSIM_ATTR_REG_CUSTOM_REG]) { - u32 idx = nla_get_u32(info->attrs[HWSIM_ATTR_REG_CUSTOM_REG]); - -- if (idx >= ARRAY_SIZE(hwsim_world_regdom_custom)) -+ if (idx >= ARRAY_SIZE(hwsim_world_regdom_custom)) { -+ kfree(hwname); - return -EINVAL; -+ } - param.regd = hwsim_world_regdom_custom[idx]; - } - -- return mac80211_hwsim_new_radio(info, ¶m); -+ ret = mac80211_hwsim_new_radio(info, ¶m); -+ kfree(hwname); -+ return ret; - } - - static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) -@@ -2924,11 +2939,15 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - s64 idx = -1; - const char *hwname = NULL; - -- if (info->attrs[HWSIM_ATTR_RADIO_ID]) -+ if (info->attrs[HWSIM_ATTR_RADIO_ID]) { - idx = nla_get_u32(info->attrs[HWSIM_ATTR_RADIO_ID]); -- else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) -- hwname = (void *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]); -- else -+ } else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) { -+ hwname = kasprintf(GFP_KERNEL, "%.*s", -+ nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]), -+ (char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME])); -+ if (!hwname) -+ return -ENOMEM; -+ } else - return -EINVAL; - - spin_lock_bh(&hwsim_radio_lock); -@@ -2937,7 +2956,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - if (data->idx != idx) - continue; - } else { -- if (strcmp(hwname, wiphy_name(data->hw->wiphy))) -+ if (!hwname || -+ strcmp(hwname, wiphy_name(data->hw->wiphy))) - continue; - } - -@@ -2945,10 +2965,12 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info) - spin_unlock_bh(&hwsim_radio_lock); - mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), - info); -+ kfree(hwname); - return 0; - } - spin_unlock_bh(&hwsim_radio_lock); - -+ kfree(hwname); - return -ENODEV; - } - -@@ -2980,7 +3002,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info) - goto out_err; - } - -- genlmsg_reply(skb, info); -+ res = genlmsg_reply(skb, info); - break; - } - -@@ -3173,16 +3195,16 @@ static int __init init_mac80211_hwsim(void) - if (err) - return err; - -+ err = hwsim_init_netlink(); -+ if (err) -+ goto out_unregister_driver; -+ - hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim"); - if (IS_ERR(hwsim_class)) { - err = PTR_ERR(hwsim_class); -- goto out_unregister_driver; -+ goto out_exit_netlink; - } - -- err = hwsim_init_netlink(); -- if (err < 0) -- goto out_unregister_driver; -- - for (i = 0; i < radios; i++) { - struct hwsim_new_radio_params param = { 0 }; - -@@ -3288,6 +3310,8 @@ out_free_mon: - free_netdev(hwsim_mon); - out_free_radios: - mac80211_hwsim_free(); -+out_exit_netlink: -+ hwsim_exit_netlink(); - out_unregister_driver: - platform_driver_unregister(&mac80211_hwsim_driver); - return err; -diff --git a/drivers/net/wireless/mediatek/mt7601u/eeprom.h b/drivers/net/wireless/mediatek/mt7601u/eeprom.h -index 662d1270..57b503ae 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/eeprom.h -+++ b/drivers/net/wireless/mediatek/mt7601u/eeprom.h -@@ -17,7 +17,7 @@ - - struct mt7601u_dev; - --#define MT7601U_EE_MAX_VER 0x0c -+#define MT7601U_EE_MAX_VER 0x0d - #define MT7601U_EEPROM_SIZE 256 - - #define MT7601U_DEFAULT_TX_POWER 6 -diff --git a/drivers/net/wireless/mediatek/mt7601u/main.c b/drivers/net/wireless/mediatek/mt7601u/main.c -index f715eee3..e70dd952 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/main.c -+++ b/drivers/net/wireless/mediatek/mt7601u/main.c -@@ -334,11 +334,13 @@ static int mt7601u_set_rts_threshold(struct ieee80211_hw *hw, u32 value) - - static int - mt76_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct mt7601u_dev *dev = hw->priv; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv; - - WARN_ON(msta->wcid.idx > GROUP_WCID(0)); -diff --git a/drivers/net/wireless/mediatek/mt7601u/mcu.c b/drivers/net/wireless/mediatek/mt7601u/mcu.c -index fbb1986e..686b1b5d 100644 ---- a/drivers/net/wireless/mediatek/mt7601u/mcu.c -+++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c -@@ -66,8 +66,10 @@ mt7601u_mcu_msg_alloc(struct mt7601u_dev *dev, const void *data, int len) - WARN_ON(len % 4); /* if length is not divisible by 4 we need to pad */ - - skb = alloc_skb(len + MT_DMA_HDR_LEN + 4, GFP_KERNEL); -- skb_reserve(skb, MT_DMA_HDR_LEN); -- memcpy(skb_put(skb, len), data, len); -+ if (skb) { -+ skb_reserve(skb, MT_DMA_HDR_LEN); -+ memcpy(skb_put(skb, len), data, len); -+ } - - return skb; - } -@@ -170,6 +172,8 @@ static int mt7601u_mcu_function_select(struct mt7601u_dev *dev, - }; - - skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg)); -+ if (!skb) -+ return -ENOMEM; - return mt7601u_mcu_msg_send(dev, skb, CMD_FUN_SET_OP, func == 5); - } - -@@ -205,6 +209,8 @@ mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val) - }; - - skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg)); -+ if (!skb) -+ return -ENOMEM; - return mt7601u_mcu_msg_send(dev, skb, CMD_CALIBRATION_OP, true); - } - -diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c -index aa498e0d..49f3e17c 100644 ---- a/drivers/net/wireless/mwifiex/11n_aggr.c -+++ b/drivers/net/wireless/mwifiex/11n_aggr.c -@@ -101,13 +101,6 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, - { - struct txpd *local_tx_pd; - struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); -- unsigned int pad; -- int headroom = (priv->adapter->iface_type == -- MWIFIEX_USB) ? 0 : INTF_HEADER_LEN; -- -- pad = ((void *)skb->data - sizeof(*local_tx_pd) - -- headroom - NULL) & (MWIFIEX_DMA_ALIGN_SZ - 1); -- skb_push(skb, pad); - - skb_push(skb, sizeof(*local_tx_pd)); - -@@ -121,12 +114,10 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, - local_tx_pd->bss_num = priv->bss_num; - local_tx_pd->bss_type = priv->bss_type; - /* Always zero as the data is followed by struct txpd */ -- local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd) + -- pad); -+ local_tx_pd->tx_pkt_offset = cpu_to_le16(sizeof(struct txpd)); - local_tx_pd->tx_pkt_type = cpu_to_le16(PKT_TYPE_AMSDU); - local_tx_pd->tx_pkt_length = cpu_to_le16(skb->len - -- sizeof(*local_tx_pd) - -- pad); -+ sizeof(*local_tx_pd)); - - if (tx_info->flags & MWIFIEX_BUF_FLAG_TDLS_PKT) - local_tx_pd->flags |= MWIFIEX_TXPD_FLAGS_TDLS_PACKET; -@@ -190,7 +181,11 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, - ra_list_flags); - return -1; - } -- skb_reserve(skb_aggr, MWIFIEX_MIN_DATA_HEADER_LEN); -+ -+ /* skb_aggr->data already 64 byte align, just reserve bus interface -+ * header and txpd. -+ */ -+ skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); - tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); - - memset(tx_info_aggr, 0, sizeof(*tx_info_aggr)); -diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c -index 4073116e..1e074eaf 100644 ---- a/drivers/net/wireless/mwifiex/cfg80211.c -+++ b/drivers/net/wireless/mwifiex/cfg80211.c -@@ -1150,6 +1150,12 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, - priv->adapter->curr_iface_comb.p2p_intf--; - priv->adapter->curr_iface_comb.sta_intf++; - dev->ieee80211_ptr->iftype = type; -+ if (mwifiex_deinit_priv_params(priv)) -+ return -1; -+ if (mwifiex_init_new_priv_params(priv, dev, type)) -+ return -1; -+ if (mwifiex_sta_init_cmd(priv, false, false)) -+ return -1; - break; - case NL80211_IFTYPE_ADHOC: - if (mwifiex_cfg80211_deinit_p2p(priv)) -@@ -2144,8 +2150,9 @@ done: - is_scanning_required = 1; - } else { - mwifiex_dbg(priv->adapter, MSG, -- "info: trying to associate to '%s' bssid %pM\n", -- (char *)req_ssid.ssid, bss->bssid); -+ "info: trying to associate to '%.*s' bssid %pM\n", -+ req_ssid.ssid_len, (char *)req_ssid.ssid, -+ bss->bssid); - memcpy(&priv->cfg_bssid, bss->bssid, ETH_ALEN); - break; - } -@@ -2202,8 +2209,8 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, - } - - mwifiex_dbg(adapter, INFO, -- "info: Trying to associate to %s and bssid %pM\n", -- (char *)sme->ssid, sme->bssid); -+ "info: Trying to associate to %.*s and bssid %pM\n", -+ (int)sme->ssid_len, (char *)sme->ssid, sme->bssid); - - ret = mwifiex_cfg80211_assoc(priv, sme->ssid_len, sme->ssid, sme->bssid, - priv->bss_mode, sme->channel, sme, 0); -@@ -2333,8 +2340,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, - } - - mwifiex_dbg(priv->adapter, MSG, -- "info: trying to join to %s and bssid %pM\n", -- (char *)params->ssid, params->bssid); -+ "info: trying to join to %.*s and bssid %pM\n", -+ params->ssid_len, (char *)params->ssid, params->bssid); - - mwifiex_set_ibss_params(priv, params); - -@@ -2838,8 +2845,10 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) - - mwifiex_stop_net_dev_queue(priv->netdev, adapter); - -- skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { -+ skb_unlink(skb, &priv->bypass_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - - if (netif_carrier_ok(priv->netdev)) - netif_carrier_off(priv->netdev); -@@ -3739,7 +3748,7 @@ int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter) - if (adapter->config_bands & BAND_A) - n_channels_a = mwifiex_band_5ghz.n_channels; - -- adapter->num_in_chan_stats = max_t(u32, n_channels_bg, n_channels_a); -+ adapter->num_in_chan_stats = n_channels_bg + n_channels_a; - adapter->chan_stats = vmalloc(sizeof(*adapter->chan_stats) * - adapter->num_in_chan_stats); - -diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c -index 3ddb8ec6..6dd331df 100644 ---- a/drivers/net/wireless/mwifiex/cfp.c -+++ b/drivers/net/wireless/mwifiex/cfp.c -@@ -533,5 +533,8 @@ u8 mwifiex_adjust_data_rate(struct mwifiex_private *priv, - rate_index = (rx_rate > MWIFIEX_RATE_INDEX_OFDM0) ? - rx_rate - 1 : rx_rate; - -+ if (rate_index >= MWIFIEX_MAX_AC_RX_RATES) -+ rate_index = MWIFIEX_MAX_AC_RX_RATES - 1; -+ - return rate_index; - } -diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c -index 9824d8dd..45d97b64 100644 ---- a/drivers/net/wireless/mwifiex/debugfs.c -+++ b/drivers/net/wireless/mwifiex/debugfs.c -@@ -115,7 +115,8 @@ mwifiex_info_read(struct file *file, char __user *ubuf, - if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) { - p += sprintf(p, "multicast_count=\"%d\"\n", - netdev_mc_count(netdev)); -- p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); -+ p += sprintf(p, "essid=\"%.*s\"\n", info.ssid.ssid_len, -+ info.ssid.ssid); - p += sprintf(p, "bssid=\"%pM\"\n", info.bssid); - p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); - p += sprintf(p, "country_code = \"%s\"\n", info.country_code); -diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c -index 21192b6f..268e50ba 100644 ---- a/drivers/net/wireless/mwifiex/pcie.c -+++ b/drivers/net/wireless/mwifiex/pcie.c -@@ -947,6 +947,7 @@ static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter) - if (card && card->cmd_buf) { - mwifiex_unmap_pci_memory(adapter, card->cmd_buf, - PCI_DMA_TODEVICE); -+ dev_kfree_skb_any(card->cmd_buf); - } - return 0; - } -@@ -1513,6 +1514,11 @@ mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) - return -1; - - card->cmd_buf = skb; -+ /* -+ * Need to keep a reference, since core driver might free up this -+ * buffer before we've unmapped it. -+ */ -+ skb_get(skb); - - /* To send a command, the driver will: - 1. Write the 64bit physical address of the data buffer to -@@ -1610,6 +1616,7 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter) - if (card->cmd_buf) { - mwifiex_unmap_pci_memory(adapter, card->cmd_buf, - PCI_DMA_TODEVICE); -+ dev_kfree_skb_any(card->cmd_buf); - card->cmd_buf = NULL; - } - -diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c -index c20017ce..fb98f42c 100644 ---- a/drivers/net/wireless/mwifiex/scan.c -+++ b/drivers/net/wireless/mwifiex/scan.c -@@ -2170,6 +2170,12 @@ mwifiex_update_chan_statistics(struct mwifiex_private *priv, - sizeof(struct mwifiex_chan_stats); - - for (i = 0 ; i < num_chan; i++) { -+ if (adapter->survey_idx >= adapter->num_in_chan_stats) { -+ mwifiex_dbg(adapter, WARN, -+ "FW reported too many channel results (max %d)\n", -+ adapter->num_in_chan_stats); -+ return; -+ } - chan_stats.chan_num = fw_chan_stats->chan_num; - chan_stats.bandcfg = fw_chan_stats->bandcfg; - chan_stats.flags = fw_chan_stats->flags; -diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c -index d6c4f0f6..6cfa2969 100644 ---- a/drivers/net/wireless/mwifiex/sta_ioctl.c -+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c -@@ -1098,8 +1098,6 @@ int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp, - encrypt_key.is_rx_seq_valid = true; - } - } else { -- if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) -- return 0; - encrypt_key.key_disable = true; - if (mac_addr) - memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); -diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c -index e43aff93..1a1b1de8 100644 ---- a/drivers/net/wireless/mwifiex/usb.c -+++ b/drivers/net/wireless/mwifiex/usb.c -@@ -624,6 +624,9 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) - MWIFIEX_FUNC_SHUTDOWN); - } - -+ if (adapter->workqueue) -+ flush_workqueue(adapter->workqueue); -+ - mwifiex_usb_free(card); - - mwifiex_dbg(adapter, FATAL, -diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c -index 0cec8a64..eb5ffa5b 100644 ---- a/drivers/net/wireless/mwifiex/util.c -+++ b/drivers/net/wireless/mwifiex/util.c -@@ -702,12 +702,14 @@ void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr, - s8 nflr) - { - struct mwifiex_histogram_data *phist_data = priv->hist_data; -+ s8 nf = -nflr; -+ s8 rssi = snr - nflr; - - atomic_inc(&phist_data->num_samples); - atomic_inc(&phist_data->rx_rate[rx_rate]); -- atomic_inc(&phist_data->snr[snr]); -- atomic_inc(&phist_data->noise_flr[128 + nflr]); -- atomic_inc(&phist_data->sig_str[nflr - snr]); -+ atomic_inc(&phist_data->snr[snr + 128]); -+ atomic_inc(&phist_data->noise_flr[nf + 128]); -+ atomic_inc(&phist_data->sig_str[rssi + 128]); - } - - /* function to reset histogram data during init/reset */ -diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c -index acccd673..ed8b69d1 100644 ---- a/drivers/net/wireless/mwifiex/wmm.c -+++ b/drivers/net/wireless/mwifiex/wmm.c -@@ -501,8 +501,10 @@ mwifiex_wmm_del_pkts_in_ralist_node(struct mwifiex_private *priv, - struct mwifiex_adapter *adapter = priv->adapter; - struct sk_buff *skb, *tmp; - -- skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) -+ skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) { -+ skb_unlink(skb, &ra_list->skb_head); - mwifiex_write_data_complete(adapter, skb, 0, -1); -+ } - } - - /* -@@ -598,11 +600,15 @@ mwifiex_clean_txrx(struct mwifiex_private *priv) - priv->adapter->if_ops.clean_pcie_ring(priv->adapter); - spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); - -- skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) { -+ skb_unlink(skb, &priv->tdls_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - -- skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) -+ skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { -+ skb_unlink(skb, &priv->bypass_txq); - mwifiex_write_data_complete(priv->adapter, skb, 0, -1); -+ } - atomic_set(&priv->adapter->bypass_tx_pending, 0); - - idr_for_each(&priv->ack_status_frames, mwifiex_free_ack_frame, NULL); -diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c -index 30e3aaae..088429d0 100644 ---- a/drivers/net/wireless/mwl8k.c -+++ b/drivers/net/wireless/mwl8k.c -@@ -5421,11 +5421,13 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, - - static int - mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -- -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - int i, rc = 0; - struct mwl8k_priv *priv = hw->priv; - struct mwl8k_ampdu_stream *stream; -diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c -index 257a9ead..4ac6764f 100644 ---- a/drivers/net/wireless/p54/fwio.c -+++ b/drivers/net/wireless/p54/fwio.c -@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell) - - entry += sizeof(__le16); - chan->pa_points_per_curve = 8; -- memset(chan->curve_data, 0, sizeof(*chan->curve_data)); -+ memset(chan->curve_data, 0, sizeof(chan->curve_data)); - memcpy(chan->curve_data, entry, - sizeof(struct p54_pa_curve_data_sample) * - min((u8)8, curve_data->points_per_channel)); -diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c -index 0881ba85..c78abfc7 100644 ---- a/drivers/net/wireless/ray_cs.c -+++ b/drivers/net/wireless/ray_cs.c -@@ -247,7 +247,10 @@ static const UCHAR b4_default_startup_parms[] = { - 0x04, 0x08, /* Noise gain, limit offset */ - 0x28, 0x28, /* det rssi, med busy offsets */ - 7, /* det sync thresh */ -- 0, 2, 2 /* test mode, min, max */ -+ 0, 2, 2, /* test mode, min, max */ -+ 0, /* rx/tx delay */ -+ 0, 0, 0, 0, 0, 0, /* current BSS id */ -+ 0 /* hop set */ - }; - - /*===========================================================================*/ -@@ -598,7 +601,7 @@ static void init_startup_params(ray_dev_t *local) - * a_beacon_period = hops a_beacon_period = KuS - *//* 64ms = 010000 */ - if (local->fw_ver == 0x55) { -- memcpy((UCHAR *) &local->sparm.b4, b4_default_startup_parms, -+ memcpy(&local->sparm.b4, b4_default_startup_parms, - sizeof(struct b4_startup_params)); - /* Translate sane kus input values to old build 4/5 format */ - /* i = hop time in uS truncated to 3 bytes */ -diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -index b7f72f9c..b3691712 100644 ---- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c -@@ -1454,6 +1454,7 @@ static int rtl8187_probe(struct usb_interface *intf, - goto err_free_dev; - } - mutex_init(&priv->io_mutex); -+ mutex_init(&priv->conf_mutex); - - SET_IEEE80211_DEV(dev, &intf->dev); - usb_set_intfdata(intf, dev); -@@ -1627,7 +1628,6 @@ static int rtl8187_probe(struct usb_interface *intf, - printk(KERN_ERR "rtl8187: Cannot register device\n"); - goto err_free_dmabuf; - } -- mutex_init(&priv->conf_mutex); - skb_queue_head_init(&priv->b_tx_status.queue); - - wiphy_info(dev->wiphy, "hwaddr %pM, %s V%d + %s, rfkill mask %d\n", -diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -index 6aed923a..7d820c39 100644 ---- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c -@@ -5375,13 +5375,13 @@ static int rtl8xxxu_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, - - static int - rtl8xxxu_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct rtl8xxxu_priv *priv = hw->priv; - struct device *dev = &priv->udev->dev; - u8 ampdu_factor, ampdu_density; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; - - switch (action) { - case IEEE80211_AMPDU_TX_START: -diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c -index 7a40d8df..5013d8c1 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/base.c -+++ b/drivers/net/wireless/realtek/rtlwifi/base.c -@@ -466,6 +466,11 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) - /* <2> work queue */ - rtlpriv->works.hw = hw; - rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); -+ if (unlikely(!rtlpriv->works.rtl_wq)) { -+ pr_err("Failed to allocate work queue\n"); -+ return; -+ } -+ - INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq, - (void *)rtl_watchdog_wq_callback); - INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq, -@@ -1303,12 +1308,13 @@ EXPORT_SYMBOL_GPL(rtl_action_proc); - - static void setup_arp_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc) - { -+ struct ieee80211_hw *hw = rtlpriv->hw; -+ - rtlpriv->ra.is_special_data = true; - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_special_packet_notify( - rtlpriv, 1); -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - ppsc->last_delaylps_stamp_jiffies = jiffies; - } - -@@ -1381,8 +1387,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, - - if (is_tx) { - rtlpriv->ra.is_special_data = true; -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - ppsc->last_delaylps_stamp_jiffies = jiffies; - } - -diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c -index c925a4df..8006f097 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/core.c -+++ b/drivers/net/wireless/realtek/rtlwifi/core.c -@@ -135,7 +135,6 @@ found_alt: - firmware->size); - rtlpriv->rtlhal.wowlan_fwsize = firmware->size; - } -- rtlpriv->rtlhal.fwsize = firmware->size; - release_firmware(firmware); - } - -@@ -1153,10 +1152,8 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, - } else { - mstatus = RT_MEDIA_DISCONNECT; - -- if (mac->link_state == MAC80211_LINKED) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ if (mac->link_state == MAC80211_LINKED) -+ rtl_lps_leave(hw); - if (ppsc->p2p_ps_info.p2p_ps_mode > P2P_PS_NONE) - rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE); - mac->link_state = MAC80211_NOLINK; -@@ -1371,11 +1368,13 @@ static void rtl_op_sta_notify(struct ieee80211_hw *hw, - - static int rtl_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - switch (action) { - case IEEE80211_AMPDU_TX_START: -@@ -1432,8 +1431,7 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, - } - - if (mac->link_state == MAC80211_LINKED) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -+ rtl_lps_leave(hw); - mac->link_state = MAC80211_LINKED_SCANNING; - } else { - rtl_ips_nic_on(hw); -diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c -index 5b404804..b51815ec 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/pci.c -+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c -@@ -664,11 +664,9 @@ tx_status_ok: - } - - if (((rtlpriv->link_info.num_rx_inperiod + -- rtlpriv->link_info.num_tx_inperiod) > 8) || -- (rtlpriv->link_info.num_rx_inperiod > 2)) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ rtlpriv->link_info.num_tx_inperiod) > 8) || -+ (rtlpriv->link_info.num_rx_inperiod > 2)) -+ rtl_lps_leave(hw); - } - - static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, -@@ -919,10 +917,8 @@ new_trx_end: - } - if (((rtlpriv->link_info.num_rx_inperiod + - rtlpriv->link_info.num_tx_inperiod) > 8) || -- (rtlpriv->link_info.num_rx_inperiod > 2)) { -- rtlpriv->enter_ps = false; -- schedule_work(&rtlpriv->works.lps_change_work); -- } -+ (rtlpriv->link_info.num_rx_inperiod > 2)) -+ rtl_lps_leave(hw); - skb = new_skb; - no_new: - if (rtlpriv->use_new_trx_flow) { -@@ -1576,7 +1572,14 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) - dev_kfree_skb_irq(skb); - ring->idx = (ring->idx + 1) % ring->entries; - } -+ -+ if (rtlpriv->use_new_trx_flow) { -+ rtlpci->tx_ring[i].cur_tx_rp = 0; -+ rtlpci->tx_ring[i].cur_tx_wp = 0; -+ } -+ - ring->idx = 0; -+ ring->entries = rtlpci->txringcount[i]; - } - } - spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); -@@ -2273,7 +2276,7 @@ int rtl_pci_probe(struct pci_dev *pdev, - /* find adapter */ - if (!_rtl_pci_find_adapter(pdev, hw)) { - err = -ENODEV; -- goto fail3; -+ goto fail2; - } - - /* Init IO handler */ -@@ -2343,10 +2346,10 @@ fail3: - pci_set_drvdata(pdev, NULL); - rtl_deinit_core(hw); - -+fail2: - if (rtlpriv->io.pci_mem_start != 0) - pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start); - --fail2: - pci_release_regions(pdev); - complete(&rtlpriv->firmware_loading_complete); - -diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h -index 5da67039..672f81ea 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/pci.h -+++ b/drivers/net/wireless/realtek/rtlwifi/pci.h -@@ -275,10 +275,10 @@ struct mp_adapter { - }; - - struct rtl_pci_priv { -+ struct bt_coexist_info bt_coexist; -+ struct rtl_led_ctl ledctl; - struct rtl_pci dev; - struct mp_adapter ndis_adapter; -- struct rtl_led_ctl ledctl; -- struct bt_coexist_info bt_coexist; - }; - - #define rtl_pcipriv(hw) (((struct rtl_pci_priv *)(rtl_priv(hw))->priv)) -diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c -index b69321d4..626ff300 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/ps.c -+++ b/drivers/net/wireless/realtek/rtlwifi/ps.c -@@ -414,8 +414,8 @@ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode) - } - } - --/*Enter the leisure power save mode.*/ --void rtl_lps_enter(struct ieee80211_hw *hw) -+/* Interrupt safe routine to enter the leisure power save mode.*/ -+static void rtl_lps_enter_core(struct ieee80211_hw *hw) - { - struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); - struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); -@@ -455,10 +455,9 @@ void rtl_lps_enter(struct ieee80211_hw *hw) - - spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag); - } --EXPORT_SYMBOL(rtl_lps_enter); - --/*Leave the leisure power save mode.*/ --void rtl_lps_leave(struct ieee80211_hw *hw) -+/* Interrupt safe routine to leave the leisure power save mode.*/ -+static void rtl_lps_leave_core(struct ieee80211_hw *hw) - { - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); -@@ -488,7 +487,6 @@ void rtl_lps_leave(struct ieee80211_hw *hw) - } - spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag); - } --EXPORT_SYMBOL(rtl_lps_leave); - - /* For sw LPS*/ - void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) -@@ -681,12 +679,34 @@ void rtl_lps_change_work_callback(struct work_struct *work) - struct rtl_priv *rtlpriv = rtl_priv(hw); - - if (rtlpriv->enter_ps) -- rtl_lps_enter(hw); -+ rtl_lps_enter_core(hw); - else -- rtl_lps_leave(hw); -+ rtl_lps_leave_core(hw); - } - EXPORT_SYMBOL_GPL(rtl_lps_change_work_callback); - -+void rtl_lps_enter(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ -+ if (!in_interrupt()) -+ return rtl_lps_enter_core(hw); -+ rtlpriv->enter_ps = true; -+ schedule_work(&rtlpriv->works.lps_change_work); -+} -+EXPORT_SYMBOL_GPL(rtl_lps_enter); -+ -+void rtl_lps_leave(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ -+ if (!in_interrupt()) -+ return rtl_lps_leave_core(hw); -+ rtlpriv->enter_ps = false; -+ schedule_work(&rtlpriv->works.lps_change_work); -+} -+EXPORT_SYMBOL_GPL(rtl_lps_leave); -+ - void rtl_swlps_wq_callback(void *data) - { - struct rtl_works *rtlworks = container_of_dwork_rtl(data, -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -index 5624ade9..c2a156a8 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c -@@ -304,9 +304,6 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, - writeVal = 0x00000000; - if (rtlpriv->dm.dynamic_txhighpower_lvl == TXHIGHPWRLEVEL_BT1) - writeVal = writeVal - 0x06060606; -- else if (rtlpriv->dm.dynamic_txhighpower_lvl == -- TXHIGHPWRLEVEL_BT2) -- writeVal = writeVal; - *(p_outwriteval + rf) = writeVal; - } - } -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -index 0708eedd..1c69e814 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c -@@ -664,7 +664,7 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); - struct sk_buff *skb = NULL; -- -+ bool rtstatus; - u32 totalpacketlen; - u8 u1rsvdpageloc[5] = { 0 }; - bool b_dlok = false; -@@ -727,7 +727,9 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) - memcpy((u8 *)skb_put(skb, totalpacketlen), - &reserved_page_packet, totalpacketlen); - -- b_dlok = true; -+ rtstatus = rtl_cmd_send_packet(hw, skb); -+ if (rtstatus) -+ b_dlok = true; - - if (b_dlok) { - RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD , -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -index 5f14308e..b1601441 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c -@@ -1003,7 +1003,7 @@ static void _rtl92ee_hw_configure(struct ieee80211_hw *hw) - rtl_write_word(rtlpriv, REG_SIFS_TRX, 0x100a); - - /* Note Data sheet don't define */ -- rtl_write_word(rtlpriv, 0x4C7, 0x80); -+ rtl_write_byte(rtlpriv, 0x4C7, 0x80); - - rtl_write_byte(rtlpriv, REG_RX_PKT_LIMIT, 0x20); - -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -index 5a3df919..89515f02 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c -@@ -1123,7 +1123,8 @@ static void _rtl8723be_enable_aspm_back_door(struct ieee80211_hw *hw) - - /* Configuration Space offset 0x70f BIT7 is used to control L0S */ - tmp8 = _rtl8723be_dbi_read(rtlpriv, 0x70f); -- _rtl8723be_dbi_write(rtlpriv, 0x70f, tmp8 | BIT(7)); -+ _rtl8723be_dbi_write(rtlpriv, 0x70f, tmp8 | BIT(7) | -+ ASPM_L1_LATENCY << 3); - - /* Configuration Space offset 0x719 Bit3 is for L1 - * BIT4 is for clock request -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -index b57cfd96..7b13962e 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c -@@ -2488,9 +2488,9 @@ void rtl8821ae_dm_txpower_tracking_callback_thermalmeter( - for (p = RF90_PATH_A; p < MAX_PATH_NUM_8821A; p++) - rtldm->swing_idx_ofdm_base[p] = rtldm->swing_idx_ofdm[p]; - -- RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, -- "pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n", -- rtldm->thermalvalue, thermal_value); -+ RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, -+ "pDM_Odm->RFCalibrateInfo.ThermalValue = %d ThermalValue= %d\n", -+ rtldm->thermalvalue, thermal_value); - /*Record last Power Tracking Thermal Value*/ - rtldm->thermalvalue = thermal_value; - } -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -index bbb789f8..348ed1b0 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c -@@ -1127,7 +1127,7 @@ static u8 _rtl8821ae_dbi_read(struct rtl_priv *rtlpriv, u16 addr) - } - if (0 == tmp) { - read_addr = REG_DBI_RDATA + addr % 4; -- ret = rtl_read_word(rtlpriv, read_addr); -+ ret = rtl_read_byte(rtlpriv, read_addr); - } - return ret; - } -@@ -1169,7 +1169,8 @@ static void _rtl8821ae_enable_aspm_back_door(struct ieee80211_hw *hw) - } - - tmp = _rtl8821ae_dbi_read(rtlpriv, 0x70f); -- _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7)); -+ _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7) | -+ ASPM_L1_LATENCY << 3); - - tmp = _rtl8821ae_dbi_read(rtlpriv, 0x719); - _rtl8821ae_dbi_write(rtlpriv, 0x719, tmp | BIT(3) | BIT(4)); -@@ -1377,6 +1378,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) - - ppsc->wakeup_reason = 0; - -+ do_gettimeofday(&ts); - rtlhal->last_suspend_sec = ts.tv_sec; - - switch (fw_reason) { -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -index 9b4d8a63..4b354918 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c -@@ -359,6 +359,107 @@ bool rtl8821ae_phy_rf_config(struct ieee80211_hw *hw) - return rtl8821ae_phy_rf6052_config(hw); - } - -+static void _rtl8812ae_phy_set_rfe_reg_24g(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); -+ u8 tmp; -+ -+ switch (rtlhal->rfe_type) { -+ case 3: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x54337770); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x54337770); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, 0x900, 0x00000303, 0x1); -+ break; -+ case 4: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x001); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x001); -+ break; -+ case 5: -+ rtl_write_byte(rtlpriv, RA_RFE_PINMUX + 2, 0x77); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ tmp = rtl_read_byte(rtlpriv, RA_RFE_INV + 3); -+ rtl_write_byte(rtlpriv, RA_RFE_INV + 3, tmp & ~0x1); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ case 1: -+ if (rtlpriv->btcoexist.bt_coexistence) { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, 0xffffff, 0x777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, 0x33f00000, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ } -+ case 0: -+ case 2: -+ default: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77777777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ break; -+ } -+} -+ -+static void _rtl8812ae_phy_set_rfe_reg_5g(struct ieee80211_hw *hw) -+{ -+ struct rtl_priv *rtlpriv = rtl_priv(hw); -+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); -+ u8 tmp; -+ -+ switch (rtlhal->rfe_type) { -+ case 0: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ case 1: -+ if (rtlpriv->btcoexist.bt_coexistence) { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, 0xffffff, 0x337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, 0x33f00000, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ } else { -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -+ 0x77337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x000); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x000); -+ } -+ break; -+ case 3: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x54337717); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x54337717); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, 0x900, 0x00000303, 0x1); -+ break; -+ case 5: -+ rtl_write_byte(rtlpriv, RA_RFE_PINMUX + 2, 0x33); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ tmp = rtl_read_byte(rtlpriv, RA_RFE_INV + 3); -+ rtl_write_byte(rtlpriv, RA_RFE_INV + 3, tmp | 0x1); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ case 2: -+ case 4: -+ default: -+ rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, 0x77337777); -+ rtl_set_bbreg(hw, RA_RFE_INV, BMASKRFEINV, 0x010); -+ rtl_set_bbreg(hw, RB_RFE_INV, BMASKRFEINV, 0x010); -+ break; -+ } -+} -+ - u32 phy_get_tx_swing_8812A(struct ieee80211_hw *hw, u8 band, - u8 rf_path) - { -@@ -553,14 +654,9 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) - /* 0x82C[1:0] = 2b'00 */ - rtl_set_bbreg(hw, 0x82c, 0x3, 0); - } -- if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { -- rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -- 0x77777777); -- rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -- 0x77777777); -- rtl_set_bbreg(hw, RA_RFE_INV, 0x3ff00000, 0x000); -- rtl_set_bbreg(hw, RB_RFE_INV, 0x3ff00000, 0x000); -- } -+ -+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) -+ _rtl8812ae_phy_set_rfe_reg_24g(hw); - - rtl_set_bbreg(hw, RTXPATH, 0xf0, 0x1); - rtl_set_bbreg(hw, RCCK_RX, 0x0f000000, 0x1); -@@ -615,14 +711,8 @@ void rtl8821ae_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band) - /* 0x82C[1:0] = 2'b00 */ - rtl_set_bbreg(hw, 0x82c, 0x3, 1); - -- if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) { -- rtl_set_bbreg(hw, RA_RFE_PINMUX, BMASKDWORD, -- 0x77337777); -- rtl_set_bbreg(hw, RB_RFE_PINMUX, BMASKDWORD, -- 0x77337777); -- rtl_set_bbreg(hw, RA_RFE_INV, 0x3ff00000, 0x010); -- rtl_set_bbreg(hw, RB_RFE_INV, 0x3ff00000, 0x010); -- } -+ if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) -+ _rtl8812ae_phy_set_rfe_reg_5g(hw); - - rtl_set_bbreg(hw, RTXPATH, 0xf0, 0); - rtl_set_bbreg(hw, RCCK_RX, 0x0f000000, 0xf); -diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -index 1d6110f9..ed69dbe1 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h -@@ -2424,6 +2424,7 @@ - #define BMASKH4BITS 0xf0000000 - #define BMASKOFDM_D 0xffc00000 - #define BMASKCCK 0x3f3f3f3f -+#define BMASKRFEINV 0x3ff00000 - - #define BRFREGOFFSETMASK 0xfffff - -diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c -index aac1ed3f..ad8390d2 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/usb.c -+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c -@@ -834,12 +834,30 @@ static void rtl_usb_stop(struct ieee80211_hw *hw) - struct rtl_priv *rtlpriv = rtl_priv(hw); - struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); - struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw)); -+ struct urb *urb; - - /* should after adapter start and interrupt enable. */ - set_hal_stop(rtlhal); - cancel_work_sync(&rtlpriv->works.fill_h2c_cmd); - /* Enable software */ - SET_USB_STOP(rtlusb); -+ -+ /* free pre-allocated URBs from rtl_usb_start() */ -+ usb_kill_anchored_urbs(&rtlusb->rx_submitted); -+ -+ tasklet_kill(&rtlusb->rx_work_tasklet); -+ cancel_work_sync(&rtlpriv->works.lps_change_work); -+ -+ flush_workqueue(rtlpriv->works.rtl_wq); -+ -+ skb_queue_purge(&rtlusb->rx_queue); -+ -+ while ((urb = usb_get_from_anchor(&rtlusb->rx_cleanup_urbs))) { -+ usb_free_coherent(urb->dev, urb->transfer_buffer_length, -+ urb->transfer_buffer, urb->transfer_dma); -+ usb_free_urb(urb); -+ } -+ - rtlpriv->cfg->ops->hw_disable(hw); - } - -@@ -1073,6 +1091,7 @@ int rtl_usb_probe(struct usb_interface *intf, - return -ENOMEM; - } - rtlpriv = hw->priv; -+ rtlpriv->hw = hw; - rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32), - GFP_KERNEL); - if (!rtlpriv->usb_data) -diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h b/drivers/net/wireless/realtek/rtlwifi/usb.h -index 685273ca..441c4412 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/usb.h -+++ b/drivers/net/wireless/realtek/rtlwifi/usb.h -@@ -150,8 +150,9 @@ struct rtl_usb { - }; - - struct rtl_usb_priv { -- struct rtl_usb dev; -+ struct bt_coexist_info bt_coexist; - struct rtl_led_ctl ledctl; -+ struct rtl_usb dev; - }; - - #define rtl_usbpriv(hw) (((struct rtl_usb_priv *)(rtl_priv(hw))->priv)) -diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h -index b6faf624..d676d055 100644 ---- a/drivers/net/wireless/realtek/rtlwifi/wifi.h -+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h -@@ -99,6 +99,7 @@ - #define RTL_USB_MAX_RX_COUNT 100 - #define QBSS_LOAD_SIZE 5 - #define MAX_WMMELE_LENGTH 64 -+#define ASPM_L1_LATENCY 7 - - #define TOTAL_CAM_ENTRY 32 - -diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c -index a13d1f2b..c76e0cfb 100644 ---- a/drivers/net/wireless/rndis_wlan.c -+++ b/drivers/net/wireless/rndis_wlan.c -@@ -2919,6 +2919,8 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev, - - while (buflen >= sizeof(*auth_req)) { - auth_req = (void *)buf; -+ if (buflen < le32_to_cpu(auth_req->length)) -+ return; - type = "unknown"; - flags = le32_to_cpu(auth_req->flags); - pairwise_error = false; -@@ -3425,6 +3427,10 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) - - /* because rndis_command() sleeps we need to use workqueue */ - priv->workqueue = create_singlethread_workqueue("rndis_wlan"); -+ if (!priv->workqueue) { -+ wiphy_free(wiphy); -+ return -ENOMEM; -+ } - INIT_WORK(&priv->work, rndis_wlan_worker); - INIT_DELAYED_WORK(&priv->dev_poller_work, rndis_device_poller); - INIT_DELAYED_WORK(&priv->scan_work, rndis_get_scan_results); -diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c -index b5bcc933..4df992de 100644 ---- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c -+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c -@@ -659,29 +659,24 @@ static int rsi_mac80211_set_key(struct ieee80211_hw *hw, - * informs the f/w regarding this. - * @hw: Pointer to the ieee80211_hw structure. - * @vif: Pointer to the ieee80211_vif structure. -- * @action: ieee80211_ampdu_mlme_action enum. -- * @sta: Pointer to the ieee80211_sta structure. -- * @tid: Traffic identifier. -- * @ssn: Pointer to ssn value. -- * @buf_size: Buffer size (for kernel version > 2.6.38). -- * @amsdu: is AMSDU in AMPDU allowed -+ * @params: Pointer to A-MPDU action parameters - * - * Return: status: 0 on success, negative error code on failure. - */ - static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, -- unsigned short tid, -- unsigned short *ssn, -- unsigned char buf_size, -- bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - int status = -EOPNOTSUPP; - struct rsi_hw *adapter = hw->priv; - struct rsi_common *common = adapter->priv; - u16 seq_no = 0; - u8 ii = 0; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; -+ u8 buf_size = params->buf_size; - - for (ii = 0; ii < RSI_MAX_VIFS; ii++) { - if (vif == adapter->vifs[ii]) -diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c -index 84288582..fc895b46 100644 ---- a/drivers/net/wireless/rsi/rsi_91x_sdio.c -+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c -@@ -155,7 +155,6 @@ static void rsi_reset_card(struct sdio_func *pfunction) - int err; - struct mmc_card *card = pfunction->card; - struct mmc_host *host = card->host; -- s32 bit = (fls(host->ocr_avail) - 1); - u8 cmd52_resp; - u32 clock, resp, i; - u16 rca; -@@ -175,7 +174,6 @@ static void rsi_reset_card(struct sdio_func *pfunction) - msleep(20); - - /* Initialize the SDIO card */ -- 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; -diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h -index d3fbe33d..a13f08fd 100644 ---- a/drivers/net/wireless/rsi/rsi_common.h -+++ b/drivers/net/wireless/rsi/rsi_common.h -@@ -75,7 +75,6 @@ static inline int rsi_kill_thread(struct rsi_thread *handle) - atomic_inc(&handle->thread_done); - rsi_set_event(&handle->event); - -- wait_for_completion(&handle->completion); - return kthread_stop(handle->task); - } - -diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c -index 9733b31a..69c1c096 100644 ---- a/drivers/net/wireless/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/rt2x00/rt2800lib.c -@@ -7935,10 +7935,11 @@ u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) - EXPORT_SYMBOL_GPL(rt2800_get_tsf); - - int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; - struct rt2x00_sta *sta_priv = (struct rt2x00_sta *)sta->drv_priv; - int ret = 0; - -diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h -index 440790b9..83f1a44f 100644 ---- a/drivers/net/wireless/rt2x00/rt2800lib.h -+++ b/drivers/net/wireless/rt2x00/rt2800lib.h -@@ -218,9 +218,7 @@ int rt2800_conf_tx(struct ieee80211_hw *hw, - const struct ieee80211_tx_queue_params *params); - u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif); - int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int rt2800_get_survey(struct ieee80211_hw *hw, int idx, - struct survey_info *survey); - void rt2800_disable_wpdma(struct rt2x00_dev *rt2x00dev); -diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c -index cd477795..869411f5 100644 ---- a/drivers/net/wireless/ti/wl1251/main.c -+++ b/drivers/net/wireless/ti/wl1251/main.c -@@ -1196,8 +1196,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, - WARN_ON(wl->bss_type != BSS_TYPE_STA_BSS); - - enable = bss_conf->arp_addr_cnt == 1 && bss_conf->assoc; -- wl1251_acx_arp_ip_filter(wl, enable, addr); -- -+ ret = wl1251_acx_arp_ip_filter(wl, enable, addr); - if (ret < 0) - goto out_sleep; - } -@@ -1567,6 +1566,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) - - wl->state = WL1251_STATE_OFF; - mutex_init(&wl->mutex); -+ spin_lock_init(&wl->wl_lock); - - wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE; - wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE; -diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c -index 09c7e098..085ef5c8 100644 ---- a/drivers/net/wireless/ti/wl18xx/event.c -+++ b/drivers/net/wireless/ti/wl18xx/event.c -@@ -206,5 +206,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl) - mbox->sc_pwd_len, - mbox->sc_pwd); - -+ if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) { -+ struct wl12xx_vif *wlvif; -+ struct ieee80211_vif *vif; -+ struct ieee80211_sta *sta; -+ u8 link_id = mbox->rx_ba_link_id; -+ u8 win_size = mbox->rx_ba_win_size; -+ const u8 *addr; -+ -+ wlvif = wl->links[link_id].wlvif; -+ vif = wl12xx_wlvif_to_vif(wlvif); -+ -+ /* Update RX aggregation window size and call -+ * MAC routine to stop active RX aggregations for this link -+ */ -+ if (wlvif->bss_type != BSS_TYPE_AP_BSS) -+ addr = vif->bss_conf.bssid; -+ else -+ addr = wl->links[link_id].addr; -+ -+ sta = ieee80211_find_sta(vif, addr); -+ if (sta) { -+ sta->max_rx_aggregation_subframes = win_size; -+ ieee80211_stop_rx_ba_session(vif, -+ wl->links[link_id].ba_bitmap, -+ addr); -+ } -+ } -+ - return 0; - } -diff --git a/drivers/net/wireless/ti/wl18xx/event.h b/drivers/net/wireless/ti/wl18xx/event.h -index f3d4f133..9495fadc 100644 ---- a/drivers/net/wireless/ti/wl18xx/event.h -+++ b/drivers/net/wireless/ti/wl18xx/event.h -@@ -38,6 +38,7 @@ enum { - REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID = BIT(18), - DFS_CHANNELS_CONFIG_COMPLETE_EVENT = BIT(19), - PERIODIC_SCAN_REPORT_EVENT_ID = BIT(20), -+ RX_BA_WIN_SIZE_CHANGE_EVENT_ID = BIT(21), - SMART_CONFIG_SYNC_EVENT_ID = BIT(22), - SMART_CONFIG_DECODE_EVENT_ID = BIT(23), - TIME_SYNC_EVENT_ID = BIT(24), -diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c -index 50cce420..47f355e9 100644 ---- a/drivers/net/wireless/ti/wl18xx/main.c -+++ b/drivers/net/wireless/ti/wl18xx/main.c -@@ -1029,7 +1029,8 @@ static int wl18xx_boot(struct wl1271 *wl) - DFS_CHANNELS_CONFIG_COMPLETE_EVENT | - SMART_CONFIG_SYNC_EVENT_ID | - SMART_CONFIG_DECODE_EVENT_ID | -- TIME_SYNC_EVENT_ID; -+ TIME_SYNC_EVENT_ID | -+ RX_BA_WIN_SIZE_CHANGE_EVENT_ID; - - wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID; - -diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c -index f28fa3b5..0646c9b6 100644 ---- a/drivers/net/wireless/ti/wlcore/acx.c -+++ b/drivers/net/wireless/ti/wlcore/acx.c -@@ -1419,7 +1419,8 @@ out: - - /* setup BA session receiver setting in the FW. */ - int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, -- u16 ssn, bool enable, u8 peer_hlid) -+ u16 ssn, bool enable, u8 peer_hlid, -+ u8 win_size) - { - struct wl1271_acx_ba_receiver_setup *acx; - int ret; -@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, - acx->hlid = peer_hlid; - acx->tid = tid_index; - acx->enable = enable; -- acx->win_size = wl->conf.ht.rx_ba_win_size; -+ acx->win_size = win_size; - acx->ssn = ssn; - - ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx, -diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h -index 954d57ec..524aea49 100644 ---- a/drivers/net/wireless/ti/wlcore/acx.h -+++ b/drivers/net/wireless/ti/wlcore/acx.h -@@ -1112,7 +1112,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl, - int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl, - struct wl12xx_vif *wlvif); - int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, -- u16 ssn, bool enable, u8 peer_hlid); -+ u16 ssn, bool enable, u8 peer_hlid, -+ u8 win_size); - int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif, - u64 *mactime); - int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, -diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c -index 9fd3c6af..e92f2639 100644 ---- a/drivers/net/wireless/ti/wlcore/init.c -+++ b/drivers/net/wireless/ti/wlcore/init.c -@@ -549,11 +549,6 @@ static int wl12xx_init_ap_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) - { - int ret; - -- /* Disable filtering */ -- ret = wl1271_acx_group_address_tbl(wl, wlvif, false, NULL, 0); -- if (ret < 0) -- return ret; -- - ret = wl1271_acx_ap_max_tx_retry(wl, wlvif); - if (ret < 0) - return ret; -diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c -index ec7f6af3..cc10b726 100644 ---- a/drivers/net/wireless/ti/wlcore/main.c -+++ b/drivers/net/wireless/ti/wlcore/main.c -@@ -1123,8 +1123,11 @@ static int wl12xx_chip_wakeup(struct wl1271 *wl, bool plt) - goto out; - - ret = wl12xx_fetch_firmware(wl, plt); -- if (ret < 0) -- goto out; -+ if (ret < 0) { -+ kfree(wl->fw_status); -+ kfree(wl->raw_fw_status); -+ kfree(wl->tx_res_if); -+ } - - out: - return ret; -@@ -5261,14 +5264,16 @@ out: - - static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - struct wl1271 *wl = hw->priv; - struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); - int ret; - u8 hlid, *ba_bitmap; -+ struct ieee80211_sta *sta = params->sta; -+ enum ieee80211_ampdu_mlme_action action = params->action; -+ u16 tid = params->tid; -+ u16 *ssn = ¶ms->ssn; - - wl1271_debug(DEBUG_MAC80211, "mac80211 ampdu action %d tid %d", action, - tid); -@@ -5326,7 +5331,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - } - - ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true, -- hlid); -+ hlid, -+ params->buf_size); -+ - if (!ret) { - *ba_bitmap |= BIT(tid); - wl->ba_rx_session_count++; -@@ -5347,7 +5354,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw, - } - - ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false, -- hlid); -+ hlid, 0); - if (!ret) { - *ba_bitmap &= ~BIT(tid); - wl->ba_rx_session_count--; -diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c -index c172da56..e4a8280c 100644 ---- a/drivers/net/wireless/ti/wlcore/sdio.c -+++ b/drivers/net/wireless/ti/wlcore/sdio.c -@@ -388,6 +388,11 @@ static int wl1271_suspend(struct device *dev) - mmc_pm_flag_t sdio_flags; - int ret = 0; - -+ if (!wl) { -+ dev_err(dev, "no wilink module was probed\n"); -+ goto out; -+ } -+ - dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n", - wl->wow_enabled); - -diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c -index 44f059f7..9ebe00ea 100644 ---- a/drivers/net/wireless/ti/wlcore/spi.c -+++ b/drivers/net/wireless/ti/wlcore/spi.c -@@ -71,7 +71,7 @@ - * only support SPI for 12xx - this code should be reworked when 18xx - * support is introduced - */ --#define SPI_AGGR_BUFFER_SIZE (4 * PAGE_SIZE) -+#define SPI_AGGR_BUFFER_SIZE (4 * SZ_4K) - - /* Maximum number of SPI write chunks */ - #define WSPI_MAX_NUM_OF_CHUNKS \ -diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c -index 3cdb40fe..f5cedbbc 100644 ---- a/drivers/staging/rtl8188eu/core/rtw_ap.c -+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c -@@ -894,7 +894,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) - return _FAIL; - - -- if (len > MAX_IE_SZ) -+ if (len < 0 || len > MAX_IE_SZ) - return _FAIL; - - pbss_network->IELength = len; -diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c -index 110b8c0b..0f2fe34e 100644 ---- a/drivers/staging/rtl8188eu/core/rtw_recv.c -+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c -@@ -1405,6 +1405,9 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) - ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); - } - -+ if (!ptr) -+ return _FAIL; -+ - memcpy(ptr, pattrib->dst, ETH_ALEN); - memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN); - -diff --git a/drivers/staging/rtl8188eu/include/rtw_debug.h b/drivers/staging/rtl8188eu/include/rtw_debug.h -index 971bf457..e75a3863 100644 ---- a/drivers/staging/rtl8188eu/include/rtw_debug.h -+++ b/drivers/staging/rtl8188eu/include/rtw_debug.h -@@ -75,7 +75,7 @@ extern u32 GlobalDebugLevel; - #define DBG_88E_LEVEL(_level, fmt, arg...) \ - do { \ - if (_level <= GlobalDebugLevel) \ -- pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg); \ -+ pr_info(DRIVER_PREFIX fmt, ##arg); \ - } while (0) - - #define DBG_88E(...) \ -diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -index a076ede5..ec90f278 100644 ---- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c -@@ -1399,19 +1399,13 @@ static int rtw_wx_get_essid(struct net_device *dev, - if ((check_fwstate(pmlmepriv, _FW_LINKED)) || - (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { - len = pcur_bss->Ssid.SsidLength; -- -- wrqu->essid.length = len; -- - memcpy(extra, pcur_bss->Ssid.Ssid, len); -- -- wrqu->essid.flags = 1; - } else { -- ret = -1; -- goto exit; -+ len = 0; -+ *extra = 0; - } -- --exit: -- -+ wrqu->essid.length = len; -+ wrqu->essid.flags = 1; - - return ret; - } -diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c -index 82a7c27c..951f2226 100644 ---- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c -+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c -@@ -47,7 +47,10 @@ static struct usb_device_id rtw_usb_id_tbl[] = { - {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ - {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ - {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ -+ {USB_DEVICE(0x2001, 0x331B)}, /* D-Link DWA-121 rev B1 */ -+ {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ - {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ -+ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ - {} /* Terminating entry */ - }; - -diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -index e9c4f973..7a8ceb96 100644 ---- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c -@@ -97,8 +97,9 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) - - switch (variable) { - case HW_VAR_BSSID: -- rtl92e_writel(dev, BSSIDR, ((u32 *)(val))[0]); -- rtl92e_writew(dev, BSSIDR+2, ((u16 *)(val+2))[0]); -+ /* BSSIDR 2 byte alignment */ -+ rtl92e_writew(dev, BSSIDR, *(u16 *)val); -+ rtl92e_writel(dev, BSSIDR + 2, *(u32 *)(val + 2)); - break; - - case HW_VAR_MEDIA_STATUS: -@@ -626,7 +627,7 @@ void rtl92e_get_eeprom_size(struct net_device *dev) - struct r8192_priv *priv = rtllib_priv(dev); - - RT_TRACE(COMP_INIT, "===========>%s()\n", __func__); -- curCR = rtl92e_readl(dev, EPROM_CMD); -+ curCR = rtl92e_readw(dev, EPROM_CMD); - RT_TRACE(COMP_INIT, "read from Reg Cmd9346CR(%x):%x\n", EPROM_CMD, - curCR); - priv->epromtype = (curCR & EPROM_CMD_9356SEL) ? EEPROM_93C56 : -@@ -963,8 +964,8 @@ static void _rtl92e_net_update(struct net_device *dev) - rtl92e_config_rate(dev, &rate_config); - priv->dot11CurrentPreambleMode = PREAMBLE_AUTO; - priv->basic_rate = rate_config &= 0x15f; -- rtl92e_writel(dev, BSSIDR, ((u32 *)net->bssid)[0]); -- rtl92e_writew(dev, BSSIDR+4, ((u16 *)net->bssid)[2]); -+ rtl92e_writew(dev, BSSIDR, *(u16 *)net->bssid); -+ rtl92e_writel(dev, BSSIDR + 2, *(u32 *)(net->bssid + 2)); - - if (priv->rtllib->iw_mode == IW_MODE_ADHOC) { - rtl92e_writew(dev, ATIMWND, 2); -@@ -1184,8 +1185,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - struct cb_desc *cb_desc, struct sk_buff *skb) - { - struct r8192_priv *priv = rtllib_priv(dev); -- dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, -- PCI_DMA_TODEVICE); -+ dma_addr_t mapping; - struct tx_fwinfo_8190pci *pTxFwInfo = NULL; - - pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data; -@@ -1196,8 +1196,6 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - pTxFwInfo->Short = _rtl92e_query_is_short(pTxFwInfo->TxHT, - pTxFwInfo->TxRate, cb_desc); - -- if (pci_dma_mapping_error(priv->pdev, mapping)) -- netdev_err(dev, "%s(): DMA Mapping error\n", __func__); - if (cb_desc->bAMPDUEnable) { - pTxFwInfo->AllowAggregation = 1; - pTxFwInfo->RxMF = cb_desc->ampdu_factor; -@@ -1232,6 +1230,14 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, - } - - memset((u8 *)pdesc, 0, 12); -+ -+ mapping = pci_map_single(priv->pdev, skb->data, skb->len, -+ PCI_DMA_TODEVICE); -+ if (pci_dma_mapping_error(priv->pdev, mapping)) { -+ netdev_err(dev, "%s(): DMA Mapping error\n", __func__); -+ return; -+ } -+ - pdesc->LINIP = 0; - pdesc->CmdInit = 1; - pdesc->Offset = sizeof(struct tx_fwinfo_8190pci) + 8; -diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c -index e06864f6..0f6bc6b8 100644 ---- a/drivers/staging/rtl8192u/r8192U_core.c -+++ b/drivers/staging/rtl8192u/r8192U_core.c -@@ -1749,6 +1749,8 @@ static short rtl8192_usb_initendpoints(struct net_device *dev) - - priv->rx_urb[16] = usb_alloc_urb(0, GFP_KERNEL); - priv->oldaddr = kmalloc(16, GFP_KERNEL); -+ if (!priv->oldaddr) -+ return -ENOMEM; - oldaddr = priv->oldaddr; - align = ((long)oldaddr) & 3; - if (align) { -diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h -index d374824c..7b16c05b 100644 ---- a/drivers/staging/rtl8712/ieee80211.h -+++ b/drivers/staging/rtl8712/ieee80211.h -@@ -143,52 +143,52 @@ struct ieee_ibss_seq { - }; - - struct ieee80211_hdr { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -+ __le16 seq_ctl; - u8 addr4[ETH_ALEN]; --} __packed; -+} __packed __aligned(2); - - struct ieee80211_hdr_3addr { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; --} __packed; -+ __le16 seq_ctl; -+} __packed __aligned(2); - - - struct ieee80211_hdr_qos { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -+ __le16 seq_ctl; - u8 addr4[ETH_ALEN]; -- u16 qc; --} __packed; -+ __le16 qc; -+} __packed __aligned(2); - - struct ieee80211_hdr_3addr_qos { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[ETH_ALEN]; - u8 addr2[ETH_ALEN]; - u8 addr3[ETH_ALEN]; -- u16 seq_ctl; -- u16 qc; -+ __le16 seq_ctl; -+ __le16 qc; - } __packed; - - struct eapol { - u8 snap[6]; -- u16 ethertype; -+ __be16 ethertype; - u8 version; - u8 type; -- u16 length; -+ __le16 length; - } __packed; - - -@@ -528,13 +528,13 @@ struct ieee80211_security { - */ - - struct ieee80211_header_data { -- u16 frame_ctl; -- u16 duration_id; -+ __le16 frame_ctl; -+ __le16 duration_id; - u8 addr1[6]; - u8 addr2[6]; - u8 addr3[6]; -- u16 seq_ctrl; --}; -+ __le16 seq_ctrl; -+} __packed __aligned(2); - - #define BEACON_PROBE_SSID_ID_POSITION 12 - -@@ -566,18 +566,18 @@ struct ieee80211_info_element { - /* - * These are the data types that can make up management packets - * -- u16 auth_algorithm; -- u16 auth_sequence; -- u16 beacon_interval; -- u16 capability; -+ __le16 auth_algorithm; -+ __le16 auth_sequence; -+ __le16 beacon_interval; -+ __le16 capability; - u8 current_ap[ETH_ALEN]; -- u16 listen_interval; -+ __le16 listen_interval; - struct { - u16 association_id:14, reserved:2; - } __packed; -- u32 time_stamp[2]; -- u16 reason; -- u16 status; -+ __le32 time_stamp[2]; -+ __le16 reason; -+ __le16 status; - */ - - #define IEEE80211_DEFAULT_TX_ESSID "Penguin" -@@ -585,16 +585,16 @@ struct ieee80211_info_element { - - struct ieee80211_authentication { - struct ieee80211_header_data header; -- u16 algorithm; -- u16 transaction; -- u16 status; -+ __le16 algorithm; -+ __le16 transaction; -+ __le16 status; - } __packed; - - struct ieee80211_probe_response { - struct ieee80211_header_data header; -- u32 time_stamp[2]; -- u16 beacon_interval; -- u16 capability; -+ __le32 time_stamp[2]; -+ __le16 beacon_interval; -+ __le16 capability; - struct ieee80211_info_element info_element; - } __packed; - -@@ -604,16 +604,16 @@ struct ieee80211_probe_request { - - struct ieee80211_assoc_request_frame { - struct ieee80211_hdr_3addr header; -- u16 capability; -- u16 listen_interval; -+ __le16 capability; -+ __le16 listen_interval; - struct ieee80211_info_element_hdr info_element; - } __packed; - - struct ieee80211_assoc_response_frame { - struct ieee80211_hdr_3addr header; -- u16 capability; -- u16 status; -- u16 aid; -+ __le16 capability; -+ __le16 status; -+ __le16 aid; - } __packed; - - struct ieee80211_txb { -diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -index edfc6805..2b348439 100644 ---- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c -@@ -199,7 +199,7 @@ static inline char *translate_scan(struct _adapter *padapter, - iwe.cmd = SIOCGIWMODE; - memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs), - 2); -- cap = le16_to_cpu(cap); -+ le16_to_cpus(&cap); - if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) { - if (cap & WLAN_CAPABILITY_BSS) - iwe.u.mode = (u32)IW_MODE_MASTER; -diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c -index 4ff53015..04ac23cc 100644 ---- a/drivers/staging/rtl8712/rtl871x_recv.c -+++ b/drivers/staging/rtl8712/rtl871x_recv.c -@@ -641,11 +641,16 @@ sint r8712_wlanhdr_to_ethhdr(union recv_frame *precvframe) - /* append rx status for mp test packets */ - ptr = recvframe_pull(precvframe, (rmv_len - - sizeof(struct ethhdr) + 2) - 24); -+ if (!ptr) -+ return _FAIL; - memcpy(ptr, get_rxmem(precvframe), 24); - ptr += 24; -- } else -+ } else { - ptr = recvframe_pull(precvframe, (rmv_len - - sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); -+ if (!ptr) -+ return _FAIL; -+ } - - memcpy(ptr, pattrib->dst, ETH_ALEN); - memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN); -diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c -index 68d65d23..d3ad89c7 100644 ---- a/drivers/staging/rtl8712/rtl871x_xmit.c -+++ b/drivers/staging/rtl8712/rtl871x_xmit.c -@@ -339,7 +339,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, - /* if in MP_STATE, update pkt_attrib from mp_txcmd, and overwrite - * some settings above.*/ - if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) -- pattrib->priority = (txdesc.txdw1 >> QSEL_SHT) & 0x1f; -+ pattrib->priority = -+ (le32_to_cpu(txdesc.txdw1) >> QSEL_SHT) & 0x1f; - return _SUCCESS; - } - -@@ -479,7 +480,7 @@ static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr, - struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct qos_priv *pqospriv = &pmlmepriv->qospriv; -- u16 *fctrl = &pwlanhdr->frame_ctl; -+ __le16 *fctrl = &pwlanhdr->frame_ctl; - - memset(hdr, 0, WLANHDR_OFFSET); - SetFrameSubType(fctrl, pattrib->subtype); -@@ -568,7 +569,7 @@ static sint r8712_put_snap(u8 *data, u16 h_proto) - snap->oui[0] = oui[0]; - snap->oui[1] = oui[1]; - snap->oui[2] = oui[2]; -- *(u16 *)(data + SNAP_SIZE) = htons(h_proto); -+ *(__be16 *)(data + SNAP_SIZE) = htons(h_proto); - return SNAP_SIZE + sizeof(u16); - } - -diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c -index a9c1e0ba..e35fbece 100644 ---- a/drivers/staging/wlan-ng/p80211netdev.c -+++ b/drivers/staging/wlan-ng/p80211netdev.c -@@ -232,7 +232,7 @@ static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb) - struct p80211_hdr_a3 *hdr; - - hdr = (struct p80211_hdr_a3 *) skb->data; -- if (p80211_rx_typedrop(wlandev, hdr->fc)) -+ if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc))) - return CONV_TO_ETHER_SKIPPED; - - /* perform mcast filtering: allow my local address through but reject -diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c -index 013a6240..c1ad0aea 100644 ---- a/drivers/staging/wlan-ng/prism2mgmt.c -+++ b/drivers/staging/wlan-ng/prism2mgmt.c -@@ -169,7 +169,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) - hw->ident_sta_fw.variant) > - HFA384x_FIRMWARE_VERSION(1, 5, 0)) { - if (msg->scantype.data != P80211ENUM_scantype_active) -- word = cpu_to_le16(msg->maxchanneltime.data); -+ word = msg->maxchanneltime.data; - else - word = 0; - -diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h -index 83430f2e..e0325706 100644 ---- a/include/linux/mmc/sdio_ids.h -+++ b/include/linux/mmc/sdio_ids.h -@@ -33,6 +33,7 @@ - #define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d - #define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335 - #define SDIO_DEVICE_ID_BROADCOM_43362 0xa962 -+#define SDIO_DEVICE_ID_BROADCOM_43364 0xa9a4 - #define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6 - #define SDIO_DEVICE_ID_BROADCOM_4345 0x4345 - #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354 -diff --git a/include/linux/nospec.h b/include/linux/nospec.h -new file mode 100644 -index 00000000..0c5ef54f ---- /dev/null -+++ b/include/linux/nospec.h -@@ -0,0 +1,68 @@ -+// SPDX-License-Identifier: GPL-2.0 -+// Copyright(c) 2018 Linus Torvalds. All rights reserved. -+// Copyright(c) 2018 Alexei Starovoitov. All rights reserved. -+// Copyright(c) 2018 Intel Corporation. All rights reserved. -+ -+#ifndef _LINUX_NOSPEC_H -+#define _LINUX_NOSPEC_H -+#include -+ -+struct task_struct; -+ -+/** -+ * array_index_mask_nospec() - generate a ~0 mask when index < size, 0 otherwise -+ * @index: array element index -+ * @size: number of elements in array -+ * -+ * When @index is out of bounds (@index >= @size), the sign bit will be -+ * set. Extend the sign bit to all bits and invert, giving a result of -+ * zero for an out of bounds index, or ~0 if within bounds [0, @size). -+ */ -+#ifndef array_index_mask_nospec -+static inline unsigned long array_index_mask_nospec(unsigned long index, -+ unsigned long size) -+{ -+ /* -+ * Always calculate and emit the mask even if the compiler -+ * thinks the mask is not needed. The compiler does not take -+ * into account the value of @index under speculation. -+ */ -+ OPTIMIZER_HIDE_VAR(index); -+ return ~(long)(index | (size - 1UL - index)) >> (BITS_PER_LONG - 1); -+} -+#endif -+ -+/* -+ * array_index_nospec - sanitize an array index after a bounds check -+ * -+ * For a code sequence like: -+ * -+ * if (index < size) { -+ * index = array_index_nospec(index, size); -+ * val = array[index]; -+ * } -+ * -+ * ...if the CPU speculates past the bounds check then -+ * array_index_nospec() will clamp the index within the range of [0, -+ * size). -+ */ -+#define array_index_nospec(index, size) \ -+({ \ -+ typeof(index) _i = (index); \ -+ typeof(size) _s = (size); \ -+ unsigned long _mask = array_index_mask_nospec(_i, _s); \ -+ \ -+ BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \ -+ BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \ -+ \ -+ (typeof(_i)) (_i & _mask); \ -+}) -+ -+/* Speculation control prctl */ -+int arch_prctl_spec_ctrl_get(struct task_struct *task, unsigned long which); -+int arch_prctl_spec_ctrl_set(struct task_struct *task, unsigned long which, -+ unsigned long ctrl); -+/* Speculation control for seccomp enforced mitigation */ -+void arch_seccomp_spec_mitigate(struct task_struct *task); -+ -+#endif /* _LINUX_NOSPEC_H */ -diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h -index 2c7bdb81..c05748cc 100644 ---- a/include/net/cfg80211.h -+++ b/include/net/cfg80211.h -@@ -933,9 +933,9 @@ enum rate_info_flags { - * @RATE_INFO_BW_160: 160 MHz bandwidth - */ - enum rate_info_bw { -+ RATE_INFO_BW_20 = 0, - RATE_INFO_BW_5, - RATE_INFO_BW_10, -- RATE_INFO_BW_20, - RATE_INFO_BW_40, - RATE_INFO_BW_80, - RATE_INFO_BW_160, -@@ -4257,6 +4257,17 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, - */ - void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss); - -+/** -+ * cfg80211_abandon_assoc - notify cfg80211 of abandoned association attempt -+ * @dev: network device -+ * @bss: The BSS entry with which association was abandoned. -+ * -+ * Call this whenever - for reasons reported through other API, like deauth RX, -+ * an association attempt was abandoned. -+ * This function may sleep. The caller must hold the corresponding wdev's mutex. -+ */ -+void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss); -+ - /** - * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame - * @dev: network device -diff --git a/include/net/mac80211.h b/include/net/mac80211.h -index 760bc4d5..ec11cb1c 100644 ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -975,7 +975,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. - * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, - * verification has been done by the hardware. -- * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. -+ * @RX_FLAG_IV_STRIPPED: The IV and ICV are stripped from this frame. - * If this flag is set, the stack cannot do any replay detection - * hence the driver or hardware will have to do that. - * @RX_FLAG_PN_VALIDATED: Currently only valid for CCMP/GCMP frames, this -@@ -1013,6 +1013,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * on this subframe - * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC - * is stored in the @ampdu_delimiter_crc field) -+ * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was -+ * done by the hardware - * @RX_FLAG_LDPC: LDPC was used - * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 - * @RX_FLAG_10MHZ: 10 MHz (half channel) was used -@@ -1029,6 +1031,11 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) - * @RX_FLAG_RADIOTAP_VENDOR_DATA: This frame contains vendor-specific - * radiotap data in the skb->data (before the frame) as described by - * the &struct ieee80211_vendor_radiotap. -+ * @RX_FLAG_ALLOW_SAME_PN: Allow the same PN as same packet before. -+ * This is used for AMSDU subframes which can have the same PN as -+ * the first subframe. -+ * @RX_FLAG_ICV_STRIPPED: The ICV is stripped from this frame. CRC checking must -+ * be done in the hardware. - */ - enum mac80211_rx_flags { - RX_FLAG_MMIC_ERROR = BIT(0), -@@ -1059,6 +1066,9 @@ enum mac80211_rx_flags { - RX_FLAG_5MHZ = BIT(29), - RX_FLAG_AMSDU_MORE = BIT(30), - RX_FLAG_RADIOTAP_VENDOR_DATA = BIT(31), -+ RX_FLAG_MIC_STRIPPED = BIT_ULL(32), -+ RX_FLAG_ALLOW_SAME_PN = BIT_ULL(33), -+ RX_FLAG_ICV_STRIPPED = BIT_ULL(34), - }; - - #define RX_FLAG_STBC_SHIFT 26 -@@ -1113,7 +1123,7 @@ struct ieee80211_rx_status { - u64 mactime; - u32 device_timestamp; - u32 ampdu_reference; -- u32 flag; -+ u64 flag; - u16 freq; - u8 vht_flag; - u8 rate_idx; -@@ -1662,6 +1672,9 @@ struct ieee80211_sta_rates { - * @supp_rates: Bitmap of supported rates (per band) - * @ht_cap: HT capabilities of this STA; restricted to our own capabilities - * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities -+ * @max_rx_aggregation_subframes: maximal amount of frames in a single AMPDU -+ * that this station is allowed to transmit to us. -+ * Can be modified by driver. - * @wme: indicates whether the STA supports QoS/WME (if local devices does, - * otherwise always false) - * @drv_priv: data area for driver use, will always be aligned to -@@ -1688,6 +1701,7 @@ struct ieee80211_sta { - u16 aid; - struct ieee80211_sta_ht_cap ht_cap; - struct ieee80211_sta_vht_cap vht_cap; -+ u8 max_rx_aggregation_subframes; - bool wme; - u8 uapsd_queues; - u8 max_sp; -@@ -2673,6 +2687,33 @@ enum ieee80211_ampdu_mlme_action { - IEEE80211_AMPDU_TX_OPERATIONAL, - }; - -+/** -+ * struct ieee80211_ampdu_params - AMPDU action parameters -+ * -+ * @action: the ampdu action, value from %ieee80211_ampdu_mlme_action. -+ * @sta: peer of this AMPDU session -+ * @tid: tid of the BA session -+ * @ssn: start sequence number of the session. TX/RX_STOP can pass 0. When -+ * action is set to %IEEE80211_AMPDU_RX_START the driver passes back the -+ * actual ssn value used to start the session and writes the value here. -+ * @buf_size: reorder buffer size (number of subframes). Valid only when the -+ * action is set to %IEEE80211_AMPDU_RX_START or -+ * %IEEE80211_AMPDU_TX_OPERATIONAL -+ * @amsdu: indicates the peer's ability to receive A-MSDU within A-MPDU. -+ * valid when the action is set to %IEEE80211_AMPDU_TX_OPERATIONAL -+ * @timeout: BA session timeout. Valid only when the action is set to -+ * %IEEE80211_AMPDU_RX_START -+ */ -+struct ieee80211_ampdu_params { -+ enum ieee80211_ampdu_mlme_action action; -+ struct ieee80211_sta *sta; -+ u16 tid; -+ u16 ssn; -+ u8 buf_size; -+ bool amsdu; -+ u16 timeout; -+}; -+ - /** - * enum ieee80211_frame_release_type - frame release reason - * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll -@@ -3017,13 +3058,9 @@ enum ieee80211_reconfig_type { - * @ampdu_action: Perform a certain A-MPDU action - * The RA/TID combination determines the destination and TID we want - * the ampdu action to be performed for. The action is defined through -- * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn) -- * is the first frame we expect to perform the action on. Notice -- * that TX/RX_STOP can pass NULL for this parameter. -- * The @buf_size parameter is only valid when the action is set to -- * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder -- * buffer size (number of subframes) for this session -- the driver -- * may neither send aggregates containing more subframes than this -+ * ieee80211_ampdu_mlme_action. -+ * When the action is set to %IEEE80211_AMPDU_TX_OPERATIONAL the driver -+ * may neither send aggregates containing more subframes than @buf_size - * nor send aggregates in a way that lost frames would exceed the - * buffer size. If just limiting the aggregate size, this would be - * possible with a buf_size of 8: -@@ -3034,9 +3071,6 @@ enum ieee80211_reconfig_type { - * buffer size of 8. Correct ways to retransmit #1 would be: - * - TX: 1 or 18 or 81 - * Even "189" would be wrong since 1 could be lost again. -- * The @amsdu parameter is valid when the action is set to -- * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's ability -- * to receive A-MSDU within A-MPDU. - * - * Returns a negative error code on failure. - * The callback can sleep. -@@ -3378,9 +3412,7 @@ struct ieee80211_ops { - int (*tx_last_beacon)(struct ieee80211_hw *hw); - int (*ampdu_action)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, u16 *ssn, -- u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - int (*get_survey)(struct ieee80211_hw *hw, int idx, - struct survey_info *survey); - void (*rfkill_poll)(struct ieee80211_hw *hw); -@@ -3866,7 +3898,7 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, - * The TX headroom reserved by mac80211 for its own tx_status functions. - * This is enough for the radiotap header. - */ --#define IEEE80211_TX_STATUS_HEADROOM 14 -+#define IEEE80211_TX_STATUS_HEADROOM ALIGN(14, 4) - - /** - * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames -diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h -index 1f0b4cf5..d3aea4f1 100644 ---- a/include/uapi/linux/nl80211.h -+++ b/include/uapi/linux/nl80211.h -@@ -2195,6 +2195,8 @@ enum nl80211_attrs { - #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS - #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS - -+#define NL80211_WIPHY_NAME_MAXLEN 64 -+ - #define NL80211_MAX_SUPP_RATES 32 - #define NL80211_MAX_SUPP_HT_RATES 77 - #define NL80211_MAX_SUPP_REG_RULES 64 -diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c -index 367784be..a830356b 100644 ---- a/net/mac80211/agg-rx.c -+++ b/net/mac80211/agg-rx.c -@@ -7,6 +7,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007, Michael Wu - * Copyright 2007-2010, Intel Corporation -+ * Copyright(c) 2015 Intel Deutschland GmbH - * - * 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 -@@ -61,6 +62,14 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, - { - struct ieee80211_local *local = sta->local; - struct tid_ampdu_rx *tid_rx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_RX_STOP, -+ .tid = tid, -+ .amsdu = false, -+ .timeout = 0, -+ .ssn = 0, -+ }; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); - -@@ -78,8 +87,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, - initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator", - (int)reason); - -- if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, -- &sta->sta, tid, NULL, 0, false)) -+ if (drv_ampdu_action(local, sta->sdata, ¶ms)) - sdata_info(sta->sdata, - "HW problem - can not stop rx aggregation for %pM tid %d\n", - sta->sta.addr, tid); -@@ -237,6 +245,15 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - { - struct ieee80211_local *local = sta->sdata->local; - struct tid_ampdu_rx *tid_agg_rx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_RX_START, -+ .tid = tid, -+ .amsdu = false, -+ .timeout = timeout, -+ .ssn = start_seq_num, -+ }; -+ - int i, ret = -EOPNOTSUPP; - u16 status = WLAN_STATUS_REQUEST_DECLINED; - -@@ -273,8 +290,12 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - buf_size = IEEE80211_MAX_AMPDU_BUF; - - /* make sure the size doesn't exceed the maximum supported by the hw */ -- if (buf_size > local->hw.max_rx_aggregation_subframes) -- buf_size = local->hw.max_rx_aggregation_subframes; -+ if (buf_size > sta->sta.max_rx_aggregation_subframes) -+ buf_size = sta->sta.max_rx_aggregation_subframes; -+ params.buf_size = buf_size; -+ -+ ht_dbg(sta->sdata, "AddBA Req buf_size=%d for %pM\n", -+ buf_size, sta->sta.addr); - - /* examine state machine */ - mutex_lock(&sta->ampdu_mlme.mtx); -@@ -322,8 +343,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta, - for (i = 0; i < buf_size; i++) - __skb_queue_head_init(&tid_agg_rx->reorder_buf[i]); - -- ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START, -- &sta->sta, tid, &start_seq_num, 0, false); -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - ht_dbg(sta->sdata, "Rx A-MPDU request on %pM tid %d result %d\n", - sta->sta.addr, tid, ret); - if (ret) { -diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c -index ff757181..4932e9f2 100644 ---- a/net/mac80211/agg-tx.c -+++ b/net/mac80211/agg-tx.c -@@ -7,6 +7,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007, Michael Wu - * Copyright 2007-2010, Intel Corporation -+ * Copyright(c) 2015 Intel Deutschland GmbH - * - * 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 -@@ -295,7 +296,14 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - { - struct ieee80211_local *local = sta->local; - struct tid_ampdu_tx *tid_tx; -- enum ieee80211_ampdu_mlme_action action; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .tid = tid, -+ .buf_size = 0, -+ .amsdu = false, -+ .timeout = 0, -+ .ssn = 0, -+ }; - int ret; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); -@@ -304,10 +312,10 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - case AGG_STOP_DECLINED: - case AGG_STOP_LOCAL_REQUEST: - case AGG_STOP_PEER_REQUEST: -- action = IEEE80211_AMPDU_TX_STOP_CONT; -+ params.action = IEEE80211_AMPDU_TX_STOP_CONT; - break; - case AGG_STOP_DESTROY_STA: -- action = IEEE80211_AMPDU_TX_STOP_FLUSH; -+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH; - break; - default: - WARN_ON_ONCE(1); -@@ -330,9 +338,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - spin_unlock_bh(&sta->lock); - if (reason != AGG_STOP_DESTROY_STA) - return -EALREADY; -- ret = drv_ampdu_action(local, sta->sdata, -- IEEE80211_AMPDU_TX_STOP_FLUSH_CONT, -- &sta->sta, tid, NULL, 0, false); -+ params.action = IEEE80211_AMPDU_TX_STOP_FLUSH_CONT; -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - WARN_ON_ONCE(ret); - return 0; - } -@@ -381,8 +388,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, - WLAN_BACK_INITIATOR; - tid_tx->tx_stop = reason == AGG_STOP_LOCAL_REQUEST; - -- ret = drv_ampdu_action(local, sta->sdata, action, -- &sta->sta, tid, NULL, 0, false); -+ ret = drv_ampdu_action(local, sta->sdata, ¶ms); - - /* HW shall not deny going back to legacy */ - if (WARN_ON(ret)) { -@@ -445,7 +451,14 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - struct tid_ampdu_tx *tid_tx; - struct ieee80211_local *local = sta->local; - struct ieee80211_sub_if_data *sdata = sta->sdata; -- u16 start_seq_num; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_TX_START, -+ .tid = tid, -+ .buf_size = 0, -+ .amsdu = false, -+ .timeout = 0, -+ }; - int ret; - - tid_tx = rcu_dereference_protected_tid_tx(sta, tid); -@@ -467,10 +480,8 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - */ - synchronize_net(); - -- start_seq_num = sta->tid_seq[tid] >> 4; -- -- ret = drv_ampdu_action(local, sdata, IEEE80211_AMPDU_TX_START, -- &sta->sta, tid, &start_seq_num, 0, false); -+ params.ssn = sta->tid_seq[tid] >> 4; -+ ret = drv_ampdu_action(local, sdata, ¶ms); - if (ret) { - ht_dbg(sdata, - "BA request denied - HW unavailable for %pM tid %d\n", -@@ -499,7 +510,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) - - /* send AddBA request */ - ieee80211_send_addba_request(sdata, sta->sta.addr, tid, -- tid_tx->dialog_token, start_seq_num, -+ tid_tx->dialog_token, params.ssn, - IEEE80211_MAX_AMPDU_BUF, - tid_tx->timeout); - } -@@ -684,18 +695,24 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local, - struct sta_info *sta, u16 tid) - { - struct tid_ampdu_tx *tid_tx; -+ struct ieee80211_ampdu_params params = { -+ .sta = &sta->sta, -+ .action = IEEE80211_AMPDU_TX_OPERATIONAL, -+ .tid = tid, -+ .timeout = 0, -+ .ssn = 0, -+ }; - - lockdep_assert_held(&sta->ampdu_mlme.mtx); - - tid_tx = rcu_dereference_protected_tid_tx(sta, tid); -+ params.buf_size = tid_tx->buf_size; -+ params.amsdu = tid_tx->amsdu; - - ht_dbg(sta->sdata, "Aggregation is on for %pM tid %d\n", - sta->sta.addr, tid); - -- drv_ampdu_action(local, sta->sdata, -- IEEE80211_AMPDU_TX_OPERATIONAL, -- &sta->sta, tid, NULL, tid_tx->buf_size, -- tid_tx->amsdu); -+ drv_ampdu_action(local, sta->sdata, ¶ms); - - /* - * synchronize with TX path, while splicing the TX path -diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c -index 19322c04..7349bf26 100644 ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -219,7 +219,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, - case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_AP_VLAN: - /* Keys without a station are used for TX only */ -- if (key->sta && test_sta_flag(key->sta, WLAN_STA_MFP)) -+ if (sta && test_sta_flag(sta, WLAN_STA_MFP)) - key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT; - break; - case NL80211_IFTYPE_ADHOC: -@@ -286,7 +286,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, - goto out_unlock; - } - -- ieee80211_key_free(key, true); -+ ieee80211_key_free(key, sdata->vif.type == NL80211_IFTYPE_STATION); - - ret = 0; - out_unlock: -@@ -1228,6 +1228,10 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, - if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) - sta->sta.tdls = true; - -+ if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION && -+ !sdata->u.mgd.associated) -+ return -EINVAL; -+ - err = sta_apply_parameters(local, sta, params); - if (err) { - sta_info_free(local, sta); -@@ -2877,7 +2881,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) - } - if (beacon->probe_resp_len) { - new_beacon->probe_resp_len = beacon->probe_resp_len; -- beacon->probe_resp = pos; -+ new_beacon->probe_resp = pos; - memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); - pos += beacon->probe_resp_len; - } -diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c -index 4d2aaebd..e546a987 100644 ---- a/net/mac80211/debugfs.c -+++ b/net/mac80211/debugfs.c -@@ -91,7 +91,7 @@ static const struct file_operations reset_ops = { - }; - #endif - --static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { -+static const char *hw_flag_names[] = { - #define FLAG(F) [IEEE80211_HW_##F] = #F - FLAG(HAS_RATE_CONTROL), - FLAG(RX_INCLUDES_FCS), -@@ -125,9 +125,6 @@ static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = { - FLAG(TDLS_WIDER_BW), - FLAG(SUPPORTS_AMSDU_IN_AMPDU), - FLAG(BEACON_TX_STATUS), -- -- /* keep last for the build bug below */ -- (void *)0x1 - #undef FLAG - }; - -@@ -147,7 +144,7 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf, - /* fail compilation if somebody adds or removes - * a flag without updating the name array above - */ -- BUILD_BUG_ON(hw_flag_names[NUM_IEEE80211_HW_FLAGS] != (void *)0x1); -+ BUILD_BUG_ON(ARRAY_SIZE(hw_flag_names) != NUM_IEEE80211_HW_FLAGS); - - for (i = 0; i < NUM_IEEE80211_HW_FLAGS; i++) { - if (test_bit(i, local->hw.flags)) -diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c -index ca1fe557..c258f104 100644 ---- a/net/mac80211/driver-ops.c -+++ b/net/mac80211/driver-ops.c -@@ -284,9 +284,7 @@ int drv_switch_vif_chanctx(struct ieee80211_local *local, - - int drv_ampdu_action(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu) -+ struct ieee80211_ampdu_params *params) - { - int ret = -EOPNOTSUPP; - -@@ -296,12 +294,10 @@ int drv_ampdu_action(struct ieee80211_local *local, - if (!check_sdata_in_driver(sdata)) - return -EIO; - -- trace_drv_ampdu_action(local, sdata, action, sta, tid, -- ssn, buf_size, amsdu); -+ trace_drv_ampdu_action(local, sdata, params); - - if (local->ops->ampdu_action) -- ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action, -- sta, tid, ssn, buf_size, amsdu); -+ ret = local->ops->ampdu_action(&local->hw, &sdata->vif, params); - - trace_drv_return_int(local, ret); - -diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h -index 154ce4b1..6019988b 100644 ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -585,9 +585,7 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local) - - int drv_ampdu_action(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu); -+ struct ieee80211_ampdu_params *params); - - static inline int drv_get_survey(struct ieee80211_local *local, int idx, - struct survey_info *survey) -@@ -1159,6 +1157,9 @@ static inline void drv_wake_tx_queue(struct ieee80211_local *local, - { - struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif); - -+ if (local->in_reconfig) -+ return; -+ - if (!check_sdata_in_driver(sdata)) - return; - -diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c -index 980e9e9b..f2af1967 100644 ---- a/net/mac80211/ibss.c -+++ b/net/mac80211/ibss.c -@@ -66,6 +66,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata, - 2 + (IEEE80211_MAX_SUPP_RATES - 8) + - 2 + sizeof(struct ieee80211_ht_cap) + - 2 + sizeof(struct ieee80211_ht_operation) + -+ 2 + sizeof(struct ieee80211_vht_cap) + -+ 2 + sizeof(struct ieee80211_vht_operation) + - ifibss->ie_len; - presp = kzalloc(sizeof(*presp) + frame_len, GFP_KERNEL); - if (!presp) -@@ -486,14 +488,14 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata, - struct beacon_data *presp, *old_presp; - struct cfg80211_bss *cbss; - const struct cfg80211_bss_ies *ies; -- u16 capability = 0; -+ u16 capability = WLAN_CAPABILITY_IBSS; - u64 tsf; - int ret = 0; - - sdata_assert_lock(sdata); - - if (ifibss->privacy) -- capability = WLAN_CAPABILITY_PRIVACY; -+ capability |= WLAN_CAPABILITY_PRIVACY; - - cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan, - ifibss->bssid, ifibss->ssid, -@@ -946,8 +948,8 @@ static void ieee80211_rx_mgmt_deauth_ibss(struct ieee80211_sub_if_data *sdata, - if (len < IEEE80211_DEAUTH_FRAME_LEN) - return; - -- ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, reason); -+ ibss_dbg(sdata, "RX DeAuth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (reason: %d)\n", mgmt->bssid, reason); - sta_info_destroy_addr(sdata, mgmt->sa); - } - -@@ -965,9 +967,9 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata, - auth_alg = le16_to_cpu(mgmt->u.auth.auth_alg); - auth_transaction = le16_to_cpu(mgmt->u.auth.auth_transaction); - -- ibss_dbg(sdata, -- "RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=%d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, auth_transaction); -+ ibss_dbg(sdata, "RX Auth SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (auth_transaction=%d)\n", -+ mgmt->bssid, auth_transaction); - - if (auth_alg != WLAN_AUTH_OPEN || auth_transaction != 1) - return; -@@ -1172,10 +1174,10 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, - rx_timestamp = drv_get_tsf(local, sdata); - } - -- ibss_dbg(sdata, -- "RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n", -+ ibss_dbg(sdata, "RX beacon SA=%pM BSSID=%pM TSF=0x%llx\n", - mgmt->sa, mgmt->bssid, -- (unsigned long long)rx_timestamp, -+ (unsigned long long)rx_timestamp); -+ ibss_dbg(sdata, "\tBCN=0x%llx diff=%lld @%lu\n", - (unsigned long long)beacon_timestamp, - (unsigned long long)(rx_timestamp - beacon_timestamp), - jiffies); -@@ -1534,9 +1536,9 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, - - tx_last_beacon = drv_tx_last_beacon(local); - -- ibss_dbg(sdata, -- "RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n", -- mgmt->sa, mgmt->da, mgmt->bssid, tx_last_beacon); -+ ibss_dbg(sdata, "RX ProbeReq SA=%pM DA=%pM\n", mgmt->sa, mgmt->da); -+ ibss_dbg(sdata, "\tBSSID=%pM (tx_last_beacon=%d)\n", -+ mgmt->bssid, tx_last_beacon); - - if (!tx_last_beacon && is_multicast_ether_addr(mgmt->da)) - return; -diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h -index 6837a46c..7b271f3d 100644 ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -682,7 +682,6 @@ struct ieee80211_if_mesh { - const struct ieee80211_mesh_sync_ops *sync_ops; - s64 sync_offset_clockdrift_max; - spinlock_t sync_offset_lock; -- bool adjusting_tbtt; - /* mesh power save */ - enum nl80211_mesh_power_mode nonpeer_pm; - int ps_peers_light_sleep; -diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c -index bcb0a1b6..519def0e 100644 ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -987,6 +987,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, - if (local->open_count == 0) - ieee80211_clear_tx_pending(local); - -+ sdata->vif.bss_conf.beacon_int = 0; -+ - /* - * If the interface goes down while suspended, presumably because - * the device was unplugged and that happens before our resume, -@@ -1441,7 +1443,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, - break; - case NL80211_IFTYPE_UNSPECIFIED: - case NUM_NL80211_IFTYPES: -- BUG(); -+ WARN_ON(1); - break; - } - -diff --git a/net/mac80211/key.c b/net/mac80211/key.c -index 44388d6a..91a4e606 100644 ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -4,6 +4,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007-2008 Johannes Berg - * Copyright 2013-2014 Intel Mobile Communications GmbH -+ * Copyright 2017 Intel Deutschland GmbH - * - * 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 -@@ -18,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include "ieee80211_i.h" - #include "driver-ops.h" -@@ -606,20 +608,54 @@ void ieee80211_key_free_unused(struct ieee80211_key *key) - ieee80211_key_free_common(key); - } - -+static bool ieee80211_key_identical(struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_key *old, -+ struct ieee80211_key *new) -+{ -+ u8 tkip_old[WLAN_KEY_LEN_TKIP], tkip_new[WLAN_KEY_LEN_TKIP]; -+ u8 *tk_old, *tk_new; -+ -+ if (!old || new->conf.keylen != old->conf.keylen) -+ return false; -+ -+ tk_old = old->conf.key; -+ tk_new = new->conf.key; -+ -+ /* -+ * In station mode, don't compare the TX MIC key, as it's never used -+ * and offloaded rekeying may not care to send it to the host. This -+ * is the case in iwlwifi, for example. -+ */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ new->conf.cipher == WLAN_CIPHER_SUITE_TKIP && -+ new->conf.keylen == WLAN_KEY_LEN_TKIP && -+ !(new->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) { -+ memcpy(tkip_old, tk_old, WLAN_KEY_LEN_TKIP); -+ memcpy(tkip_new, tk_new, WLAN_KEY_LEN_TKIP); -+ memset(tkip_old + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ memset(tkip_new + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ tk_old = tkip_old; -+ tk_new = tkip_new; -+ } -+ -+ return !crypto_memneq(tk_old, tk_new, new->conf.keylen); -+} -+ - int ieee80211_key_link(struct ieee80211_key *key, - struct ieee80211_sub_if_data *sdata, - struct sta_info *sta) - { - struct ieee80211_local *local = sdata->local; - struct ieee80211_key *old_key; -- int idx, ret; -- bool pairwise; -- -- pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; -- idx = key->conf.keyidx; -- key->local = sdata->local; -- key->sdata = sdata; -- key->sta = sta; -+ int idx = key->conf.keyidx; -+ bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; -+ /* -+ * We want to delay tailroom updates only for station - in that -+ * case it helps roaming speed, but in other cases it hurts and -+ * can cause warnings to appear. -+ */ -+ bool delay_tailroom = sdata->vif.type == NL80211_IFTYPE_STATION; -+ int ret; - - mutex_lock(&sdata->local->key_mtx); - -@@ -630,21 +666,36 @@ int ieee80211_key_link(struct ieee80211_key *key, - else - old_key = key_mtx_dereference(sdata->local, sdata->keys[idx]); - -+ /* -+ * Silently accept key re-installation without really installing the -+ * new version of the key to avoid nonce reuse or replay issues. -+ */ -+ if (ieee80211_key_identical(sdata, old_key, key)) { -+ ieee80211_key_free_unused(key); -+ ret = 0; -+ goto out; -+ } -+ -+ key->local = sdata->local; -+ key->sdata = sdata; -+ key->sta = sta; -+ - increment_tailroom_need_count(sdata); - - ieee80211_key_replace(sdata, sta, pairwise, old_key, key); -- ieee80211_key_destroy(old_key, true); -+ ieee80211_key_destroy(old_key, delay_tailroom); - - ieee80211_debugfs_key_add(key); - - if (!local->wowlan) { - ret = ieee80211_key_enable_hw_accel(key); - if (ret) -- ieee80211_key_free(key, true); -+ ieee80211_key_free(key, delay_tailroom); - } else { - ret = 0; - } - -+ out: - mutex_unlock(&sdata->local->key_mtx); - - return ret; -@@ -827,7 +878,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local, - ieee80211_key_replace(key->sdata, key->sta, - key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, - key, NULL); -- __ieee80211_key_destroy(key, true); -+ __ieee80211_key_destroy(key, key->sdata->vif.type == -+ NL80211_IFTYPE_STATION); - } - - for (i = 0; i < NUM_DEFAULT_KEYS; i++) { -@@ -837,7 +889,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local, - ieee80211_key_replace(key->sdata, key->sta, - key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, - key, NULL); -- __ieee80211_key_destroy(key, true); -+ __ieee80211_key_destroy(key, key->sdata->vif.type == -+ NL80211_IFTYPE_STATION); - } - - mutex_unlock(&local->key_mtx); -diff --git a/net/mac80211/main.c b/net/mac80211/main.c -index 175ffcf7..15d23aee 100644 ---- a/net/mac80211/main.c -+++ b/net/mac80211/main.c -@@ -253,8 +253,27 @@ static void ieee80211_restart_work(struct work_struct *work) - "%s called with hardware scan in progress\n", __func__); - - rtnl_lock(); -- list_for_each_entry(sdata, &local->interfaces, list) -+ list_for_each_entry(sdata, &local->interfaces, list) { -+ /* -+ * XXX: there may be more work for other vif types and even -+ * for station mode: a good thing would be to run most of -+ * the iface type's dependent _stop (ieee80211_mg_stop, -+ * ieee80211_ibss_stop) etc... -+ * For now, fix only the specific bug that was seen: race -+ * between csa_connection_drop_work and us. -+ */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION) { -+ /* -+ * This worker is scheduled from the iface worker that -+ * runs on mac80211's workqueue, so we can't be -+ * scheduling this worker after the cancel right here. -+ * The exception is ieee80211_chswitch_done. -+ * Then we can have a race... -+ */ -+ cancel_work_sync(&sdata->u.mgd.csa_connection_drop_work); -+ } - flush_delayed_work(&sdata->dec_tailroom_needed_wk); -+ } - ieee80211_scan_cancel(local); - ieee80211_reconfig(local); - rtnl_unlock(); -@@ -460,10 +479,7 @@ static const struct ieee80211_vht_cap mac80211_vht_capa_mod_mask = { - cpu_to_le32(IEEE80211_VHT_CAP_RXLDPC | - IEEE80211_VHT_CAP_SHORT_GI_80 | - IEEE80211_VHT_CAP_SHORT_GI_160 | -- IEEE80211_VHT_CAP_RXSTBC_1 | -- IEEE80211_VHT_CAP_RXSTBC_2 | -- IEEE80211_VHT_CAP_RXSTBC_3 | -- IEEE80211_VHT_CAP_RXSTBC_4 | -+ IEEE80211_VHT_CAP_RXSTBC_MASK | - IEEE80211_VHT_CAP_TXSTBC | - IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | - IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | -@@ -891,12 +907,17 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) - supp_ht = supp_ht || sband->ht_cap.ht_supported; - supp_vht = supp_vht || sband->vht_cap.vht_supported; - -- if (sband->ht_cap.ht_supported) -- local->rx_chains = -- max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), -- local->rx_chains); -+ if (!sband->ht_cap.ht_supported) -+ continue; - - /* TODO: consider VHT for RX chains, hopefully it's the same */ -+ local->rx_chains = -+ max(ieee80211_mcs_to_chains(&sband->ht_cap.mcs), -+ local->rx_chains); -+ -+ /* no need to mask, SM_PS_DISABLED has all bits set */ -+ sband->ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED << -+ IEEE80211_HT_CAP_SM_PS_SHIFT; - } - - /* if low-level driver supports AP, we also support VLAN */ -diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c -index f7bb6829..1cbc7bd2 100644 ---- a/net/mac80211/mesh.c -+++ b/net/mac80211/mesh.c -@@ -295,10 +295,6 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata, - /* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */ - *pos |= ifmsh->ps_peers_deep_sleep ? - IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL : 0x00; -- *pos++ |= ifmsh->adjusting_tbtt ? -- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING : 0x00; -- *pos++ = 0x00; -- - return 0; - } - -@@ -355,7 +351,7 @@ int mesh_add_vendor_ies(struct ieee80211_sub_if_data *sdata, - /* fast-forward to vendor IEs */ - offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0); - -- if (offset) { -+ if (offset < ifmsh->ie_len) { - len = ifmsh->ie_len - offset; - data = ifmsh->ie + offset; - if (skb_tailroom(skb) < len) -@@ -866,7 +862,6 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) - ifmsh->mesh_cc_id = 0; /* Disabled */ - /* register sync ops from extensible synchronization framework */ - ifmsh->sync_ops = ieee80211_mesh_sync_ops_get(ifmsh->mesh_sp_id); -- ifmsh->adjusting_tbtt = false; - ifmsh->sync_offset_clockdrift_max = 0; - set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); - ieee80211_mesh_root_setup(ifmsh); -diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c -index b6dc2d7c..466922f0 100644 ---- a/net/mac80211/mesh_hwmp.c -+++ b/net/mac80211/mesh_hwmp.c -@@ -552,6 +552,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, - forward = false; - reply = true; - target_metric = 0; -+ -+ if (SN_GT(target_sn, ifmsh->sn)) -+ ifmsh->sn = target_sn; -+ - if (time_after(jiffies, ifmsh->last_sn_update + - net_traversal_jiffies(sdata)) || - time_before(jiffies, ifmsh->last_sn_update)) { -@@ -776,7 +780,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - struct mesh_path *mpath; - u8 ttl, flags, hopcount; - const u8 *orig_addr; -- u32 orig_sn, metric, metric_txsta, interval; -+ u32 orig_sn, new_metric, orig_metric, last_hop_metric, interval; - bool root_is_gate; - - ttl = rann->rann_ttl; -@@ -787,7 +791,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - interval = le32_to_cpu(rann->rann_interval); - hopcount = rann->rann_hopcount; - hopcount++; -- metric = le32_to_cpu(rann->rann_metric); -+ orig_metric = le32_to_cpu(rann->rann_metric); - - /* Ignore our own RANNs */ - if (ether_addr_equal(orig_addr, sdata->vif.addr)) -@@ -804,7 +808,10 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - return; - } - -- metric_txsta = airtime_link_metric_get(local, sta); -+ last_hop_metric = airtime_link_metric_get(local, sta); -+ new_metric = orig_metric + last_hop_metric; -+ if (new_metric < orig_metric) -+ new_metric = MAX_METRIC; - - mpath = mesh_path_lookup(sdata, orig_addr); - if (!mpath) { -@@ -817,7 +824,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - } - - if (!(SN_LT(mpath->sn, orig_sn)) && -- !(mpath->sn == orig_sn && metric < mpath->rann_metric)) { -+ !(mpath->sn == orig_sn && new_metric < mpath->rann_metric)) { - rcu_read_unlock(); - return; - } -@@ -835,7 +842,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - } - - mpath->sn = orig_sn; -- mpath->rann_metric = metric + metric_txsta; -+ mpath->rann_metric = new_metric; - mpath->is_root = true; - /* Recording RANNs sender address to send individually - * addressed PREQs destined for root mesh STA */ -@@ -855,7 +862,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, - mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, - orig_sn, 0, NULL, 0, broadcast_addr, - hopcount, ttl, interval, -- metric + metric_txsta, 0, sdata); -+ new_metric, 0, sdata); - } - - rcu_read_unlock(); -diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c -index bd3d55eb..9f02e54a 100644 ---- a/net/mac80211/mesh_plink.c -+++ b/net/mac80211/mesh_plink.c -@@ -495,12 +495,14 @@ mesh_sta_info_alloc(struct ieee80211_sub_if_data *sdata, u8 *addr, - - /* Userspace handles station allocation */ - if (sdata->u.mesh.user_mpm || -- sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) -- cfg80211_notify_new_peer_candidate(sdata->dev, addr, -- elems->ie_start, -- elems->total_len, -- GFP_KERNEL); -- else -+ sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED) { -+ if (mesh_peer_accepts_plinks(elems) && -+ mesh_plink_availables(sdata)) -+ cfg80211_notify_new_peer_candidate(sdata->dev, addr, -+ elems->ie_start, -+ elems->total_len, -+ GFP_KERNEL); -+ } else - sta = __mesh_sta_info_alloc(sdata, addr); - - return sta; -diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c -index 64bc22ad..16ed43fe 100644 ---- a/net/mac80211/mesh_sync.c -+++ b/net/mac80211/mesh_sync.c -@@ -119,7 +119,6 @@ static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, - */ - - if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) { -- clear_sta_flag(sta, WLAN_STA_TOFFSET_KNOWN); - msync_dbg(sdata, "STA %pM : is adjusting TBTT\n", - sta->sta.addr); - goto no_sync; -@@ -168,11 +167,9 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, - struct beacon_data *beacon) - { - struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; -- u8 cap; - - WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET); - WARN_ON(!rcu_read_lock_held()); -- cap = beacon->meshconf->meshconf_cap; - - spin_lock_bh(&ifmsh->sync_offset_lock); - -@@ -186,21 +183,13 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, - "TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n", - ifmsh->sync_offset_clockdrift_max); - set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags); -- -- ifmsh->adjusting_tbtt = true; - } else { - msync_dbg(sdata, - "TBTT : max clockdrift=%lld; too small to adjust\n", - (long long)ifmsh->sync_offset_clockdrift_max); - ifmsh->sync_offset_clockdrift_max = 0; -- -- ifmsh->adjusting_tbtt = false; - } - spin_unlock_bh(&ifmsh->sync_offset_lock); -- -- beacon->meshconf->meshconf_cap = ifmsh->adjusting_tbtt ? -- IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING | cap : -- ~IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING & cap; - } - - static const struct sync_method sync_methods[] = { -diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c -index 83097c38..08384dbf 100644 ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -1021,6 +1021,10 @@ static void ieee80211_chswitch_work(struct work_struct *work) - */ - - if (sdata->reserved_chanctx) { -+ struct ieee80211_supported_band *sband = NULL; -+ struct sta_info *mgd_sta = NULL; -+ enum ieee80211_sta_rx_bandwidth bw = IEEE80211_STA_RX_BW_20; -+ - /* - * with multi-vif csa driver may call ieee80211_csa_finish() - * many times while waiting for other interfaces to use their -@@ -1029,6 +1033,48 @@ static void ieee80211_chswitch_work(struct work_struct *work) - if (sdata->reserved_ready) - goto out; - -+ if (sdata->vif.bss_conf.chandef.width != -+ sdata->csa_chandef.width) { -+ /* -+ * For managed interface, we need to also update the AP -+ * station bandwidth and align the rate scale algorithm -+ * on the bandwidth change. Here we only consider the -+ * bandwidth of the new channel definition (as channel -+ * switch flow does not have the full HT/VHT/HE -+ * information), assuming that if additional changes are -+ * required they would be done as part of the processing -+ * of the next beacon from the AP. -+ */ -+ switch (sdata->csa_chandef.width) { -+ case NL80211_CHAN_WIDTH_20_NOHT: -+ case NL80211_CHAN_WIDTH_20: -+ default: -+ bw = IEEE80211_STA_RX_BW_20; -+ break; -+ case NL80211_CHAN_WIDTH_40: -+ bw = IEEE80211_STA_RX_BW_40; -+ break; -+ case NL80211_CHAN_WIDTH_80: -+ bw = IEEE80211_STA_RX_BW_80; -+ break; -+ case NL80211_CHAN_WIDTH_80P80: -+ case NL80211_CHAN_WIDTH_160: -+ bw = IEEE80211_STA_RX_BW_160; -+ break; -+ } -+ -+ mgd_sta = sta_info_get(sdata, ifmgd->bssid); -+ sband = -+ local->hw.wiphy->bands[sdata->csa_chandef.chan->band]; -+ } -+ -+ if (sdata->vif.bss_conf.chandef.width > -+ sdata->csa_chandef.width) { -+ mgd_sta->sta.bandwidth = bw; -+ rate_control_rate_update(local, sband, mgd_sta, -+ IEEE80211_RC_BW_CHANGED); -+ } -+ - ret = ieee80211_vif_use_reserved_context(sdata); - if (ret) { - sdata_info(sdata, -@@ -1039,6 +1085,13 @@ static void ieee80211_chswitch_work(struct work_struct *work) - goto out; - } - -+ if (sdata->vif.bss_conf.chandef.width < -+ sdata->csa_chandef.width) { -+ mgd_sta->sta.bandwidth = bw; -+ rate_control_rate_update(local, sband, mgd_sta, -+ IEEE80211_RC_BW_CHANGED); -+ } -+ - goto out; - } - -@@ -1051,9 +1104,6 @@ static void ieee80211_chswitch_work(struct work_struct *work) - goto out; - } - -- /* XXX: shouldn't really modify cfg80211-owned data! */ -- ifmgd->associated->channel = sdata->csa_chandef.chan; -- - ifmgd->csa_waiting_bcn = true; - - ieee80211_sta_reset_beacon_monitor(sdata); -@@ -1833,7 +1883,8 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, - params[ac].acm = acm; - params[ac].uapsd = uapsd; - -- if (params[ac].cw_min > params[ac].cw_max) { -+ if (params[ac].cw_min == 0 || -+ params[ac].cw_min > params[ac].cw_max) { - sdata_info(sdata, - "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n", - params[ac].cw_min, params[ac].cw_max, aci); -@@ -2517,7 +2568,7 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata, - } - - static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, -- bool assoc) -+ bool assoc, bool abandon) - { - struct ieee80211_mgd_assoc_data *assoc_data = sdata->u.mgd.assoc_data; - -@@ -2539,6 +2590,9 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, - mutex_lock(&sdata->local->mtx); - ieee80211_vif_release_channel(sdata); - mutex_unlock(&sdata->local->mtx); -+ -+ if (abandon) -+ cfg80211_abandon_assoc(sdata->dev, assoc_data->bss); - } - - kfree(assoc_data); -@@ -2768,7 +2822,7 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, - bssid, reason_code, - ieee80211_get_reason_code_string(reason_code)); - -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - - cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len); - return; -@@ -3173,14 +3227,14 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, - if (status_code != WLAN_STATUS_SUCCESS) { - sdata_info(sdata, "%pM denied association (code=%d)\n", - mgmt->sa, status_code); -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - event.u.mlme.status = MLME_DENIED; - event.u.mlme.reason = status_code; - drv_event_callback(sdata->local, sdata, &event); - } else { - if (!ieee80211_assoc_success(sdata, bss, mgmt, len)) { - /* oops -- internal error -- send timeout for now */ -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - return; - } -@@ -3193,7 +3247,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, - * recalc after assoc_data is NULL but before associated - * is set can cause the interface to go idle - */ -- ieee80211_destroy_assoc_data(sdata, true); -+ ieee80211_destroy_assoc_data(sdata, true, false); - - /* get uapsd queues configuration */ - uapsd_queues = 0; -@@ -3888,7 +3942,7 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) - .u.mlme.status = MLME_TIMEOUT, - }; - -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - drv_event_callback(sdata->local, sdata, &event); - } -@@ -4029,7 +4083,7 @@ void ieee80211_mgd_quiesce(struct ieee80211_sub_if_data *sdata) - WLAN_REASON_DEAUTH_LEAVING, - false, frame_buf); - if (ifmgd->assoc_data) -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - if (ifmgd->auth_data) - ieee80211_destroy_auth_data(sdata, false); - cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf, -@@ -4323,6 +4377,10 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, - if (WARN_ON(!ifmgd->auth_data && !ifmgd->assoc_data)) - return -EINVAL; - -+ /* If a reconfig is happening, bail out */ -+ if (local->in_reconfig) -+ return -EBUSY; -+ - if (assoc) { - rcu_read_lock(); - have_sta = sta_info_get(sdata, cbss->bssid); -@@ -4905,7 +4963,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, - IEEE80211_STYPE_DEAUTH, - req->reason_code, tx, - frame_buf); -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, true); - ieee80211_report_disconnect(sdata, frame_buf, - sizeof(frame_buf), true, - req->reason_code); -@@ -4980,7 +5038,7 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) - sdata_lock(sdata); - if (ifmgd->assoc_data) { - struct cfg80211_bss *bss = ifmgd->assoc_data->bss; -- ieee80211_destroy_assoc_data(sdata, false); -+ ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); - } - if (ifmgd->auth_data) -diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c -index 04401037..b6be5194 100644 ---- a/net/mac80211/offchannel.c -+++ b/net/mac80211/offchannel.c -@@ -469,6 +469,8 @@ void ieee80211_roc_purge(struct ieee80211_local *local, - struct ieee80211_roc_work *roc, *tmp; - LIST_HEAD(tmp_list); - -+ flush_work(&local->hw_roc_start); -+ - mutex_lock(&local->mtx); - list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { - if (sdata && roc->sdata != sdata) -diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c -index 00a43a70..0402fa45 100644 ---- a/net/mac80211/pm.c -+++ b/net/mac80211/pm.c -@@ -168,6 +168,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) - break; - } - -+ flush_delayed_work(&sdata->dec_tailroom_needed_wk); - drv_remove_interface(local, sdata); - } - -diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c -index 2b528389..833ad779 100644 ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -149,6 +149,9 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local, - /* allocate extra bitmaps */ - if (status->chains) - len += 4 * hweight8(status->chains); -+ /* vendor presence bitmap */ -+ if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) -+ len += 4; - - if (ieee80211_have_rx_timestamp(status)) { - len = ALIGN(len, 8); -@@ -185,8 +188,6 @@ ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local, - if (status->flag & RX_FLAG_RADIOTAP_VENDOR_DATA) { - struct ieee80211_vendor_radiotap *rtap = (void *)skb->data; - -- /* vendor presence bitmap */ -- len += 4; - /* alignment for fixed 6-byte vendor data header */ - len = ALIGN(len, 2); - /* vendor data header */ -@@ -1109,6 +1110,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx) - return RX_CONTINUE; - - if (ieee80211_is_ctl(hdr->frame_control) || -+ ieee80211_is_nullfunc(hdr->frame_control) || - ieee80211_is_qos_nullfunc(hdr->frame_control) || - is_multicast_ether_addr(hdr->addr1)) - return RX_CONTINUE; -@@ -1455,12 +1457,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) - */ - if (!ieee80211_hw_check(&sta->local->hw, AP_LINK_PS) && - !ieee80211_has_morefrags(hdr->frame_control) && -+ !ieee80211_is_back_req(hdr->frame_control) && - !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) && - (rx->sdata->vif.type == NL80211_IFTYPE_AP || - rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) && -- /* PM bit is only checked in frames where it isn't reserved, -+ /* -+ * PM bit is only checked in frames where it isn't reserved, - * in AP mode it's reserved in non-bufferable management frames - * (cf. IEEE 802.11-2012 8.2.4.1.7 Power Management field) -+ * BAR frames should be ignored as specified in -+ * IEEE 802.11-2012 10.2.1.2. - */ - (!ieee80211_is_mgmt(hdr->frame_control) || - ieee80211_is_bufferable_mmpdu(hdr->frame_control))) { -@@ -2334,7 +2340,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) - skb_set_queue_mapping(skb, q); - - if (!--mesh_hdr->ttl) { -- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl); -+ if (!is_multicast_ether_addr(hdr->addr1)) -+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, -+ dropped_frames_ttl); - goto out; - } - -@@ -3363,6 +3371,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) - } - return true; - case NL80211_IFTYPE_MESH_POINT: -+ if (ether_addr_equal(sdata->vif.addr, hdr->addr2)) -+ return false; - if (multicast) - return true; - return ether_addr_equal(sdata->vif.addr, hdr->addr1); -@@ -3396,6 +3406,27 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) - !ether_addr_equal(bssid, hdr->addr1)) - return false; - } -+ -+ /* -+ * 802.11-2016 Table 9-26 says that for data frames, A1 must be -+ * the BSSID - we've checked that already but may have accepted -+ * the wildcard (ff:ff:ff:ff:ff:ff). -+ * -+ * It also says: -+ * The BSSID of the Data frame is determined as follows: -+ * a) If the STA is contained within an AP or is associated -+ * with an AP, the BSSID is the address currently in use -+ * by the STA contained in the AP. -+ * -+ * So we should not accept data frames with an address that's -+ * multicast. -+ * -+ * Accepting it also opens a security problem because stations -+ * could encrypt it with the GTK and inject traffic that way. -+ */ -+ if (ieee80211_is_data(hdr->frame_control) && multicast) -+ return false; -+ - return true; - case NL80211_IFTYPE_WDS: - if (bssid || !ieee80211_is_data(hdr->frame_control)) -diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c -index 67066d04..7e7b9ef2 100644 ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -329,6 +329,9 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, - - memcpy(sta->addr, addr, ETH_ALEN); - memcpy(sta->sta.addr, addr, ETH_ALEN); -+ sta->sta.max_rx_aggregation_subframes = -+ local->hw.max_rx_aggregation_subframes; -+ - sta->local = local; - sta->sdata = sdata; - sta->rx_stats.last_rx = jiffies; -@@ -658,7 +661,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) - } - - /* No need to do anything if the driver does all */ -- if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) -+ if (ieee80211_hw_check(&local->hw, AP_LINK_PS) && !local->ops->set_tim) - return; - - if (sta->dead) -diff --git a/net/mac80211/status.c b/net/mac80211/status.c -index 5bad05e9..d221300e 100644 ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -194,6 +194,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) - } - - if (ieee80211_is_action(mgmt->frame_control) && -+ !ieee80211_has_protected(mgmt->frame_control) && - mgmt->u.action.category == WLAN_CATEGORY_HT && - mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS && - ieee80211_sdata_running(sdata)) { -@@ -465,11 +466,6 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, - if (!skb) - return; - -- if (dropped) { -- dev_kfree_skb_any(skb); -- return; -- } -- - if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) { - u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; - struct ieee80211_sub_if_data *sdata; -@@ -490,6 +486,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, - } - rcu_read_unlock(); - -+ dev_kfree_skb_any(skb); -+ } else if (dropped) { - dev_kfree_skb_any(skb); - } else { - /* consumes skb */ -@@ -650,6 +648,8 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw, - /* Track when last TDLS packet was ACKed */ - if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) - sta->status_stats.last_tdls_pkt_time = jiffies; -+ } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { -+ return; - } else { - ieee80211_lost_packet(sta, info); - } -diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h -index 56c6d6cf..913e959b 100644 ---- a/net/mac80211/trace.h -+++ b/net/mac80211/trace.h -@@ -80,7 +80,23 @@ - #define KEY_PR_FMT " cipher:0x%x, flags=%#x, keyidx=%d, hw_key_idx=%d" - #define KEY_PR_ARG __entry->cipher, __entry->flags, __entry->keyidx, __entry->hw_key_idx - -- -+#define AMPDU_ACTION_ENTRY __field(enum ieee80211_ampdu_mlme_action, \ -+ ieee80211_ampdu_mlme_action) \ -+ STA_ENTRY \ -+ __field(u16, tid) \ -+ __field(u16, ssn) \ -+ __field(u8, buf_size) \ -+ __field(bool, amsdu) \ -+ __field(u16, timeout) -+#define AMPDU_ACTION_ASSIGN STA_NAMED_ASSIGN(params->sta); \ -+ __entry->tid = params->tid; \ -+ __entry->ssn = params->ssn; \ -+ __entry->buf_size = params->buf_size; \ -+ __entry->amsdu = params->amsdu; \ -+ __entry->timeout = params->timeout; -+#define AMPDU_ACTION_PR_FMT STA_PR_FMT " tid %d, ssn %d, buf_size %u, amsdu %d, timeout %d" -+#define AMPDU_ACTION_PR_ARG STA_PR_ARG, __entry->tid, __entry->ssn, \ -+ __entry->buf_size, __entry->amsdu, __entry->timeout - - /* - * Tracing for driver callbacks. -@@ -970,38 +986,25 @@ DEFINE_EVENT(local_only_evt, drv_tx_last_beacon, - TRACE_EVENT(drv_ampdu_action, - TP_PROTO(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, -- enum ieee80211_ampdu_mlme_action action, -- struct ieee80211_sta *sta, u16 tid, -- u16 *ssn, u8 buf_size, bool amsdu), -+ struct ieee80211_ampdu_params *params), - -- TP_ARGS(local, sdata, action, sta, tid, ssn, buf_size, amsdu), -+ TP_ARGS(local, sdata, params), - - TP_STRUCT__entry( - LOCAL_ENTRY -- STA_ENTRY -- __field(u32, action) -- __field(u16, tid) -- __field(u16, ssn) -- __field(u8, buf_size) -- __field(bool, amsdu) - VIF_ENTRY -+ AMPDU_ACTION_ENTRY - ), - - TP_fast_assign( - LOCAL_ASSIGN; - VIF_ASSIGN; -- STA_ASSIGN; -- __entry->action = action; -- __entry->tid = tid; -- __entry->ssn = ssn ? *ssn : 0; -- __entry->buf_size = buf_size; -- __entry->amsdu = amsdu; -+ AMPDU_ACTION_ASSIGN; - ), - - TP_printk( -- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " action:%d tid:%d buf:%d amsdu:%d", -- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, -- __entry->tid, __entry->buf_size, __entry->amsdu -+ LOCAL_PR_FMT VIF_PR_FMT AMPDU_ACTION_PR_FMT, -+ LOCAL_PR_ARG, VIF_PR_ARG, AMPDU_ACTION_PR_ARG - ) - ); - -diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c -index e1225b39..41f3eb56 100644 ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -431,8 +431,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) - if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) - info->hw_queue = tx->sdata->vif.cab_queue; - -- /* no stations in PS mode */ -- if (!atomic_read(&ps->num_sta_ps)) -+ /* no stations in PS mode and no buffered packets */ -+ if (!atomic_read(&ps->num_sta_ps) && skb_queue_empty(&ps->bc_buf)) - return TX_CONTINUE; - - info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM; -@@ -1599,9 +1599,16 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, - int head_need, bool may_encrypt) - { - struct ieee80211_local *local = sdata->local; -+ struct ieee80211_hdr *hdr; -+ bool enc_tailroom; - int tail_need = 0; - -- if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) { -+ hdr = (struct ieee80211_hdr *) skb->data; -+ enc_tailroom = may_encrypt && -+ (sdata->crypto_tx_tailroom_needed_cnt || -+ ieee80211_is_mgmt(hdr->frame_control)); -+ -+ if (enc_tailroom) { - tail_need = IEEE80211_ENCRYPT_TAILROOM; - tail_need -= skb_tailroom(skb); - tail_need = max_t(int, tail_need, 0); -@@ -1609,8 +1616,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, - - if (skb_cloned(skb) && - (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || -- !skb_clone_writable(skb, ETH_HLEN) || -- (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt))) -+ !skb_clone_writable(skb, ETH_HLEN) || enc_tailroom)) - I802_DEBUG_INC(local->tx_expand_skb_head_cloned); - else if (head_need || tail_need) - I802_DEBUG_INC(local->tx_expand_skb_head); -@@ -2699,7 +2705,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, - int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); - int hw_headroom = sdata->local->hw.extra_tx_headroom; - struct ethhdr eth; -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ struct ieee80211_tx_info *info; - struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; - struct ieee80211_tx_data tx; - ieee80211_tx_result r; -@@ -2761,6 +2767,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, - memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); - memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); - -+ info = IEEE80211_SKB_CB(skb); - memset(info, 0, sizeof(*info)); - info->band = fast_tx->band; - info->control.vif = &sdata->vif; -diff --git a/net/mac80211/util.c b/net/mac80211/util.c -index 33344f5a..2214c77d 100644 ---- a/net/mac80211/util.c -+++ b/net/mac80211/util.c -@@ -2006,7 +2006,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) - if (!sta->uploaded) - continue; - -- if (sta->sdata->vif.type != NL80211_IFTYPE_AP) -+ if (sta->sdata->vif.type != NL80211_IFTYPE_AP && -+ sta->sdata->vif.type != NL80211_IFTYPE_AP_VLAN) - continue; - - for (state = IEEE80211_STA_NOTEXIST; -@@ -2663,8 +2664,9 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, - - rate = cfg80211_calculate_bitrate(&ri); - if (WARN_ONCE(!rate, -- "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n", -- status->flag, status->rate_idx, status->vht_nss)) -+ "Invalid bitrate: flags=0x%llx, idx=%d, vht_nss=%d\n", -+ (unsigned long long)status->flag, status->rate_idx, -+ status->vht_nss)) - return 0; - - /* rewind from end of MPDU */ -diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c -index efa3f48f..73e8f347 100644 ---- a/net/mac80211/wep.c -+++ b/net/mac80211/wep.c -@@ -293,7 +293,8 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx) - return RX_DROP_UNUSABLE; - ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); - /* remove ICV */ -- if (pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) -+ if (!(status->flag & RX_FLAG_ICV_STRIPPED) && -+ pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN)) - return RX_DROP_UNUSABLE; - } - -diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c -index d824c389..cb439e06 100644 ---- a/net/mac80211/wpa.c -+++ b/net/mac80211/wpa.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include "ieee80211_i.h" - #include "michael.h" -@@ -152,7 +153,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) - data_len = skb->len - hdrlen - MICHAEL_MIC_LEN; - key = &rx->key->conf.key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY]; - michael_mic(key, hdr, data, data_len, mic); -- if (memcmp(mic, data + data_len, MICHAEL_MIC_LEN) != 0) -+ if (crypto_memneq(mic, data + data_len, MICHAEL_MIC_LEN)) - goto mic_fail; - - /* remove Michael MIC from payload */ -@@ -297,7 +298,8 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx) - return RX_DROP_UNUSABLE; - - /* Trim ICV */ -- skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); -+ if (!(status->flag & RX_FLAG_ICV_STRIPPED)) -+ skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); - - /* Remove IV */ - memmove(skb->data + IEEE80211_TKIP_IV_LEN, skb->data, hdrlen); -@@ -507,25 +509,31 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx, - !ieee80211_is_robust_mgmt_frame(skb)) - return RX_CONTINUE; - -- data_len = skb->len - hdrlen - IEEE80211_CCMP_HDR_LEN - mic_len; -- if (!rx->sta || data_len < 0) -- return RX_DROP_UNUSABLE; -- - if (status->flag & RX_FLAG_DECRYPTED) { - if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_CCMP_HDR_LEN)) - return RX_DROP_UNUSABLE; -+ if (status->flag & RX_FLAG_MIC_STRIPPED) -+ mic_len = 0; - } else { - if (skb_linearize(rx->skb)) - return RX_DROP_UNUSABLE; - } - -+ data_len = skb->len - hdrlen - IEEE80211_CCMP_HDR_LEN - mic_len; -+ if (!rx->sta || data_len < 0) -+ return RX_DROP_UNUSABLE; -+ - if (!(status->flag & RX_FLAG_PN_VALIDATED)) { -+ int res; -+ - ccmp_hdr2pn(pn, skb->data + hdrlen); - - queue = rx->security_idx; - -- if (memcmp(pn, key->u.ccmp.rx_pn[queue], -- IEEE80211_CCMP_PN_LEN) <= 0) { -+ res = memcmp(pn, key->u.ccmp.rx_pn[queue], -+ IEEE80211_CCMP_PN_LEN); -+ if (res < 0 || -+ (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) { - key->u.ccmp.replays++; - return RX_DROP_UNUSABLE; - } -@@ -723,8 +731,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - struct sk_buff *skb = rx->skb; - struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); - u8 pn[IEEE80211_GCMP_PN_LEN]; -- int data_len; -- int queue; -+ int data_len, queue, mic_len = IEEE80211_GCMP_MIC_LEN; - - hdrlen = ieee80211_hdrlen(hdr->frame_control); - -@@ -732,26 +739,31 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - !ieee80211_is_robust_mgmt_frame(skb)) - return RX_CONTINUE; - -- data_len = skb->len - hdrlen - IEEE80211_GCMP_HDR_LEN - -- IEEE80211_GCMP_MIC_LEN; -- if (!rx->sta || data_len < 0) -- return RX_DROP_UNUSABLE; -- - if (status->flag & RX_FLAG_DECRYPTED) { - if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_GCMP_HDR_LEN)) - return RX_DROP_UNUSABLE; -+ if (status->flag & RX_FLAG_MIC_STRIPPED) -+ mic_len = 0; - } else { - if (skb_linearize(rx->skb)) - return RX_DROP_UNUSABLE; - } - -+ data_len = skb->len - hdrlen - IEEE80211_GCMP_HDR_LEN - mic_len; -+ if (!rx->sta || data_len < 0) -+ return RX_DROP_UNUSABLE; -+ - if (!(status->flag & RX_FLAG_PN_VALIDATED)) { -+ int res; -+ - gcmp_hdr2pn(pn, skb->data + hdrlen); - - queue = rx->security_idx; - -- if (memcmp(pn, key->u.gcmp.rx_pn[queue], -- IEEE80211_GCMP_PN_LEN) <= 0) { -+ res = memcmp(pn, key->u.gcmp.rx_pn[queue], -+ IEEE80211_GCMP_PN_LEN); -+ if (res < 0 || -+ (!res && !(status->flag & RX_FLAG_ALLOW_SAME_PN))) { - key->u.gcmp.replays++; - return RX_DROP_UNUSABLE; - } -@@ -775,7 +787,7 @@ ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) - } - - /* Remove GCMP header and MIC */ -- if (pskb_trim(skb, skb->len - IEEE80211_GCMP_MIC_LEN)) -+ if (pskb_trim(skb, skb->len - mic_len)) - return RX_DROP_UNUSABLE; - memmove(skb->data + IEEE80211_GCMP_HDR_LEN, skb->data, hdrlen); - skb_pull(skb, IEEE80211_GCMP_HDR_LEN); -@@ -1044,7 +1056,7 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx) - bip_aad(skb, aad); - ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, - skb->data + 24, skb->len - 24, mic); -- if (memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_cmac.icverrors++; - return RX_DROP_UNUSABLE; - } -@@ -1094,7 +1106,7 @@ ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx) - bip_aad(skb, aad); - ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, - skb->data + 24, skb->len - 24, mic); -- if (memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ if (crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_cmac.icverrors++; - return RX_DROP_UNUSABLE; - } -@@ -1198,7 +1210,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx) - if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, - skb->data + 24, skb->len - 24, - mic) < 0 || -- memcmp(mic, mmie->mic, sizeof(mmie->mic)) != 0) { -+ crypto_memneq(mic, mmie->mic, sizeof(mmie->mic))) { - key->u.aes_gmac.icverrors++; - return RX_DROP_UNUSABLE; - } -diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig -index 44c3be9d..598d374f 100644 ---- a/net/rfkill/Kconfig -+++ b/net/rfkill/Kconfig -@@ -10,11 +10,6 @@ menuconfig RFKILL - To compile this driver as a module, choose M here: the - module will be called rfkill. - --config RFKILL_PM -- bool "Power off on suspend" -- depends on RFKILL && PM -- default y -- - # LED trigger support - config RFKILL_LEDS - bool -diff --git a/net/rfkill/core.c b/net/rfkill/core.c -index d778d993..cf5b69ab 100644 ---- a/net/rfkill/core.c -+++ b/net/rfkill/core.c -@@ -802,7 +802,7 @@ void rfkill_resume_polling(struct rfkill *rfkill) - } - EXPORT_SYMBOL(rfkill_resume_polling); - --#ifdef CONFIG_RFKILL_PM -+#ifdef CONFIG_PM_SLEEP - static int rfkill_suspend(struct device *dev) - { - struct rfkill *rfkill = to_rfkill(dev); -@@ -838,9 +838,7 @@ static struct class rfkill_class = { - .dev_release = rfkill_release, - .dev_groups = rfkill_dev_groups, - .dev_uevent = rfkill_dev_uevent, --#ifdef CONFIG_RFKILL_PM - .pm = RFKILL_PM_OPS, --#endif - }; - - bool rfkill_blocked(struct rfkill *rfkill) -diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c -index 93127220..e6e249cc 100644 ---- a/net/rfkill/rfkill-gpio.c -+++ b/net/rfkill/rfkill-gpio.c -@@ -140,13 +140,18 @@ static int rfkill_gpio_probe(struct platform_device *pdev) - - ret = rfkill_register(rfkill->rfkill_dev); - if (ret < 0) -- return ret; -+ goto err_destroy; - - platform_set_drvdata(pdev, rfkill); - - dev_info(&pdev->dev, "%s device registered.\n", rfkill->name); - - return 0; -+ -+err_destroy: -+ rfkill_destroy(rfkill->rfkill_dev); -+ -+ return ret; - } - - static int rfkill_gpio_remove(struct platform_device *pdev) -diff --git a/net/wireless/core.c b/net/wireless/core.c -index 8f0bac7e..a1e909ae 100644 ---- a/net/wireless/core.c -+++ b/net/wireless/core.c -@@ -94,6 +94,9 @@ static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev, - - ASSERT_RTNL(); - -+ if (strlen(newname) > NL80211_WIPHY_NAME_MAXLEN) -+ return -EINVAL; -+ - /* prohibit calling the thing phy%d when %d is not its number */ - sscanf(newname, PHY_NAME "%d%n", &wiphy_idx, &taken); - if (taken == strlen(newname) && wiphy_idx != rdev->wiphy_idx) { -@@ -390,6 +393,8 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv, - if (rv) - goto use_default_name; - } else { -+ int rv; -+ - use_default_name: - /* NOTE: This is *probably* safe w/out holding rtnl because of - * the restrictions on phy names. Probably this call could -@@ -397,7 +402,11 @@ use_default_name: - * phyX. But, might should add some locking and check return - * value, and use a different name if this one exists? - */ -- dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); -+ rv = dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); -+ if (rv < 0) { -+ kfree(rdev); -+ return NULL; -+ } - } - - INIT_LIST_HEAD(&rdev->wdev_list); -diff --git a/net/wireless/core.h b/net/wireless/core.h -index a618b4b8..47ea169a 100644 ---- a/net/wireless/core.h -+++ b/net/wireless/core.h -@@ -72,6 +72,7 @@ struct cfg80211_registered_device { - struct list_head bss_list; - struct rb_root bss_tree; - u32 bss_generation; -+ u32 bss_entries; - struct cfg80211_scan_request *scan_req; /* protected by RTNL */ - struct sk_buff *scan_msg; - struct cfg80211_sched_scan_request __rcu *sched_scan_req; -@@ -397,6 +398,7 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev); - void cfg80211_sme_deauth(struct wireless_dev *wdev); - void cfg80211_sme_auth_timeout(struct wireless_dev *wdev); - void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev); -+void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev); - - /* internal helpers */ - bool cfg80211_supported_cipher_suite(struct wiphy *wiphy, u32 cipher); -diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c -index fb44fa3b..c0e02f72 100644 ---- a/net/wireless/mlme.c -+++ b/net/wireless/mlme.c -@@ -149,6 +149,18 @@ void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss) - } - EXPORT_SYMBOL(cfg80211_assoc_timeout); - -+void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss) -+{ -+ struct wireless_dev *wdev = dev->ieee80211_ptr; -+ struct wiphy *wiphy = wdev->wiphy; -+ -+ cfg80211_sme_abandon_assoc(wdev); -+ -+ cfg80211_unhold_bss(bss_from_pub(bss)); -+ cfg80211_put_bss(wiphy, bss); -+} -+EXPORT_SYMBOL(cfg80211_abandon_assoc); -+ - void cfg80211_tx_mlme_mgmt(struct net_device *dev, const u8 *buf, size_t len) - { - struct wireless_dev *wdev = dev->ieee80211_ptr; -diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c -index bf65f31b..1968998e 100644 ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -302,8 +303,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { - [NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 }, - [NL80211_ATTR_PID] = { .type = NLA_U32 }, - [NL80211_ATTR_4ADDR] = { .type = NLA_U8 }, -- [NL80211_ATTR_PMKID] = { .type = NLA_BINARY, -- .len = WLAN_PMKID_LEN }, -+ [NL80211_ATTR_PMKID] = { .len = WLAN_PMKID_LEN }, - [NL80211_ATTR_DURATION] = { .type = NLA_U32 }, - [NL80211_ATTR_COOKIE] = { .type = NLA_U64 }, - [NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED }, -@@ -359,6 +359,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { - [NL80211_ATTR_SCAN_FLAGS] = { .type = NLA_U32 }, - [NL80211_ATTR_P2P_CTWINDOW] = { .type = NLA_U8 }, - [NL80211_ATTR_P2P_OPPPS] = { .type = NLA_U8 }, -+ [NL80211_ATTR_LOCAL_MESH_POWER_MODE] = {. type = NLA_U32 }, - [NL80211_ATTR_ACL_POLICY] = {. type = NLA_U32 }, - [NL80211_ATTR_MAC_ADDRS] = { .type = NLA_NESTED }, - [NL80211_ATTR_STA_CAPABILITY] = { .type = NLA_U16 }, -@@ -485,6 +486,14 @@ nl80211_plan_policy[NL80211_SCHED_SCAN_PLAN_MAX + 1] = { - [NL80211_SCHED_SCAN_PLAN_ITERATIONS] = { .type = NLA_U32 }, - }; - -+/* policy for packet pattern attributes */ -+static const struct nla_policy -+nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = { -+ [NL80211_PKTPAT_MASK] = { .type = NLA_BINARY, }, -+ [NL80211_PKTPAT_PATTERN] = { .type = NLA_BINARY, }, -+ [NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 }, -+}; -+ - static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - struct netlink_callback *cb, - struct cfg80211_registered_device **rdev, -@@ -492,21 +501,17 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - { - int err; - -- rtnl_lock(); -- - if (!cb->args[0]) { - err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize, - nl80211_fam.attrbuf, nl80211_fam.maxattr, - nl80211_policy); - if (err) -- goto out_unlock; -+ return err; - - *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -- if (IS_ERR(*wdev)) { -- err = PTR_ERR(*wdev); -- goto out_unlock; -- } -+ if (IS_ERR(*wdev)) -+ return PTR_ERR(*wdev); - *rdev = wiphy_to_rdev((*wdev)->wiphy); - /* 0 is the first index - add 1 to parse only once */ - cb->args[0] = (*rdev)->wiphy_idx + 1; -@@ -516,10 +521,8 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); - struct wireless_dev *tmp; - -- if (!wiphy) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!wiphy) -+ return -ENODEV; - *rdev = wiphy_to_rdev(wiphy); - *wdev = NULL; - -@@ -530,21 +533,11 @@ static int nl80211_prepare_wdev_dump(struct sk_buff *skb, - } - } - -- if (!*wdev) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!*wdev) -+ return -ENODEV; - } - - return 0; -- out_unlock: -- rtnl_unlock(); -- return err; --} -- --static void nl80211_finish_wdev_dump(struct cfg80211_registered_device *rdev) --{ -- rtnl_unlock(); - } - - /* IE validation */ -@@ -1887,20 +1880,22 @@ static const struct nla_policy txq_params_policy[NL80211_TXQ_ATTR_MAX + 1] = { - static int parse_txq_params(struct nlattr *tb[], - struct ieee80211_txq_params *txq_params) - { -+ u8 ac; -+ - if (!tb[NL80211_TXQ_ATTR_AC] || !tb[NL80211_TXQ_ATTR_TXOP] || - !tb[NL80211_TXQ_ATTR_CWMIN] || !tb[NL80211_TXQ_ATTR_CWMAX] || - !tb[NL80211_TXQ_ATTR_AIFS]) - return -EINVAL; - -- txq_params->ac = nla_get_u8(tb[NL80211_TXQ_ATTR_AC]); -+ ac = nla_get_u8(tb[NL80211_TXQ_ATTR_AC]); - txq_params->txop = nla_get_u16(tb[NL80211_TXQ_ATTR_TXOP]); - txq_params->cwmin = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMIN]); - txq_params->cwmax = nla_get_u16(tb[NL80211_TXQ_ATTR_CWMAX]); - txq_params->aifs = nla_get_u8(tb[NL80211_TXQ_ATTR_AIFS]); - -- if (txq_params->ac >= NL80211_NUM_ACS) -+ if (ac >= NL80211_NUM_ACS) - return -EINVAL; -- -+ txq_params->ac = array_index_nospec(ac, NL80211_NUM_ACS); - return 0; - } - -@@ -3583,6 +3578,7 @@ static int parse_station_flags(struct genl_info *info, - params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHENTICATED) | - BIT(NL80211_STA_FLAG_MFP) | - BIT(NL80211_STA_FLAG_AUTHORIZED); -+ break; - default: - return -EINVAL; - } -@@ -3884,9 +3880,10 @@ static int nl80211_dump_station(struct sk_buff *skb, - int sta_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!wdev->netdev) { - err = -EINVAL; -@@ -3922,7 +3919,7 @@ static int nl80211_dump_station(struct sk_buff *skb, - cb->args[2] = sta_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - - return err; - } -@@ -4639,9 +4636,10 @@ static int nl80211_dump_mpath(struct sk_buff *skb, - int path_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!rdev->ops->dump_mpath) { - err = -EOPNOTSUPP; -@@ -4675,7 +4673,7 @@ static int nl80211_dump_mpath(struct sk_buff *skb, - cb->args[2] = path_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return err; - } - -@@ -4835,9 +4833,10 @@ static int nl80211_dump_mpp(struct sk_buff *skb, - int path_idx = cb->args[2]; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out_err; - - if (!rdev->ops->dump_mpp) { - err = -EOPNOTSUPP; -@@ -4870,7 +4869,7 @@ static int nl80211_dump_mpp(struct sk_buff *skb, - cb->args[2] = path_idx; - err = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return err; - } - -@@ -5718,6 +5717,10 @@ static int validate_scan_freqs(struct nlattr *freqs) - struct nlattr *attr1, *attr2; - int n_channels = 0, tmp1, tmp2; - -+ nla_for_each_nested(attr1, freqs, tmp1) -+ if (nla_len(attr1) != sizeof(u32)) -+ return 0; -+ - nla_for_each_nested(attr1, freqs, tmp1) { - n_channels++; - /* -@@ -6806,9 +6809,12 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) - int start = cb->args[2], idx = 0; - int err; - -+ rtnl_lock(); - err = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); -- if (err) -+ if (err) { -+ rtnl_unlock(); - return err; -+ } - - wdev_lock(wdev); - spin_lock_bh(&rdev->bss_lock); -@@ -6831,7 +6837,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb) - wdev_unlock(wdev); - - cb->args[2] = idx; -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - - return skb->len; - } -@@ -6915,9 +6921,10 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) - int res; - bool radio_stats; - -+ rtnl_lock(); - res = nl80211_prepare_wdev_dump(skb, cb, &rdev, &wdev); - if (res) -- return res; -+ goto out_err; - - /* prepare_wdev_dump parsed the attributes */ - radio_stats = nl80211_fam.attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS]; -@@ -6958,7 +6965,7 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb) - cb->args[2] = survey_idx; - res = skb->len; - out_err: -- nl80211_finish_wdev_dump(rdev); -+ rtnl_unlock(); - return res; - } - -@@ -9415,7 +9422,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info) - u8 *mask_pat; - - nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat), -- nla_len(pat), NULL); -+ nla_len(pat), nl80211_packet_pattern_policy); - err = -EINVAL; - if (!pat_tb[NL80211_PKTPAT_MASK] || - !pat_tb[NL80211_PKTPAT_PATTERN]) -@@ -9665,7 +9672,7 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev, - u8 *mask_pat; - - nla_parse(pat_tb, MAX_NL80211_PKTPAT, nla_data(pat), -- nla_len(pat), NULL); -+ nla_len(pat), nl80211_packet_pattern_policy); - if (!pat_tb[NL80211_PKTPAT_MASK] || - !pat_tb[NL80211_PKTPAT_PATTERN]) - return -EINVAL; -@@ -9791,6 +9798,9 @@ static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) - if (err) - return err; - -+ if (!tb[NL80211_REKEY_DATA_REPLAY_CTR] || !tb[NL80211_REKEY_DATA_KEK] || -+ !tb[NL80211_REKEY_DATA_KCK]) -+ return -EINVAL; - if (nla_len(tb[NL80211_REKEY_DATA_REPLAY_CTR]) != NL80211_REPLAY_CTR_LEN) - return -ERANGE; - if (nla_len(tb[NL80211_REKEY_DATA_KEK]) != NL80211_KEK_LEN) -@@ -10004,6 +10014,7 @@ static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info) - return -EOPNOTSUPP; - - if (!info->attrs[NL80211_ATTR_MDID] || -+ !info->attrs[NL80211_ATTR_IE] || - !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE])) - return -EINVAL; - -@@ -10158,17 +10169,13 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - void *data = NULL; - unsigned int data_len = 0; - -- rtnl_lock(); -- - if (cb->args[0]) { - /* subtract the 1 again here */ - struct wiphy *wiphy = wiphy_idx_to_wiphy(cb->args[0] - 1); - struct wireless_dev *tmp; - -- if (!wiphy) { -- err = -ENODEV; -- goto out_unlock; -- } -+ if (!wiphy) -+ return -ENODEV; - *rdev = wiphy_to_rdev(wiphy); - *wdev = NULL; - -@@ -10189,13 +10196,11 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - nl80211_fam.attrbuf, nl80211_fam.maxattr, - nl80211_policy); - if (err) -- goto out_unlock; -+ return err; - - if (!nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID] || -- !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) { -- err = -EINVAL; -- goto out_unlock; -- } -+ !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) -+ return -EINVAL; - - *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -@@ -10204,10 +10209,8 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - - *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), - nl80211_fam.attrbuf); -- if (IS_ERR(*rdev)) { -- err = PTR_ERR(*rdev); -- goto out_unlock; -- } -+ if (IS_ERR(*rdev)) -+ return PTR_ERR(*rdev); - - vid = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID]); - subcmd = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]); -@@ -10220,19 +10223,15 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - if (vcmd->info.vendor_id != vid || vcmd->info.subcmd != subcmd) - continue; - -- if (!vcmd->dumpit) { -- err = -EOPNOTSUPP; -- goto out_unlock; -- } -+ if (!vcmd->dumpit) -+ return -EOPNOTSUPP; - - vcmd_idx = i; - break; - } - -- if (vcmd_idx < 0) { -- err = -EOPNOTSUPP; -- goto out_unlock; -- } -+ if (vcmd_idx < 0) -+ return -EOPNOTSUPP; - - if (nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]) { - data = nla_data(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]); -@@ -10249,9 +10248,6 @@ static int nl80211_prepare_vendor_dump(struct sk_buff *skb, - - /* keep rtnl locked in successful case */ - return 0; -- out_unlock: -- rtnl_unlock(); -- return err; - } - - static int nl80211_vendor_cmd_dump(struct sk_buff *skb, -@@ -10266,9 +10262,10 @@ static int nl80211_vendor_cmd_dump(struct sk_buff *skb, - int err; - struct nlattr *vendor_data; - -+ rtnl_lock(); - err = nl80211_prepare_vendor_dump(skb, cb, &rdev, &wdev); - if (err) -- return err; -+ goto out; - - vcmd_idx = cb->args[2]; - data = (void *)cb->args[3]; -@@ -10277,18 +10274,26 @@ static int nl80211_vendor_cmd_dump(struct sk_buff *skb, - - if (vcmd->flags & (WIPHY_VENDOR_CMD_NEED_WDEV | - WIPHY_VENDOR_CMD_NEED_NETDEV)) { -- if (!wdev) -- return -EINVAL; -+ if (!wdev) { -+ err = -EINVAL; -+ goto out; -+ } - if (vcmd->flags & WIPHY_VENDOR_CMD_NEED_NETDEV && -- !wdev->netdev) -- return -EINVAL; -+ !wdev->netdev) { -+ err = -EINVAL; -+ goto out; -+ } - - if (vcmd->flags & WIPHY_VENDOR_CMD_NEED_RUNNING) { - if (wdev->netdev && -- !netif_running(wdev->netdev)) -- return -ENETDOWN; -- if (!wdev->netdev && !wdev->p2p_started) -- return -ENETDOWN; -+ !netif_running(wdev->netdev)) { -+ err = -ENETDOWN; -+ goto out; -+ } -+ if (!wdev->netdev && !wdev->p2p_started) { -+ err = -ENETDOWN; -+ goto out; -+ } - } - } - -@@ -11716,7 +11721,7 @@ static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return; - -@@ -11868,7 +11873,7 @@ void nl80211_send_connect_result(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + req_ie_len + resp_ie_len, gfp); - if (!msg) - return; - -@@ -11908,7 +11913,7 @@ void nl80211_send_roamed(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + req_ie_len + resp_ie_len, gfp); - if (!msg) - return; - -@@ -11946,7 +11951,7 @@ void nl80211_send_disconnected(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); -+ msg = nlmsg_new(100 + ie_len, GFP_KERNEL); - if (!msg) - return; - -@@ -12023,7 +12028,7 @@ void cfg80211_notify_new_peer_candidate(struct net_device *dev, const u8 *addr, - - trace_cfg80211_notify_new_peer_candidate(dev, addr); - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + ie_len, gfp); - if (!msg) - return; - -@@ -12392,7 +12397,7 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev, - struct sk_buff *msg; - void *hdr; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return -ENOMEM; - -@@ -12435,7 +12440,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie, - - trace_cfg80211_mgmt_tx_status(wdev, cookie, ack); - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); -+ msg = nlmsg_new(100 + len, gfp); - if (!msg) - return; - -@@ -12783,6 +12788,11 @@ void cfg80211_ch_switch_notify(struct net_device *dev, - - wdev->chandef = *chandef; - wdev->preset_chandef = *chandef; -+ -+ if (wdev->iftype == NL80211_IFTYPE_STATION && -+ !WARN_ON(!wdev->current_bss)) -+ wdev->current_bss->pub.channel = chandef->chan; -+ - nl80211_ch_switch_notify(rdev, dev, chandef, GFP_KERNEL, - NL80211_CMD_CH_SWITCH_NOTIFY, 0); - } -@@ -13168,13 +13178,17 @@ static int nl80211_netlink_notify(struct notifier_block * nb, - - list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) { - bool schedule_destroy_work = false; -- bool schedule_scan_stop = false; - struct cfg80211_sched_scan_request *sched_scan_req = - rcu_dereference(rdev->sched_scan_req); - - if (sched_scan_req && notify->portid && -- sched_scan_req->owner_nlportid == notify->portid) -- schedule_scan_stop = true; -+ sched_scan_req->owner_nlportid == notify->portid) { -+ sched_scan_req->owner_nlportid = 0; -+ -+ if (rdev->ops->sched_scan_stop && -+ rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) -+ schedule_work(&rdev->sched_scan_stop_wk); -+ } - - list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) { - cfg80211_mlme_unregister_socket(wdev, notify->portid); -@@ -13205,12 +13219,6 @@ static int nl80211_netlink_notify(struct notifier_block * nb, - spin_unlock(&rdev->destroy_list_lock); - schedule_work(&rdev->destroy_work); - } -- } else if (schedule_scan_stop) { -- sched_scan_req->owner_nlportid = 0; -- -- if (rdev->ops->sched_scan_stop && -- rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_SCHED_SCAN) -- schedule_work(&rdev->sched_scan_stop_wk); - } - } - -@@ -13241,7 +13249,7 @@ void cfg80211_ft_event(struct net_device *netdev, - if (!ft_event->target_ap) - return; - -- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); -+ msg = nlmsg_new(100 + ft_event->ric_ies_len, GFP_KERNEL); - if (!msg) - return; - -diff --git a/net/wireless/reg.c b/net/wireless/reg.c -index 06d050da..429abf42 100644 ---- a/net/wireless/reg.c -+++ b/net/wireless/reg.c -@@ -780,7 +780,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range, - * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), - * however it is safe for now to assume that a frequency rule should not be - * part of a frequency's band if the start freq or end freq are off by more -- * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the -+ * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the - * 60 GHz band. - * This resolution can be lowered and should be considered as we add - * regulatory rule support for other "bands". -@@ -795,7 +795,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range, - * with the Channel starting frequency above 45 GHz. - */ - u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? -- 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; -+ 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; - if (abs(freq_khz - freq_range->start_freq_khz) <= limit) - return true; - if (abs(freq_khz - freq_range->end_freq_khz) <= limit) -@@ -2367,6 +2367,7 @@ static int regulatory_hint_core(const char *alpha2) - request->alpha2[0] = alpha2[0]; - request->alpha2[1] = alpha2[1]; - request->initiator = NL80211_REGDOM_SET_BY_CORE; -+ request->wiphy_idx = WIPHY_IDX_INVALID; - - queue_regulatory_request(request); - -diff --git a/net/wireless/scan.c b/net/wireless/scan.c -index 30f96766..8dde12a1 100644 ---- a/net/wireless/scan.c -+++ b/net/wireless/scan.c -@@ -56,7 +56,20 @@ - * also linked into the probe response struct. - */ - --#define IEEE80211_SCAN_RESULT_EXPIRE (7 * HZ) -+/* -+ * Limit the number of BSS entries stored in mac80211. Each one is -+ * a bit over 4k at most, so this limits to roughly 4-5M of memory. -+ * If somebody wants to really attack this though, they'd likely -+ * use small beacons, and only one type of frame, limiting each of -+ * the entries to a much smaller size (in order to generate more -+ * entries in total, so overhead is bigger.) -+ */ -+static int bss_entries_limit = 1000; -+module_param(bss_entries_limit, int, 0644); -+MODULE_PARM_DESC(bss_entries_limit, -+ "limit to number of scan BSS entries (per wiphy, default 1000)"); -+ -+#define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ) - - static void bss_free(struct cfg80211_internal_bss *bss) - { -@@ -136,6 +149,10 @@ static bool __cfg80211_unlink_bss(struct cfg80211_registered_device *rdev, - - list_del_init(&bss->list); - rb_erase(&bss->rbn, &rdev->bss_tree); -+ rdev->bss_entries--; -+ WARN_ONCE((rdev->bss_entries == 0) ^ list_empty(&rdev->bss_list), -+ "rdev bss entries[%d]/list[empty:%d] corruption\n", -+ rdev->bss_entries, list_empty(&rdev->bss_list)); - bss_ref_put(rdev, bss); - return true; - } -@@ -162,6 +179,40 @@ static void __cfg80211_bss_expire(struct cfg80211_registered_device *rdev, - rdev->bss_generation++; - } - -+static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev) -+{ -+ struct cfg80211_internal_bss *bss, *oldest = NULL; -+ bool ret; -+ -+ lockdep_assert_held(&rdev->bss_lock); -+ -+ list_for_each_entry(bss, &rdev->bss_list, list) { -+ if (atomic_read(&bss->hold)) -+ continue; -+ -+ if (!list_empty(&bss->hidden_list) && -+ !bss->pub.hidden_beacon_bss) -+ continue; -+ -+ if (oldest && time_before(oldest->ts, bss->ts)) -+ continue; -+ oldest = bss; -+ } -+ -+ if (WARN_ON(!oldest)) -+ return false; -+ -+ /* -+ * The callers make sure to increase rdev->bss_generation if anything -+ * gets removed (and a new entry added), so there's no need to also do -+ * it here. -+ */ -+ -+ ret = __cfg80211_unlink_bss(rdev, oldest); -+ WARN_ON(!ret); -+ return ret; -+} -+ - void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, - bool send_message) - { -@@ -687,6 +738,7 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - const u8 *ie; - int i, ssidlen; - u8 fold = 0; -+ u32 n_entries = 0; - - ies = rcu_access_pointer(new->pub.beacon_ies); - if (WARN_ON(!ies)) -@@ -710,6 +762,12 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - /* This is the bad part ... */ - - list_for_each_entry(bss, &rdev->bss_list, list) { -+ /* -+ * we're iterating all the entries anyway, so take the -+ * opportunity to validate the list length accounting -+ */ -+ n_entries++; -+ - if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid)) - continue; - if (bss->pub.channel != new->pub.channel) -@@ -738,6 +796,10 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *rdev, - new->pub.beacon_ies); - } - -+ WARN_ONCE(n_entries != rdev->bss_entries, -+ "rdev bss entries[%d]/list[len:%d] corruption\n", -+ rdev->bss_entries, n_entries); -+ - return true; - } - -@@ -890,7 +952,14 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev, - } - } - -+ if (rdev->bss_entries >= bss_entries_limit && -+ !cfg80211_bss_expire_oldest(rdev)) { -+ kfree(new); -+ goto drop; -+ } -+ - list_add_tail(&new->list, &rdev->bss_list); -+ rdev->bss_entries++; - rb_insert_bss(rdev, new); - found = new; - } -diff --git a/net/wireless/sme.c b/net/wireless/sme.c -index 8020b5b0..18b4a652 100644 ---- a/net/wireless/sme.c -+++ b/net/wireless/sme.c -@@ -39,6 +39,7 @@ struct cfg80211_conn { - CFG80211_CONN_ASSOCIATING, - CFG80211_CONN_ASSOC_FAILED, - CFG80211_CONN_DEAUTH, -+ CFG80211_CONN_ABANDON, - CFG80211_CONN_CONNECTED, - } state; - u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; -@@ -204,6 +205,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) - cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, - NULL, 0, - WLAN_REASON_DEAUTH_LEAVING, false); -+ /* fall through */ -+ case CFG80211_CONN_ABANDON: - /* free directly, disconnected event already sent */ - cfg80211_sme_free(wdev); - return 0; -@@ -423,6 +426,17 @@ void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev) - schedule_work(&rdev->conn_work); - } - -+void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev) -+{ -+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); -+ -+ if (!wdev->conn) -+ return; -+ -+ wdev->conn->state = CFG80211_CONN_ABANDON; -+ schedule_work(&rdev->conn_work); -+} -+ - static int cfg80211_sme_get_conn_ies(struct wireless_dev *wdev, - const u8 *ies, size_t ies_len, - const u8 **out_ies, size_t *out_ies_len) -diff --git a/net/wireless/util.c b/net/wireless/util.c -index baf7218c..1d239564 100644 ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -1360,7 +1360,7 @@ bool ieee80211_chandef_to_operating_class(struct cfg80211_chan_def *chandef, - u8 *op_class) - { - u8 vht_opclass; -- u16 freq = chandef->center_freq1; -+ u32 freq = chandef->center_freq1; - - if (freq >= 2412 && freq <= 2472) { - if (chandef->width > NL80211_CHAN_WIDTH_40) --- -2.17.1 - -- 2.39.5