diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/Kconfig | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mac80211.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/sdio.c | 17 |
16 files changed, 82 insertions, 38 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a1c2801ded10..7e49342bae38 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -6867,7 +6867,7 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
6867 | u32 bitmap; | 6867 | u32 bitmap; |
6868 | 6868 | ||
6869 | if (drop) { | 6869 | if (drop) { |
6870 | if (vif->type == NL80211_IFTYPE_STATION) { | 6870 | if (vif && vif->type == NL80211_IFTYPE_STATION) { |
6871 | bitmap = ~(1 << WMI_MGMT_TID); | 6871 | bitmap = ~(1 << WMI_MGMT_TID); |
6872 | list_for_each_entry(arvif, &ar->arvifs, list) { | 6872 | list_for_each_entry(arvif, &ar->arvifs, list) { |
6873 | if (arvif->vdev_type == WMI_VDEV_TYPE_STA) | 6873 | if (arvif->vdev_type == WMI_VDEV_TYPE_STA) |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1e3b5f4a4cf9..f23cb2f3d296 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1251,6 +1251,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1251 | struct ath_vif *avp = (void *)vif->drv_priv; | 1251 | struct ath_vif *avp = (void *)vif->drv_priv; |
1252 | struct ath_node *an = &avp->mcast_node; | 1252 | struct ath_node *an = &avp->mcast_node; |
1253 | 1253 | ||
1254 | mutex_lock(&sc->mutex); | ||
1254 | if (IS_ENABLED(CONFIG_ATH9K_TX99)) { | 1255 | if (IS_ENABLED(CONFIG_ATH9K_TX99)) { |
1255 | if (sc->cur_chan->nvifs >= 1) { | 1256 | if (sc->cur_chan->nvifs >= 1) { |
1256 | mutex_unlock(&sc->mutex); | 1257 | mutex_unlock(&sc->mutex); |
@@ -1259,8 +1260,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1259 | sc->tx99_vif = vif; | 1260 | sc->tx99_vif = vif; |
1260 | } | 1261 | } |
1261 | 1262 | ||
1262 | mutex_lock(&sc->mutex); | ||
1263 | |||
1264 | ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); | 1263 | ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); |
1265 | sc->cur_chan->nvifs++; | 1264 | sc->cur_chan->nvifs++; |
1266 | 1265 | ||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 230a378c26fc..7f0a5bade70a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |||
@@ -6005,7 +6005,8 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, | |||
6005 | * for subsequent chanspecs. | 6005 | * for subsequent chanspecs. |
6006 | */ | 6006 | */ |
6007 | channel->flags = IEEE80211_CHAN_NO_HT40 | | 6007 | channel->flags = IEEE80211_CHAN_NO_HT40 | |
6008 | IEEE80211_CHAN_NO_80MHZ; | 6008 | IEEE80211_CHAN_NO_80MHZ | |
6009 | IEEE80211_CHAN_NO_160MHZ; | ||
6009 | ch.bw = BRCMU_CHAN_BW_20; | 6010 | ch.bw = BRCMU_CHAN_BW_20; |
6010 | cfg->d11inf.encchspec(&ch); | 6011 | cfg->d11inf.encchspec(&ch); |
6011 | chaninfo = ch.chspec; | 6012 | chaninfo = ch.chspec; |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c index e7584b842dce..eb5db94f5745 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | |||
@@ -193,6 +193,9 @@ static void brcmu_d11ac_decchspec(struct brcmu_chan *ch) | |||
193 | } | 193 | } |
194 | break; | 194 | break; |
195 | case BRCMU_CHSPEC_D11AC_BW_160: | 195 | case BRCMU_CHSPEC_D11AC_BW_160: |
196 | ch->bw = BRCMU_CHAN_BW_160; | ||
197 | ch->sb = brcmu_maskget16(ch->chspec, BRCMU_CHSPEC_D11AC_SB_MASK, | ||
198 | BRCMU_CHSPEC_D11AC_SB_SHIFT); | ||
196 | switch (ch->sb) { | 199 | switch (ch->sb) { |
197 | case BRCMU_CHAN_SB_LLL: | 200 | case BRCMU_CHAN_SB_LLL: |
198 | ch->control_ch_num -= CH_70MHZ_APART; | 201 | ch->control_ch_num -= CH_70MHZ_APART; |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h index 2439e98431ee..7492dfb6729b 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * GPL LICENSE SUMMARY | 6 | * GPL LICENSE SUMMARY |
7 | * | 7 | * |
8 | * Copyright(c) 2017 Intel Deutschland GmbH | 8 | * Copyright(c) 2017 Intel Deutschland GmbH |
9 | * Copyright(c) 2018 Intel Corporation | ||
9 | * | 10 | * |
10 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of version 2 of the GNU General Public License as | 12 | * it under the terms of version 2 of the GNU General Public License as |
@@ -26,6 +27,7 @@ | |||
26 | * BSD LICENSE | 27 | * BSD LICENSE |
27 | * | 28 | * |
28 | * Copyright(c) 2017 Intel Deutschland GmbH | 29 | * Copyright(c) 2017 Intel Deutschland GmbH |
30 | * Copyright(c) 2018 Intel Corporation | ||
29 | * All rights reserved. | 31 | * All rights reserved. |
30 | * | 32 | * |
31 | * Redistribution and use in source and binary forms, with or without | 33 | * Redistribution and use in source and binary forms, with or without |
@@ -81,7 +83,7 @@ | |||
81 | #define ACPI_WRDS_WIFI_DATA_SIZE (ACPI_SAR_TABLE_SIZE + 2) | 83 | #define ACPI_WRDS_WIFI_DATA_SIZE (ACPI_SAR_TABLE_SIZE + 2) |
82 | #define ACPI_EWRD_WIFI_DATA_SIZE ((ACPI_SAR_PROFILE_NUM - 1) * \ | 84 | #define ACPI_EWRD_WIFI_DATA_SIZE ((ACPI_SAR_PROFILE_NUM - 1) * \ |
83 | ACPI_SAR_TABLE_SIZE + 3) | 85 | ACPI_SAR_TABLE_SIZE + 3) |
84 | #define ACPI_WGDS_WIFI_DATA_SIZE 18 | 86 | #define ACPI_WGDS_WIFI_DATA_SIZE 19 |
85 | #define ACPI_WRDD_WIFI_DATA_SIZE 2 | 87 | #define ACPI_WRDD_WIFI_DATA_SIZE 2 |
86 | #define ACPI_SPLC_WIFI_DATA_SIZE 2 | 88 | #define ACPI_SPLC_WIFI_DATA_SIZE 2 |
87 | 89 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h index 6b95d0e75889..2b8b50a77990 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h | |||
@@ -154,7 +154,11 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans, | |||
154 | const struct iwl_fw_runtime_ops *ops, void *ops_ctx, | 154 | const struct iwl_fw_runtime_ops *ops, void *ops_ctx, |
155 | struct dentry *dbgfs_dir); | 155 | struct dentry *dbgfs_dir); |
156 | 156 | ||
157 | void iwl_fw_runtime_exit(struct iwl_fw_runtime *fwrt); | 157 | static inline void iwl_fw_runtime_free(struct iwl_fw_runtime *fwrt) |
158 | { | ||
159 | kfree(fwrt->dump.d3_debug_data); | ||
160 | fwrt->dump.d3_debug_data = NULL; | ||
161 | } | ||
158 | 162 | ||
159 | void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt); | 163 | void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt); |
160 | 164 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index dade206d5511..2ba890445c35 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
@@ -893,7 +893,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) | |||
893 | IWL_DEBUG_RADIO(mvm, "Sending GEO_TX_POWER_LIMIT\n"); | 893 | IWL_DEBUG_RADIO(mvm, "Sending GEO_TX_POWER_LIMIT\n"); |
894 | 894 | ||
895 | BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS * | 895 | BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS * |
896 | ACPI_WGDS_TABLE_SIZE != ACPI_WGDS_WIFI_DATA_SIZE); | 896 | ACPI_WGDS_TABLE_SIZE + 1 != ACPI_WGDS_WIFI_DATA_SIZE); |
897 | 897 | ||
898 | BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES > IWL_NUM_GEO_PROFILES); | 898 | BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES > IWL_NUM_GEO_PROFILES); |
899 | 899 | ||
@@ -928,6 +928,11 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm) | |||
928 | return -ENOENT; | 928 | return -ENOENT; |
929 | } | 929 | } |
930 | 930 | ||
931 | static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm) | ||
932 | { | ||
933 | return -ENOENT; | ||
934 | } | ||
935 | |||
931 | static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) | 936 | static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) |
932 | { | 937 | { |
933 | return 0; | 938 | return 0; |
@@ -954,8 +959,11 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm) | |||
954 | IWL_DEBUG_RADIO(mvm, | 959 | IWL_DEBUG_RADIO(mvm, |
955 | "WRDS SAR BIOS table invalid or unavailable. (%d)\n", | 960 | "WRDS SAR BIOS table invalid or unavailable. (%d)\n", |
956 | ret); | 961 | ret); |
957 | /* if not available, don't fail and don't bother with EWRD */ | 962 | /* |
958 | return 0; | 963 | * If not available, don't fail and don't bother with EWRD. |
964 | * Return 1 to tell that we can't use WGDS either. | ||
965 | */ | ||
966 | return 1; | ||
959 | } | 967 | } |
960 | 968 | ||
961 | ret = iwl_mvm_sar_get_ewrd_table(mvm); | 969 | ret = iwl_mvm_sar_get_ewrd_table(mvm); |
@@ -968,9 +976,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm) | |||
968 | /* choose profile 1 (WRDS) as default for both chains */ | 976 | /* choose profile 1 (WRDS) as default for both chains */ |
969 | ret = iwl_mvm_sar_select_profile(mvm, 1, 1); | 977 | ret = iwl_mvm_sar_select_profile(mvm, 1, 1); |
970 | 978 | ||
971 | /* if we don't have profile 0 from BIOS, just skip it */ | 979 | /* |
980 | * If we don't have profile 0 from BIOS, just skip it. This | ||
981 | * means that SAR Geo will not be enabled either, even if we | ||
982 | * have other valid profiles. | ||
983 | */ | ||
972 | if (ret == -ENOENT) | 984 | if (ret == -ENOENT) |
973 | return 0; | 985 | return 1; |
974 | 986 | ||
975 | return ret; | 987 | return ret; |
976 | } | 988 | } |
@@ -1168,11 +1180,19 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
1168 | iwl_mvm_unref(mvm, IWL_MVM_REF_UCODE_DOWN); | 1180 | iwl_mvm_unref(mvm, IWL_MVM_REF_UCODE_DOWN); |
1169 | 1181 | ||
1170 | ret = iwl_mvm_sar_init(mvm); | 1182 | ret = iwl_mvm_sar_init(mvm); |
1171 | if (ret) | 1183 | if (ret == 0) { |
1172 | goto error; | 1184 | ret = iwl_mvm_sar_geo_init(mvm); |
1185 | } else if (ret > 0 && !iwl_mvm_sar_get_wgds_table(mvm)) { | ||
1186 | /* | ||
1187 | * If basic SAR is not available, we check for WGDS, | ||
1188 | * which should *not* be available either. If it is | ||
1189 | * available, issue an error, because we can't use SAR | ||
1190 | * Geo without basic SAR. | ||
1191 | */ | ||
1192 | IWL_ERR(mvm, "BIOS contains WGDS but no WRDS\n"); | ||
1193 | } | ||
1173 | 1194 | ||
1174 | ret = iwl_mvm_sar_geo_init(mvm); | 1195 | if (ret < 0) |
1175 | if (ret) | ||
1176 | goto error; | 1196 | goto error; |
1177 | 1197 | ||
1178 | iwl_mvm_leds_sync(mvm); | 1198 | iwl_mvm_leds_sync(mvm); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 505b0385d800..00f831d88366 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
@@ -301,8 +301,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, | |||
301 | goto out; | 301 | goto out; |
302 | } | 302 | } |
303 | 303 | ||
304 | if (changed) | 304 | if (changed) { |
305 | *changed = (resp->status == MCC_RESP_NEW_CHAN_PROFILE); | 305 | u32 status = le32_to_cpu(resp->status); |
306 | |||
307 | *changed = (status == MCC_RESP_NEW_CHAN_PROFILE || | ||
308 | status == MCC_RESP_ILLEGAL); | ||
309 | } | ||
306 | 310 | ||
307 | regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, | 311 | regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, |
308 | __le32_to_cpu(resp->n_channels), | 312 | __le32_to_cpu(resp->n_channels), |
@@ -4444,10 +4448,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, | |||
4444 | sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG); | 4448 | sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG); |
4445 | } | 4449 | } |
4446 | 4450 | ||
4447 | if (!fw_has_capa(&mvm->fw->ucode_capa, | ||
4448 | IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) | ||
4449 | return; | ||
4450 | |||
4451 | /* if beacon filtering isn't on mac80211 does it anyway */ | 4451 | /* if beacon filtering isn't on mac80211 does it anyway */ |
4452 | if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) | 4452 | if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) |
4453 | return; | 4453 | return; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index 3633f27d048a..6fc5cc1f2b5b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |||
@@ -539,9 +539,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2, | |||
539 | } | 539 | } |
540 | 540 | ||
541 | IWL_DEBUG_LAR(mvm, | 541 | IWL_DEBUG_LAR(mvm, |
542 | "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n", | 542 | "MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n", |
543 | status, mcc, mcc >> 8, mcc & 0xff, | 543 | status, mcc, mcc >> 8, mcc & 0xff, n_channels); |
544 | !!(status == MCC_RESP_NEW_CHAN_PROFILE), n_channels); | ||
545 | 544 | ||
546 | exit: | 545 | exit: |
547 | iwl_free_resp(&cmd); | 546 | iwl_free_resp(&cmd); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 0e2092526fae..af3fba10abc1 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -858,6 +858,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
858 | iwl_mvm_thermal_exit(mvm); | 858 | iwl_mvm_thermal_exit(mvm); |
859 | out_free: | 859 | out_free: |
860 | iwl_fw_flush_dump(&mvm->fwrt); | 860 | iwl_fw_flush_dump(&mvm->fwrt); |
861 | iwl_fw_runtime_free(&mvm->fwrt); | ||
861 | 862 | ||
862 | if (iwlmvm_mod_params.init_dbg) | 863 | if (iwlmvm_mod_params.init_dbg) |
863 | return op_mode; | 864 | return op_mode; |
@@ -910,6 +911,7 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode) | |||
910 | 911 | ||
911 | iwl_mvm_tof_clean(mvm); | 912 | iwl_mvm_tof_clean(mvm); |
912 | 913 | ||
914 | iwl_fw_runtime_free(&mvm->fwrt); | ||
913 | mutex_destroy(&mvm->mutex); | 915 | mutex_destroy(&mvm->mutex); |
914 | mutex_destroy(&mvm->d0i3_suspend_mutex); | 916 | mutex_destroy(&mvm->d0i3_suspend_mutex); |
915 | 917 | ||
diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig index 0ccbcd7e887d..c30d8f5bbf2a 100644 --- a/drivers/net/wireless/mediatek/mt76/Kconfig +++ b/drivers/net/wireless/mediatek/mt76/Kconfig | |||
@@ -1,6 +1,12 @@ | |||
1 | config MT76_CORE | 1 | config MT76_CORE |
2 | tristate | 2 | tristate |
3 | 3 | ||
4 | config MT76_LEDS | ||
5 | bool | ||
6 | depends on MT76_CORE | ||
7 | depends on LEDS_CLASS=y || MT76_CORE=LEDS_CLASS | ||
8 | default y | ||
9 | |||
4 | config MT76_USB | 10 | config MT76_USB |
5 | tristate | 11 | tristate |
6 | depends on MT76_CORE | 12 | depends on MT76_CORE |
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 2a699e8b79bf..7d219ff2d480 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c | |||
@@ -345,9 +345,11 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, | |||
345 | mt76_check_sband(dev, NL80211_BAND_2GHZ); | 345 | mt76_check_sband(dev, NL80211_BAND_2GHZ); |
346 | mt76_check_sband(dev, NL80211_BAND_5GHZ); | 346 | mt76_check_sband(dev, NL80211_BAND_5GHZ); |
347 | 347 | ||
348 | ret = mt76_led_init(dev); | 348 | if (IS_ENABLED(CONFIG_MT76_LEDS)) { |
349 | if (ret) | 349 | ret = mt76_led_init(dev); |
350 | return ret; | 350 | if (ret) |
351 | return ret; | ||
352 | } | ||
351 | 353 | ||
352 | return ieee80211_register_hw(hw); | 354 | return ieee80211_register_hw(hw); |
353 | } | 355 | } |
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h index 47c42c607964..7806963b1905 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h | |||
@@ -71,7 +71,6 @@ struct mt76x02_dev { | |||
71 | struct mac_address macaddr_list[8]; | 71 | struct mac_address macaddr_list[8]; |
72 | 72 | ||
73 | struct mutex phy_mutex; | 73 | struct mutex phy_mutex; |
74 | struct mutex mutex; | ||
75 | 74 | ||
76 | u8 txdone_seq; | 75 | u8 txdone_seq; |
77 | DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status); | 76 | DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status); |
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c index 3824290b219d..fd125722d1fb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | |||
@@ -507,8 +507,10 @@ int mt76x2_register_device(struct mt76x02_dev *dev) | |||
507 | mt76x2_dfs_init_detector(dev); | 507 | mt76x2_dfs_init_detector(dev); |
508 | 508 | ||
509 | /* init led callbacks */ | 509 | /* init led callbacks */ |
510 | dev->mt76.led_cdev.brightness_set = mt76x2_led_set_brightness; | 510 | if (IS_ENABLED(CONFIG_MT76_LEDS)) { |
511 | dev->mt76.led_cdev.blink_set = mt76x2_led_set_blink; | 511 | dev->mt76.led_cdev.brightness_set = mt76x2_led_set_brightness; |
512 | dev->mt76.led_cdev.blink_set = mt76x2_led_set_blink; | ||
513 | } | ||
512 | 514 | ||
513 | ret = mt76_register_device(&dev->mt76, true, mt76x02_rates, | 515 | ret = mt76_register_device(&dev->mt76, true, mt76x02_rates, |
514 | ARRAY_SIZE(mt76x02_rates)); | 516 | ARRAY_SIZE(mt76x02_rates)); |
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c index 034a06295668..3f001bd6806c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | |||
@@ -272,9 +272,9 @@ mt76x2_set_rts_threshold(struct ieee80211_hw *hw, u32 val) | |||
272 | if (val != ~0 && val > 0xffff) | 272 | if (val != ~0 && val > 0xffff) |
273 | return -EINVAL; | 273 | return -EINVAL; |
274 | 274 | ||
275 | mutex_lock(&dev->mutex); | 275 | mutex_lock(&dev->mt76.mutex); |
276 | mt76x2_mac_set_tx_protection(dev, val); | 276 | mt76x2_mac_set_tx_protection(dev, val); |
277 | mutex_unlock(&dev->mutex); | 277 | mutex_unlock(&dev->mt76.mutex); |
278 | 278 | ||
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index 4c2154b9e6a3..bd10165d7eec 100644 --- a/drivers/net/wireless/ti/wlcore/sdio.c +++ b/drivers/net/wireless/ti/wlcore/sdio.c | |||
@@ -285,7 +285,7 @@ static int wl1271_probe(struct sdio_func *func, | |||
285 | struct resource res[2]; | 285 | struct resource res[2]; |
286 | mmc_pm_flag_t mmcflags; | 286 | mmc_pm_flag_t mmcflags; |
287 | int ret = -ENOMEM; | 287 | int ret = -ENOMEM; |
288 | int irq, wakeirq; | 288 | int irq, wakeirq, num_irqs; |
289 | const char *chip_family; | 289 | const char *chip_family; |
290 | 290 | ||
291 | /* We are only able to handle the wlan function */ | 291 | /* We are only able to handle the wlan function */ |
@@ -353,12 +353,17 @@ static int wl1271_probe(struct sdio_func *func, | |||
353 | irqd_get_trigger_type(irq_get_irq_data(irq)); | 353 | irqd_get_trigger_type(irq_get_irq_data(irq)); |
354 | res[0].name = "irq"; | 354 | res[0].name = "irq"; |
355 | 355 | ||
356 | res[1].start = wakeirq; | ||
357 | res[1].flags = IORESOURCE_IRQ | | ||
358 | irqd_get_trigger_type(irq_get_irq_data(wakeirq)); | ||
359 | res[1].name = "wakeirq"; | ||
360 | 356 | ||
361 | ret = platform_device_add_resources(glue->core, res, ARRAY_SIZE(res)); | 357 | if (wakeirq > 0) { |
358 | res[1].start = wakeirq; | ||
359 | res[1].flags = IORESOURCE_IRQ | | ||
360 | irqd_get_trigger_type(irq_get_irq_data(wakeirq)); | ||
361 | res[1].name = "wakeirq"; | ||
362 | num_irqs = 2; | ||
363 | } else { | ||
364 | num_irqs = 1; | ||
365 | } | ||
366 | ret = platform_device_add_resources(glue->core, res, num_irqs); | ||
362 | if (ret) { | 367 | if (ret) { |
363 | dev_err(glue->dev, "can't add resources\n"); | 368 | dev_err(glue->dev, "can't add resources\n"); |
364 | goto out_dev_put; | 369 | goto out_dev_put; |