1. 28 May, 2020 8 commits
    • Felix Fietkau's avatar
      mt76: fix per-driver wcid range checks after wcid array size bump · 238f5d6f
      Felix Fietkau authored
      All drivers before MT7915 have a limit of 128 WCID entries. Stop relying
      on ARRAY_SIZE(dev->mt76.wcid), since it no longer reflects that limit.
      
      Fixes: 49e649c3 ("mt76: adjust wcid size to support new 802.11ax generation")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      238f5d6f
    • Ryder Lee's avatar
      mt76: mt7915: fix decoded radiotap HE flags · ae4027a7
      Ryder Lee authored
      Move assignment of .data1 and .data2 to a single place and fix overwriting
      of values from the template
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      ae4027a7
    • Lorenzo Bianconi's avatar
      mt76: mt7615: fix NULL pointer deref in mt7615_register_ext_phy · 4c04f25d
      Lorenzo Bianconi authored
      Fix following NULL pointer dereference in mt7615_register_ext_phy routine
      
      [   27.648860] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000060
      [   27.657697] Mem abort info:
      [   27.660495]   ESR = 0x96000046
      [   27.663549]   EC = 0x25: DABT (current EL), IL = 32 bits
      [   27.668857]   SET = 0, FnV = 0
      [   27.671910]   EA = 0, S1PTW = 0
      [   27.675040] Data abort info:
      [   27.677918]   ISV = 0, ISS = 0x00000046
      [   27.681751]   CM = 0, WnR = 1
      [   27.684717] user pgtable: 4k pages, 39-bit VAs, pgdp=000000007d8cc000
      [   27.691156] [0000000000000060] pgd=000000007d281003, pud=000000007d281003, pmd=0000000000000000
      [   27.699857] Internal error: Oops: 96000046 [#1] SMP
      [   27.774939] CPU: 1 PID: 701 Comm: ash Not tainted 5.4.41 #0
      [   27.780500] Hardware name: Bananapi BPI-R64 (DT)
      [   27.785108] pstate: 60000005 (nZCv daif -PAN -UAO)
      [   27.789897] pc : mt7615_register_ext_phy+0x60/0x2c8 [mt7615_common]
      [   27.796156] lr : mt7615_init_debugfs+0x99c/0x18e0 [mt7615_common]
      [   27.802237] sp : ffffffc0115dbcb0
      [   27.805541] x29: ffffffc0115dbcb0 x28: ffffff803e309600
      [   27.810843] x27: 0000000000000000 x26: 0000000000000000
      [   27.816144] x25: ffffff803d936928 x24: ffffff803d936950
      [   27.821447] x23: 0000000000000000 x22: 0000000fffffffe0
      [   27.826749] x21: 0000000000000002 x20: ffffff8001e82620
      [   27.832050] x19: 0000000000000000 x18: 0000000000000000
      [   27.837352] x17: 0000000000000000 x16: 0000000000000000
      [   27.842653] x15: 0000000000000000 x14: 0000000000000000
      [   27.847955] x13: 0000000000000000 x12: 0000000000000000
      [   27.853256] x11: 0000000000000000 x10: 0000000000000040
      [   27.858558] x9 : ffffffc0112b3eb0 x8 : ffffffc0112b3ea8
      [   27.863859] x7 : ffffff803e400048 x6 : 0000000000000000
      [   27.869161] x5 : ffffff803e400000 x4 : 0000000000000000
      [   27.874462] x3 : 0000000000000001 x2 : 0000000000007615
      [   27.879764] x1 : 0000000000000068 x0 : ffffffc0088ccc58
      [   27.885066] Call trace:
      [   27.887505]  mt7615_register_ext_phy+0x60/0x2c8 [mt7615_common]
      [   27.893416]  mt7615_init_debugfs+0x99c/0x18e0 [mt7615_common]
      [   27.899156]  simple_attr_write+0xf0/0x178
      [   27.903158]  debugfs_attr_write+0x4c/0x70
      [   27.907159]  full_proxy_write+0x60/0x90
      [   27.910987]  __vfs_write+0x18/0x40
      [   27.914379]  vfs_write+0xb0/0x1b8
      [   27.917685]  ksys_write+0x4c/0xc8
      [   27.920989]  __arm64_sys_write+0x18/0x20
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      4c04f25d
    • Ryder Lee's avatar
      mt76: mt7915: fix sparse warnings: incorrect type initializer · 19e29c69
      Ryder Lee authored
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:2317:31: sparse: sparse:
      incorrect type in initializer (different base types)
      
      Fixes: 5517f78b ("mt76: mt7915: enable firmware module debug support")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      19e29c69
    • Ryder Lee's avatar
      mt76: mt7915: fix some sparse warnings · f9a5c056
      Ryder Lee authored
      This fixes the following sparse warning:
      
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:253:16: sparse: sparse: mixing different enum types:
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:253:16: sparse:    unsigned int enum mt7915_txq_id
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:253:16: sparse:    unsigned int enum mt76_txq_id
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:758:63: sparse: sparse: incorrect type in argument 2 (different address spaces)
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:758:63: sparse:    expected unsigned char const [usertype] *ies
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:758:63: sparse:    got unsigned char const [noderef] <asn:4> *
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1390:23: sparse: sparse: incorrect type in argument 1 (different base types)
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1390:23: sparse:    expected unsigned int w
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1390:23: sparse:    got restricted __le32 [usertype] supp_ht_mcs
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1390:23: sparse: sparse: restricted __le32 degrades to integer
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1429:60: sparse: sparse: bad assignment (>>=) to restricted __le16
      drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:1773:16: sparse: sparse: restricted __le32 degrades to integer
      
      Fixes: 6094f86f ("mt76: mt7915: add HE bss_conf support for interfaces")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      f9a5c056
    • Ryder Lee's avatar
      mt76: mt7915: add spatial reuse support · 06acdd38
      Ryder Lee authored
      Enable or disable OBSS PD when the bss config changes or we
      assoc to an AP that broadcasts the IE.
      
      With this patch, we can get ~20% gain in OBSS OTA environment.
      Tested-by: default avatarEvelyn Tsai <evelyn.tsai@mediatek.com>
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      06acdd38
    • Lorenzo Bianconi's avatar
      mt76: mt76x02: remove check in mt76x02_mcu_msg_send · 802b836a
      Lorenzo Bianconi authored
      mt76x02_mcu_msg_send is run just by mmio code so get rid of
      mt76_is_mmio() check
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      802b836a
    • Lorenzo Bianconi's avatar
      mt76: mt7615: introduce remain_on_channel support · 7307f296
      Lorenzo Bianconi authored
      Introduce remain_on_channel support to mt7615 driver if the device is
      running offload firmware
      Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      7307f296
  2. 27 May, 2020 32 commits