sync with upstream changes

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2020-10-23 11:38:05 +02:00
parent 33b89f4a1b
commit 4d019c9672
9 changed files with 13 additions and 21 deletions
+2 -2
View File
@@ -290,8 +290,8 @@ void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
{ {
struct mt76_rx_tid *tid = NULL; struct mt76_rx_tid *tid = NULL;
rcu_swap_protected(wcid->aggr[tidno], tid, tid = rcu_replace_pointer(wcid->aggr[tidno], tid,
lockdep_is_held(&dev->mutex)); lockdep_is_held(&dev->mutex));
if (tid) { if (tid) {
mt76_rx_aggr_shutdown(dev, tid); mt76_rx_aggr_shutdown(dev, tid);
kfree_rcu(tid, rcu_head); kfree_rcu(tid, rcu_head);
+1 -1
View File
@@ -97,7 +97,7 @@ mt76_eeprom_override(struct mt76_dev *dev)
if (np) if (np)
mac = of_get_mac_address(np); mac = of_get_mac_address(np);
if (!IS_ERR_OR_NULL(mac)) if (!IS_ERR_OR_NULL(mac))
memcpy(dev->macaddr, mac, ETH_ALEN); ether_addr_copy(dev->macaddr, mac);
#endif #endif
if (!is_valid_ether_addr(dev->macaddr)) { if (!is_valid_ether_addr(dev->macaddr)) {
+2 -3
View File
@@ -2,7 +2,7 @@
/* /*
* Copyright (C) 2016 Felix Fietkau <[email protected]> * Copyright (C) 2016 Felix Fietkau <[email protected]>
*/ */
#include <uapi/linux/sched/types.h> #include <linux/sched.h>
#include <linux/of.h> #include <linux/of.h>
#include "mt76.h" #include "mt76.h"
@@ -454,7 +454,6 @@ EXPORT_SYMBOL_GPL(mt76_alloc_device);
int mt76_register_device(struct mt76_dev *dev, bool vht, int mt76_register_device(struct mt76_dev *dev, bool vht,
struct ieee80211_rate *rates, int n_rates) struct ieee80211_rate *rates, int n_rates)
{ {
struct sched_param sparam = {.sched_priority = 1};
struct ieee80211_hw *hw = dev->hw; struct ieee80211_hw *hw = dev->hw;
struct mt76_phy *phy = &dev->phy; struct mt76_phy *phy = &dev->phy;
int ret; int ret;
@@ -489,7 +488,7 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
return ret; return ret;
WARN_ON(mt76_worker_setup(hw, &dev->tx_worker, NULL, "tx")); WARN_ON(mt76_worker_setup(hw, &dev->tx_worker, NULL, "tx"));
sched_setscheduler(dev->tx_worker.task, SCHED_FIFO, &sparam); sched_set_fifo_low(dev->tx_worker.task);
return 0; return 0;
} }
+2 -11
View File
@@ -1,15 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
obj-m += mt7603e.o
CHECK_CC_ENUM_FLAGS = $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)
CHECK_CC_ENUM_FLAGS += -DKBUILD_MODNAME='"mt7603e"'
check-cc-enum = $(call try-run, echo "int v = $(1);" | $(CC) -Werror $(CHECK_CC_ENUM_FLAGS) $(2) -c -x c - -o "$$TMP",y,n)
# backwards compatibility hack
ifeq ($(call check-cc-enum,IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN,-include net/mac80211.h),n)
EXTRA_CFLAGS += -DIEEE80211_HW_TX_STATUS_NO_AMPDU_LEN=IEEE80211_HW_REPORTS_TX_ACK_STATUS
endif
obj-m := mt7603e.o
mt7603e-y := \ mt7603e-y := \
pci.o soc.o main.o init.o mcu.o \ pci.o soc.o main.o init.o mcu.o \
+1 -2
View File
@@ -9,7 +9,6 @@
static int static int
mt76_wmac_probe(struct platform_device *pdev) mt76_wmac_probe(struct platform_device *pdev)
{ {
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct mt7603_dev *dev; struct mt7603_dev *dev;
void __iomem *mem_base; void __iomem *mem_base;
struct mt76_dev *mdev; struct mt76_dev *mdev;
@@ -20,7 +19,7 @@ mt76_wmac_probe(struct platform_device *pdev)
if (irq < 0) if (irq < 0)
return irq; return irq;
mem_base = devm_ioremap_resource(&pdev->dev, res); mem_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mem_base)) if (IS_ERR(mem_base))
return PTR_ERR(mem_base); return PTR_ERR(mem_base);
+1
View File
@@ -464,6 +464,7 @@ static const struct file_operations fops_ext_mac_addr = {
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
.read = mt7615_ext_mac_addr_read, .read = mt7615_ext_mac_addr_read,
.write = mt7615_ext_mac_addr_write, .write = mt7615_ext_mac_addr_write,
.owner = THIS_MODULE,
}; };
static int static int
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_MT76x0U) += mt76x0u.o obj-$(CONFIG_MT76x0U) += mt76x0u.o
obj-$(CONFIG_MT76x0E) += mt76x0e.o obj-$(CONFIG_MT76x0E) += mt76x0e.o
obj-$(CONFIG_MT76x0_COMMON) += mt76x0-common.o obj-$(CONFIG_MT76x0_COMMON) += mt76x0-common.o
+1
View File
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o
obj-$(CONFIG_MT76x2E) += mt76x2e.o obj-$(CONFIG_MT76x2E) += mt76x2e.o
obj-$(CONFIG_MT76x2U) += mt76x2u.o obj-$(CONFIG_MT76x2U) += mt76x2u.o
+2 -2
View File
@@ -1648,7 +1648,7 @@ mt7915_mcu_wtbl_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
tlv = mt7915_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht), tlv = mt7915_mcu_add_nested_tlv(skb, WTBL_VHT, sizeof(*vht),
wtbl_tlv, sta_wtbl); wtbl_tlv, sta_wtbl);
vht = (struct wtbl_vht *)tlv; vht = (struct wtbl_vht *)tlv;
vht->ldpc = !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC), vht->ldpc = !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC);
vht->vht = true; vht->vht = true;
af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK, af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
@@ -2895,7 +2895,7 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
}; };
int ret; int ret;
dev->mt76.mcu_ops = &mt7915_mcu_ops, dev->mt76.mcu_ops = &mt7915_mcu_ops;
ret = mt7915_driver_own(dev); ret = mt7915_driver_own(dev);
if (ret) if (ret)