Index: backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath10k/ahb.c =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/drivers/net/wireless/ath/ath10k/ahb.c +++ backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath10k/ahb.c @@ -180,40 +180,35 @@ static int ath10k_ahb_rst_ctrl_init(stru dev = &ar_ahb->pdev->dev; - ar_ahb->core_cold_rst = devm_reset_control_get_exclusive(dev, - "wifi_core_cold"); + ar_ahb->core_cold_rst = devm_reset_control_get(dev, "wifi_core_cold"); if (IS_ERR(ar_ahb->core_cold_rst)) { ath10k_err(ar, "failed to get core cold rst ctrl: %ld\n", PTR_ERR(ar_ahb->core_cold_rst)); return PTR_ERR(ar_ahb->core_cold_rst); } - ar_ahb->radio_cold_rst = devm_reset_control_get_exclusive(dev, - "wifi_radio_cold"); + ar_ahb->radio_cold_rst = devm_reset_control_get(dev, "wifi_radio_cold"); if (IS_ERR(ar_ahb->radio_cold_rst)) { ath10k_err(ar, "failed to get radio cold rst ctrl: %ld\n", PTR_ERR(ar_ahb->radio_cold_rst)); return PTR_ERR(ar_ahb->radio_cold_rst); } - ar_ahb->radio_warm_rst = devm_reset_control_get_exclusive(dev, - "wifi_radio_warm"); + ar_ahb->radio_warm_rst = devm_reset_control_get(dev, "wifi_radio_warm"); if (IS_ERR(ar_ahb->radio_warm_rst)) { ath10k_err(ar, "failed to get radio warm rst ctrl: %ld\n", PTR_ERR(ar_ahb->radio_warm_rst)); return PTR_ERR(ar_ahb->radio_warm_rst); } - ar_ahb->radio_srif_rst = devm_reset_control_get_exclusive(dev, - "wifi_radio_srif"); + ar_ahb->radio_srif_rst = devm_reset_control_get(dev, "wifi_radio_srif"); if (IS_ERR(ar_ahb->radio_srif_rst)) { ath10k_err(ar, "failed to get radio srif rst ctrl: %ld\n", PTR_ERR(ar_ahb->radio_srif_rst)); return PTR_ERR(ar_ahb->radio_srif_rst); } - ar_ahb->cpu_init_rst = devm_reset_control_get_exclusive(dev, - "wifi_cpu_init"); + ar_ahb->cpu_init_rst = devm_reset_control_get(dev, "wifi_cpu_init"); if (IS_ERR(ar_ahb->cpu_init_rst)) { ath10k_err(ar, "failed to get cpu init rst ctrl: %ld\n", PTR_ERR(ar_ahb->cpu_init_rst)); Index: backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath11k/Kconfig =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/drivers/net/wireless/ath/ath11k/Kconfig +++ backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath11k/Kconfig @@ -7,7 +7,6 @@ config ATH11K depends on CRYPTO_MICHAEL_MIC depends on ARCH_QCOM || COMPILE_TEST select ATH_COMMON - depends on QCOM_QMI_HELPERS ---help--- This module adds support for Qualcomm Technologies 802.11ax family of chipsets. Index: backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath11k/wmi.h =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/drivers/net/wireless/ath/ath11k/wmi.h +++ backports-20200415-4.4.60-9de9a9b19d3f/drivers/net/wireless/ath/ath11k/wmi.h @@ -44,7 +44,7 @@ struct wmi_tlv { #define WMI_TLV_LEN GENMASK(15, 0) #define WMI_TLV_TAG GENMASK(31, 16) -#define TLV_HDR_SIZE sizeof_field(struct wmi_tlv, header) +#define TLV_HDR_SIZE FIELD_SIZEOF(struct wmi_tlv, header) #define WMI_CMD_HDR_CMD_ID GENMASK(23, 0) #define WMI_MAX_MEM_REQS 32 Index: backports-20200415-4.4.60-9de9a9b19d3f/include/linux/backport-refcount.h =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/include/linux/backport-refcount.h +++ backports-20200415-4.4.60-9de9a9b19d3f/include/linux/backport-refcount.h @@ -180,30 +180,9 @@ static inline __must_check bool refcount return old; } -/** - * refcount_add - add a value to a refcount - * @i: the value to add to the refcount - * @r: the refcount - * - * Similar to atomic_add(), but will saturate at REFCOUNT_SATURATED and WARN. - * - * Provides no memory ordering, it is assumed the caller has guaranteed the - * object memory to be stable (RCU, etc.). It does provide a control dependency - * and thereby orders future stores. See the comment on top. - * - * Use of this function is not recommended for the normal reference counting - * use case in which references are taken and released one at a time. In these - * cases, refcount_inc(), or one of its variants, should instead be used to - * increment a reference count. - */ static inline void refcount_add(int i, refcount_t *r) { - int old = atomic_fetch_add_relaxed(i, &r->refs); - - if (unlikely(!old)) - refcount_warn_saturate(r, REFCOUNT_ADD_UAF); - else if (unlikely(old < 0 || old + i < 0)) - refcount_warn_saturate(r, REFCOUNT_ADD_OVF); + atomic_add(i, &r->refs); } /** @@ -241,39 +220,9 @@ static inline void refcount_inc(refcount refcount_add(1, r); } -/** - * refcount_sub_and_test - subtract from a refcount and test if it is 0 - * @i: amount to subtract from the refcount - * @r: the refcount - * - * Similar to atomic_dec_and_test(), but it will WARN, return false and - * ultimately leak on underflow and will fail to decrement when saturated - * at REFCOUNT_SATURATED. - * - * Provides release memory ordering, such that prior loads and stores are done - * before, and provides an acquire ordering on success such that free() - * must come after. - * - * Use of this function is not recommended for the normal reference counting - * use case in which references are taken and released one at a time. In these - * cases, refcount_dec(), or one of its variants, should instead be used to - * decrement a reference count. - * - * Return: true if the resulting refcount is 0, false otherwise - */ static inline __must_check bool refcount_sub_and_test(int i, refcount_t *r) { - int old = atomic_fetch_sub_release(i, &r->refs); - - if (old == i) { - smp_acquire__after_ctrl_dep(); - return true; - } - - if (unlikely(old < 0 || old - i < 0)) - refcount_warn_saturate(r, REFCOUNT_SUB_UAF); - - return false; + return atomic_sub_and_test(i, &r->refs); } /** @@ -294,20 +243,9 @@ static inline __must_check bool refcount return refcount_sub_and_test(1, r); } -/** - * refcount_dec - decrement a refcount - * @r: the refcount - * - * Similar to atomic_dec(), it will WARN on underflow and fail to decrement - * when saturated at REFCOUNT_SATURATED. - * - * Provides release memory ordering, such that prior loads and stores are done - * before. - */ static inline void refcount_dec(refcount_t *r) { - if (unlikely(atomic_fetch_sub_release(1, &r->refs) <= 1)) - refcount_warn_saturate(r, REFCOUNT_DEC_LEAK); + atomic_dec(&r->refs); } extern __must_check bool refcount_dec_if_one(refcount_t *r); Index: backports-20200415-4.4.60-9de9a9b19d3f/net/wireless/nl80211.c =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/net/wireless/nl80211.c +++ backports-20200415-4.4.60-9de9a9b19d3f/net/wireless/nl80211.c @@ -31,6 +31,8 @@ #include "reg.h" #include "rdev-ops.h" +#define VLAN_N_VID 4096 + static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev, struct genl_info *info, struct cfg80211_crypto_settings *settings, @@ -13160,7 +13162,7 @@ static int nl80211_vendor_check_policy(c return -EINVAL; } - return nla_validate_nested(attr, vcmd->maxattr, vcmd->policy, extack); + return 0; } static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info) Index: backports-20200415-4.4.60-9de9a9b19d3f/backport-include/linux/pm_qos.h =================================================================== --- backports-20200415-4.4.60-9de9a9b19d3f.orig/backport-include/linux/pm_qos.h +++ backports-20200415-4.4.60-9de9a9b19d3f/backport-include/linux/pm_qos.h @@ -41,5 +41,4 @@ static inline s32 cpu_latency_qos_limit( return pm_qos_request(PM_QOS_CPU_DMA_LATENCY); } #endif /* < 5.7 */ - #endif /* _COMPAT_LINUX_PM_QOS_H */