1. 09 11月, 2016 1 次提交
    • R
      brcmfmac: proto: add callback for queuing TX data · b073ac1f
      Rafał Miłecki 提交于
      So far our core code was calling brcmf_fws_process_skb which wasn't
      a proper thing to do. If case of devices using msgbuf protocol fwsignal
      shouldn't be used. It was an unnecessary extra layer simply calling
      a protocol specifix txdata function.
      
      Please note we already have txdata callback, but it's used for calls
      between bcdc and fwsignal so it couldn't be simply used there.
      
      This makes core code more generic (instead of bcdc/fwsignal specific).
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b073ac1f
  2. 27 9月, 2016 13 次提交
  3. 21 9月, 2016 2 次提交
  4. 09 9月, 2016 2 次提交
  5. 07 9月, 2016 1 次提交
  6. 04 9月, 2016 2 次提交
    • N
      brcmfmac: fix pmksa->bssid usage · 7703773e
      Nicolas Iooss 提交于
      The struct cfg80211_pmksa defines its bssid field as:
      
          const u8 *bssid;
      
      contrary to struct brcmf_pmksa, which uses:
      
          u8 bssid[ETH_ALEN];
      
      Therefore in brcmf_cfg80211_del_pmksa(), &pmksa->bssid takes the address
      of this field (of type u8**), not the one of its content (which would be
      u8*).  Remove the & operator to make brcmf_dbg("%pM") and memcmp()
      behave as expected.
      
      This bug have been found using a custom static checker (which checks the
      usage of %p... attributes at build time).  It has been introduced in
      commit 6c404f34 ("brcmfmac: Cleanup pmksa cache handling code"),
      which replaced pmksa->bssid by &pmksa->bssid while refactoring the code,
      without modifying struct cfg80211_pmksa definition.
      
      Replace &pmk[i].bssid with pmk[i].bssid too to make the code clearer,
      this change does not affect the semantic.
      
      Fixes: 6c404f34 ("brcmfmac: Cleanup pmksa cache handling code")
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      7703773e
    • I
      brcmfmac: Add USB ID for Cisco Linksys AE1200 · bccf3ffc
      Ismael Luceno 提交于
      The AE1200 comes with different revisions of the BCM43235 chipset,
      but all have the same USB ID. Only revision 3 can be supported.
      Signed-off-by: NIsmael Luceno <ismael@iodev.co.uk>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      bccf3ffc
  7. 03 9月, 2016 1 次提交
  8. 24 8月, 2016 2 次提交
    • M
      brcmfmac: Change vif_event_lock to spinlock · b64abcb7
      mhiramat@kernel.org 提交于
      Change vif_event_lock to spinlock from mutex, since this lock is
      used in wait_event_timeout() via vif_event_equals(). This caused
      a warning report as below.
      
      As far as I can see, this lock protects regions where updating
      structure members, not function calls. Also, since those
      regions are not called from interrupt handlers (of course, it
      was a mutex), spin_lock is used instead of spin_lock_irqsave.
      
      [  186.678550] ------------[ cut here ]------------
      [  186.678556] WARNING: CPU: 2 PID: 7140 at /home/mhiramat/ksrc/linux/kernel/sched/core.c:7545 __might_sleep+0x7c/0x80
      [  186.678560] do not call blocking ops when !TASK_RUNNING; state=2 set at [<ffffffff980d9090>] prepare_to_wait_event+0x60/0x100
      [  186.678560] Modules linked in: brcmfmac xt_CHECKSUM rfcomm ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_addrtype br_netfilter xt_tcpudp ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_raw ip6table_security ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_filter ip6_tables iptable_raw iptable_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_filter ip_tables x_tables bnep nls_iso8859_1 i2c_designware_platform i2c_designware_core snd_hda_codec_hdmi snd_hda_codec_realtek dcdbas snd_hda_codec_generic snd_hda_intel snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal intel_powerclamp coretemp
      [  186.678594]  snd_pcm crct10dif_pclmul crc32_pclmul aesni_intel aes_x86_64 joydev glue_helper snd_hwdep lrw gf128mul uvcvideo ablk_helper snd_seq_midi cryptd snd_seq_midi_event snd_rawmidi videobuf2_vmalloc videobuf2_memops snd_seq input_leds videobuf2_v4l2 cfg80211 videobuf2_core snd_timer videodev serio_raw btusb snd_seq_device media btrtl rtsx_pci_ms snd mei_me memstick hid_multitouch mei soundcore brcmutil idma64 virt_dma intel_lpss_pci processor_thermal_device intel_soc_dts_iosf hci_uart btbcm btqca btintel bluetooth int3403_thermal dell_smo8800 intel_lpss_acpi intel_lpss int3402_thermal int340x_thermal_zone intel_hid mac_hid int3400_thermal shpchp sparse_keymap acpi_pad acpi_thermal_rel acpi_als kfifo_buf industrialio kvm_intel kvm irqbypass parport_pc ppdev lp parport autofs4 btrfs xor raid6_pq
      [  186.678631]  usbhid nouveau ttm i915 rtsx_pci_sdmmc mxm_wmi i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops psmouse drm ahci rtsx_pci nvme nvme_core libahci i2c_hid hid pinctrl_sunrisepoint video wmi pinctrl_intel fjes [last unloaded: brcmfmac]
      [  186.678646] CPU: 2 PID: 7140 Comm: wpa_supplicant Not tainted 4.8.0-rc1+ #8
      [  186.678647] Hardware name: Dell Inc. XPS 15 9550/0N7TVV, BIOS 01.02.00 04/07/2016
      [  186.678648]  0000000000000000 ffff9d8c64b5b900 ffffffff98442f23 ffff9d8c64b5b950
      [  186.678651]  0000000000000000 ffff9d8c64b5b940 ffffffff9808b22b 00001d790000000d
      [  186.678653]  ffffffff98c75e78 000000000000026c 0000000000000000 ffff9d8c2706d058
      [  186.678655] Call Trace:
      [  186.678659]  [<ffffffff98442f23>] dump_stack+0x85/0xc2
      [  186.678666]  [<ffffffff9808b22b>] __warn+0xcb/0xf0
      [  186.678668]  [<ffffffff9808b29f>] warn_slowpath_fmt+0x4f/0x60
      [  186.678671]  [<ffffffff980d9090>] ? prepare_to_wait_event+0x60/0x100
      [  186.678672]  [<ffffffff980d9090>] ? prepare_to_wait_event+0x60/0x100
      [  186.678674]  [<ffffffff980b922c>] __might_sleep+0x7c/0x80
      [  186.678680]  [<ffffffff988b0853>] mutex_lock_nested+0x33/0x3b0
      [  186.678682]  [<ffffffff980e5d8d>] ? trace_hardirqs_on+0xd/0x10
      [  186.678689]  [<ffffffffc0c57d2d>] brcmf_cfg80211_wait_vif_event+0xcd/0x130 [brcmfmac]
      [  186.678691]  [<ffffffff980d9190>] ? wake_atomic_t_function+0x60/0x60
      [  186.678697]  [<ffffffffc0c628e9>] brcmf_p2p_del_vif+0xf9/0x220 [brcmfmac]
      [  186.678702]  [<ffffffffc0c57fab>] brcmf_cfg80211_del_iface+0x21b/0x270 [brcmfmac]
      [  186.678716]  [<ffffffffc0b0539e>] nl80211_del_interface+0xfe/0x3a0 [cfg80211]
      [  186.678718]  [<ffffffff987ca335>] genl_family_rcv_msg+0x1b5/0x370
      [  186.678720]  [<ffffffff980e5d8d>] ? trace_hardirqs_on+0xd/0x10
      [  186.678721]  [<ffffffff987ca56d>] genl_rcv_msg+0x7d/0xb0
      [  186.678722]  [<ffffffff987ca4f0>] ? genl_family_rcv_msg+0x370/0x370
      [  186.678724]  [<ffffffff987c9a47>] netlink_rcv_skb+0x97/0xb0
      [  186.678726]  [<ffffffff987ca168>] genl_rcv+0x28/0x40
      [  186.678727]  [<ffffffff987c93c3>] netlink_unicast+0x1d3/0x2f0
      [  186.678729]  [<ffffffff987c933b>] ? netlink_unicast+0x14b/0x2f0
      [  186.678731]  [<ffffffff987c97cb>] netlink_sendmsg+0x2eb/0x3a0
      [  186.678733]  [<ffffffff9876dad8>] sock_sendmsg+0x38/0x50
      [  186.678734]  [<ffffffff9876e4df>] ___sys_sendmsg+0x27f/0x290
      [  186.678737]  [<ffffffff9828b935>] ? mntput_no_expire+0x5/0x3f0
      [  186.678739]  [<ffffffff9828b9be>] ? mntput_no_expire+0x8e/0x3f0
      [  186.678741]  [<ffffffff9828b935>] ? mntput_no_expire+0x5/0x3f0
      [  186.678743]  [<ffffffff9828bd44>] ? mntput+0x24/0x40
      [  186.678744]  [<ffffffff98267830>] ? __fput+0x190/0x200
      [  186.678746]  [<ffffffff9876f125>] __sys_sendmsg+0x45/0x80
      [  186.678748]  [<ffffffff9876f172>] SyS_sendmsg+0x12/0x20
      [  186.678749]  [<ffffffff988b5680>] entry_SYSCALL_64_fastpath+0x23/0xc1
      [  186.678751]  [<ffffffff980e2b8f>] ? trace_hardirqs_off_caller+0x1f/0xc0
      [  186.678752] ---[ end trace e224d66c5d8408b5 ]---
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b64abcb7
    • M
      brcmfmac: Check rtnl_lock is locked when removing interface · 15dacf88
      mhiramat@kernel.org 提交于
      Check rtnl_lock is locked in brcmf_p2p_ifp_removed() by passing
      rtnl_locked flag. Actually the caller brcmf_del_if() checks whether
      the rtnl_lock is locked, but doesn't pass it to brcmf_p2p_ifp_removed().
      
      Without this fix, wpa_supplicant goes softlockup with rtnl_lock
      holding (this means all other process using netlink are locked up too)
      
      e.g.
      [ 4495.876627] INFO: task wpa_supplicant:7307 blocked for more than 10 seconds.
      [ 4495.876632]       Tainted: G        W       4.8.0-rc1+ #8
      [ 4495.876635] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [ 4495.876638] wpa_supplicant  D ffff974c647b39a0     0  7307      1 0x00000000
      [ 4495.876644]  ffff974c647b39a0 0000000000000000 ffff974c00000000 ffff974c7dc59c58
      [ 4495.876651]  ffff974c6b7417c0 ffff974c645017c0 ffff974c647b4000 ffffffff86f16c08
      [ 4495.876657]  ffff974c645017c0 0000000000000246 00000000ffffffff ffff974c647b39b8
      [ 4495.876664] Call Trace:
      [ 4495.876671]  [<ffffffff868aeccc>] schedule+0x3c/0x90
      [ 4495.876676]  [<ffffffff868af065>] schedule_preempt_disabled+0x15/0x20
      [ 4495.876682]  [<ffffffff868b0996>] mutex_lock_nested+0x176/0x3b0
      [ 4495.876686]  [<ffffffff867a2067>] ? rtnl_lock+0x17/0x20
      [ 4495.876690]  [<ffffffff867a2067>] rtnl_lock+0x17/0x20
      [ 4495.876720]  [<ffffffffc0ae9a5d>] brcmf_p2p_ifp_removed+0x4d/0x70 [brcmfmac]
      [ 4495.876741]  [<ffffffffc0aebde6>] brcmf_remove_interface+0x196/0x1b0 [brcmfmac]
      [ 4495.876760]  [<ffffffffc0ae9901>] brcmf_p2p_del_vif+0x111/0x220 [brcmfmac]
      [ 4495.876777]  [<ffffffffc0adefab>] brcmf_cfg80211_del_iface+0x21b/0x270 [brcmfmac]
      [ 4495.876820]  [<ffffffffc097b39e>] nl80211_del_interface+0xfe/0x3a0 [cfg80211]
      [ 4495.876825]  [<ffffffff867ca335>] genl_family_rcv_msg+0x1b5/0x370
      [ 4495.876832]  [<ffffffff860e5d8d>] ? trace_hardirqs_on+0xd/0x10
      [ 4495.876836]  [<ffffffff867ca56d>] genl_rcv_msg+0x7d/0xb0
      [ 4495.876839]  [<ffffffff867ca4f0>] ? genl_family_rcv_msg+0x370/0x370
      [ 4495.876846]  [<ffffffff867c9a47>] netlink_rcv_skb+0x97/0xb0
      [ 4495.876849]  [<ffffffff867ca168>] genl_rcv+0x28/0x40
      [ 4495.876854]  [<ffffffff867c93c3>] netlink_unicast+0x1d3/0x2f0
      [ 4495.876860]  [<ffffffff867c933b>] ? netlink_unicast+0x14b/0x2f0
      [ 4495.876866]  [<ffffffff867c97cb>] netlink_sendmsg+0x2eb/0x3a0
      [ 4495.876870]  [<ffffffff8676dad8>] sock_sendmsg+0x38/0x50
      [ 4495.876874]  [<ffffffff8676e4df>] ___sys_sendmsg+0x27f/0x290
      [ 4495.876882]  [<ffffffff8628b935>] ? mntput_no_expire+0x5/0x3f0
      [ 4495.876888]  [<ffffffff8628b9be>] ? mntput_no_expire+0x8e/0x3f0
      [ 4495.876894]  [<ffffffff8628b935>] ? mntput_no_expire+0x5/0x3f0
      [ 4495.876899]  [<ffffffff8628bd44>] ? mntput+0x24/0x40
      [ 4495.876904]  [<ffffffff86267830>] ? __fput+0x190/0x200
      [ 4495.876909]  [<ffffffff8676f125>] __sys_sendmsg+0x45/0x80
      [ 4495.876914]  [<ffffffff8676f172>] SyS_sendmsg+0x12/0x20
      [ 4495.876918]  [<ffffffff868b5680>] entry_SYSCALL_64_fastpath+0x23/0xc1
      [ 4495.876924]  [<ffffffff860e2b8f>] ? trace_hardirqs_off_caller+0x1f/0xc0
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      15dacf88
  9. 14 8月, 2016 1 次提交
  10. 20 7月, 2016 3 次提交
  11. 19 7月, 2016 3 次提交
  12. 08 7月, 2016 2 次提交
    • R
      brcmfmac: support removing AP interfaces with "interface_remove" · dba8fbc6
      Rafał Miłecki 提交于
      New firmwares (e.g. 10.10.69.36 for BCM4366) support "interface_remove"
      for removing interfaces. Try to use this method on cfg80211 request. In
      case of older firmwares (e.g. 7.35.177.56 for BCM43602 as I tested) this
      will just result in firmware rejecting command and this won't change any
      behavior.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      dba8fbc6
    • R
      brcmfmac: delete interface directly in code that sent fw request · a63b0987
      Rafał Miłecki 提交于
      So far when receiving event about in-firmware-interface removal our
      event worker was notifying listener and afterwards it was removing Linux
      interface.
      
      First of all it was resulting in slightly unexpected order. The listener
      (del_virtual_intf callback) was (usually) returning with success before
      we even called unregister_netdev(ice).
      
      Please note this couldn't be simply fixed by changing order of calls in
      brcmf_fweh_handle_if_event as unregistering interface earlier could free
      struct brcmf_if.
      
      Another problem of current implementation are possible lockups. Focus on
      the time slot between calling event handler and removing Linux
      interface. During that time original caller may leave (unlocking rtnl
      semaphore) *and* another call to the same code may be done (locking it
      again). If that happens our event handler will stuck at removing Linux
      interface, it won't handle another event and will block process holding
      rtnl lock.
      
      This can be simply solved by unregistering interface in a proper
      callback, right after receiving confirmation event from firmware. This
      only required modifying worker to don't unregister on its own if there
      is someone waiting for the event.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      a63b0987
  13. 06 7月, 2016 1 次提交
    • A
      nl80211: support beacon report scanning · 1d76250b
      Avraham Stern 提交于
      Beacon report radio measurement requires reporting observed BSSs
      on the channels specified in the beacon request. If the measurement
      mode is set to passive or active, it requires actually performing a
      scan (passive or active, accordingly), and reporting the time that
      the scan was started and the time each beacon/probe was received
      (both in terms of TSF of the BSS of the requesting AP). If the
      request mode is table, this information is optional.
      In addition, the radio measurement request specifies the channel
      dwell time for the measurement.
      
      In order to use scan for beacon report when the mode is active or
      passive, add a parameter to scan request that specifies the
      channel dwell time, and add scan start time and beacon received time
      to scan results information.
      
      Supporting beacon report is required for Multi Band Operation (MBO).
      Signed-off-by: NAssaf Krauss <assaf.krauss@intel.com>
      Signed-off-by: NDavid Spinadel <david.spinadel@intel.com>
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1d76250b
  14. 30 6月, 2016 2 次提交
  15. 29 6月, 2016 4 次提交