1. 13 Mar, 2018 12 commits
  2. 28 Feb, 2018 7 commits
    • Lorenzo Bianconi's avatar
      mt7601u: make write with mask access atomic · fee05843
      Lorenzo Bianconi authored
      Introduce __mt7601u_rr and __mt7601u_vendor_single_wr routines in order
      to make mt7601u_rmw and mt7601u_rmc atomic. This patch does not fix a
      reported issue but makes the usb access more robust to concurrent
      operations on the same register since it is theoretically possible that
      read and write accesses of mt7601u_rmw/mt7601u_rmc can be interleaved with
      a different write operation on the same register.
      Moreover using __mt7601u_rr and __mt7601u_vendor_single_wr in
      mt7601u_rmw/mt7601u_rmc allows to grab vendor_req_mutex mutex once
      instead of twice
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Acked-by: default avatarJakub Kicinski <kubakici@wp.pl>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      fee05843
    • Sudhir Sreedharan's avatar
      rtl8187: Fix NULL pointer dereference in priv->conf_mutex · 7972326a
      Sudhir Sreedharan authored
      This can be reproduced by bind/unbind the driver multiple times
      in AM3517 board.
      
      Analysis revealed that rtl8187_start() was invoked before probe
      finishes(ie. before the mutex is initialized).
      
       INFO: trying to register non-static key.
       the code is fine but needs lockdep annotation.
       turning off the locking correctness validator.
       CPU: 0 PID: 821 Comm: wpa_supplicant Not tainted 4.9.80-dirty #250
       Hardware name: Generic AM3517 (Flattened Device Tree)
       [<c010e0d8>] (unwind_backtrace) from [<c010beac>] (show_stack+0x10/0x14)
       [<c010beac>] (show_stack) from [<c017401c>] (register_lock_class+0x4f4/0x55c)
       [<c017401c>] (register_lock_class) from [<c0176fe0>] (__lock_acquire+0x74/0x1938)
       [<c0176fe0>] (__lock_acquire) from [<c0178cfc>] (lock_acquire+0xfc/0x23c)
       [<c0178cfc>] (lock_acquire) from [<c08aa2f8>] (mutex_lock_nested+0x50/0x3b0)
       [<c08aa2f8>] (mutex_lock_nested) from [<c05f5bf8>] (rtl8187_start+0x2c/0xd54)
       [<c05f5bf8>] (rtl8187_start) from [<c082dea0>] (drv_start+0xa8/0x320)
       [<c082dea0>] (drv_start) from [<c084d1d4>] (ieee80211_do_open+0x2bc/0x8e4)
       [<c084d1d4>] (ieee80211_do_open) from [<c069be94>] (__dev_open+0xb8/0x120)
       [<c069be94>] (__dev_open) from [<c069c11c>] (__dev_change_flags+0x88/0x14c)
       [<c069c11c>] (__dev_change_flags) from [<c069c1f8>] (dev_change_flags+0x18/0x48)
       [<c069c1f8>] (dev_change_flags) from [<c0710b08>] (devinet_ioctl+0x738/0x840)
       [<c0710b08>] (devinet_ioctl) from [<c067925c>] (sock_ioctl+0x164/0x2f4)
       [<c067925c>] (sock_ioctl) from [<c02883f8>] (do_vfs_ioctl+0x8c/0x9d0)
       [<c02883f8>] (do_vfs_ioctl) from [<c0288da8>] (SyS_ioctl+0x6c/0x7c)
       [<c0288da8>] (SyS_ioctl) from [<c0107760>] (ret_fast_syscall+0x0/0x1c)
       Unable to handle kernel NULL pointer dereference at virtual address 00000000
       pgd = cd1ec000
       [00000000] *pgd=8d1de831, *pte=00000000, *ppte=00000000
       Internal error: Oops: 817 [#1] PREEMPT ARM
       Modules linked in:
       CPU: 0 PID: 821 Comm: wpa_supplicant Not tainted 4.9.80-dirty #250
       Hardware name: Generic AM3517 (Flattened Device Tree)
       task: ce73eec0 task.stack: cd1ea000
       PC is at mutex_lock_nested+0xe8/0x3b0
       LR is at mutex_lock_nested+0xd0/0x3b0
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSudhir Sreedharan <ssreedharan@mvista.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      7972326a
    • Lorenzo Bianconi's avatar
      mt7601u: set device mac address in mt7601u_add_interface() · 032a552e
      Lorenzo Bianconi authored
      If mac80211 adds a vif with a different mac address respect to
      the eeprom one, the device will not be able to connect to the ap
      since the hw address has not been updated.
      Fix the issue updating hw mac address in mt7601u_add_interface routine
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1516935Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      032a552e
    • Lorenzo Bianconi's avatar
      mt7601u: move mt7601u_set_macaddr in mac related code · e96826bd
      Lorenzo Bianconi authored
      Remove static qualifier from mt7601u_set_macaddr routine and move it
      in mac related code in order to be used to properly support vif with
      different mac address respect to the default one
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e96826bd
    • Lorenzo Bianconi's avatar
      mt76x2: remove warnings in mt76x2_mac_write_txwi() · 09e93f28
      Lorenzo Bianconi authored
      Fix following sparse warnings in mt76x2_mac_write_txwi:
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: warning:
        incorrect type in assignment (different base types)
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: expected
        restricted __le32 [usertype] iv
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:201:26: got unsigned
        int [unsigned] [usertype] <noident>
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: warning:
        incorrect type in assignment (different base types)
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: expected
        restricted __le32 [usertype] eiv
      - drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:202:27: got unsigned
        int [unsigned] [usertype] <noident>
      
      Fixes: 23405236 ("mt76: fix transmission of encrypted management frames")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      09e93f28
    • Matt Redfearn's avatar
      ssb: Prevent build of PCI host features in module · 882164a4
      Matt Redfearn authored
      Attempting to build ssb.ko with CONFIG_SSB_DRIVER_PCICORE=y results in
      a build error due to use of symbols not exported from vmlinux:
      
      ERROR: "pcibios_enable_device" [drivers/ssb/ssb.ko] undefined!
      ERROR: "register_pci_controller" [drivers/ssb/ssb.ko] undefined!
      make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
      
      To prevent this, don't allow the host mode feature to be built if
      CONFIG_SSB=m
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      882164a4
    • Denis 'GNUtoo' Carikli's avatar
      bcma: add HP Stream Notebook · 985324a1
      Denis 'GNUtoo' Carikli authored
      In this laptop we have the following PCI device:
      02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01)
      	Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a]
      	[...]
      	Region 0: Memory at 91000000 (64-bit, non-prefetchable) [size=32K]
      	[...]
      
      With this patch, we can now see its WiFi chip:
        bcma: bus0: Found chip with id 43142, rev 0x01 and package 0x08
        bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x28, class 0x0)
        bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x21, class 0x0)
        bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x16, class 0x0)
        bcma: bus0: Core 3 found: UNKNOWN (manuf 0x43B, id 0x368, rev 0x00, class 0x0)
        bcma: bus0: Found rev 15 PMU (capabilities 0x518C5E0F)
        bcma: bus0: SPROM offset 0x840
        bcma: bus0: Found SPROM revision 10
        bcma: bus0: Workarounds unknown or not needed for device 0xA886
        bcma: bus0: Bus registered
      
      But it not yet supported by brcmsmac so it won't work for now:
        brcmsmac bcma0:1: brcms_b_attach wl0: vendor 0x14e4 device 0x4365
        brcmsmac: unknown device id 4365
      Signed-off-by: default avatarDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      985324a1
  3. 27 Feb, 2018 21 commits