1. 28 8月, 2015 1 次提交
  2. 26 8月, 2015 12 次提交
    • R
      ath10k: fix compilation warnings in wmi phyerr pull function · ee92a209
      Raja Mani 提交于
      Below compilation warnings are observed in gcc version 4.8.2.
      Even though it's not seen in bit older gcc versions (for ex, 4.7.3),
      It's good to fix it by changing format specifier from %d to
      %zd in wmi pull phyerr functions.
      
      wmi.c: In function 'ath10k_wmi_op_pull_phyerr_ev':
      wmi.c:3567:8: warning: format '%d' expects argument of type 'int',
                    but argument 4 has type 'long unsigned int' [-Wformat=]
                    left_len, sizeof(*phyerr));
                              ^
      wmi.c: In function 'ath10k_wmi_10_4_op_pull_phyerr_ev':
      wmi.c:3612:8: warning: format '%d' expects argument of type 'int',
      	      but argument 4 has type 'long unsigned int' [-Wformat=]
                    left_len, sizeof(*phyerr));
                              ^
      Fixes: 991adf71 ("ath10k: refactor phyerr event handlers")
      Fixes: 2b0a2e0d ("ath10k: handle 10.4 firmware phyerr event")
      Signed-off-by: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ee92a209
    • M
      ath10k: add qca6164 support · 36582e5d
      Michal Kazior 提交于
      This adds additional 0x0041 PCI Device ID
      definition to ath10k for QCA6164 which is a 1
      spatial stream sibling of the QCA6174 (which is 2
      spatial stream chip).
      
      The QCA6164 needs a dedicated board.bin file which
      is different than the one used for QCA6174. If the
      board.bin is wrong the device will crash early
      while trying to boot firmware. The register dump
      will look like this:
      
       ath10k_pci 0000:02:00.0: firmware register dump:
       ath10k_pci 0000:02:00.0: [00]: 0x05010000 0x000015B3 0x000A012D 0x00955B31
       ...
      
      Note the value 0x000A012D.
      
      Special credit goes to Alan Liu
      <alanliu@qca.qualcomm.com> for providing support
      help which enabled me to come up with this patch.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      36582e5d
    • R
      ath10k: add spectral scan support for 10.4 fw · 4535edbd
      Raja Mani 提交于
      To enable/configure spectral scan parameters in 10.4 firmware, existing
      wmi spectral related functions can be reused. Link those functions in
      10.4 wmi ops table.
      
      In addition, adjust bin size (only when size is 68 bytes) before reporting
      bin samples to user space. The background for this adjustment is that
      qca99x0 reports bin size as 68 bytes (64 bytes + 4 bytes) in report
      mode 2. First 64 bytes carries in-band tones (-32 to +31) and last 4 byte
      carries band edge detection data (+32) mainly used in radar detection
      purpose. Additional last 4 bytes are stripped to make bin size valid one.
      
      This bin size adjustment will happen only for qca99x0, all other chipsets
      will report proper bin sizes (64/128) without extra 4 bytes being added
      at the end. The changes are validated in qca99x0 using 10.4 firmware.
      Signed-off-by: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4535edbd
    • M
      ath10k: fix dma_mapping_error() handling · 5e55e3cb
      Michal Kazior 提交于
      The function returns 1 when DMA mapping fails. The
      driver would return bogus values and could
      possibly confuse itself if DMA failed.
      
      Fixes: 767d34fc ("ath10k: remove DMA mapping wrappers")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5e55e3cb
    • M
      ath10k: add missing mutex unlock on failpath · 503422d9
      Michal Kazior 提交于
      Kernel would complain about leaving a held lock
      after going back to userspace and would
      subsequently deadlock.
      
      Fixes: e04cafbc ("ath10k: fix peer limit enforcement")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      503422d9
    • G
      enic: reduce ioread in devcmd2 · dafc2199
      Govindarajulu Varadarajan 提交于
      posted_index is RO in firmware. We need not do ioread everytime to get
      posted index. Store posted index locally.
      Signed-off-by: NGovindarajulu Varadarajan <_govind@gmx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dafc2199
    • C
      r8169: Add values missing in @get_stats64 from HW counters · 6e85d5ad
      Corinna Vinschen 提交于
      The r8169 driver collects statistical information returned by
      @get_stats64 by counting them in the driver itself, even though many
      (but not all) of the values are already collected by tally counters
      (TCs) in the NIC.  Some of these TC values are not returned by
      @get_stats64.  Especially the received multicast packages are missing
      from /proc/net/dev.
      
      Rectify this by fetching the TCs and returning them from
      rtl8169_get_stats64.
      
      The counters collected in the driver obviously disappear as soon as the
      driver is unloaded so after a driver is loaded the counters always start
      at 0. The TCs on the other hand are only reset by a power cycle.  Without
      further considerations the values collected by the driver would not match
      up against the TC values.
      
      This patch introduces a new function rtl8169_reset_counters which
      resets the TCs.  Also, since rtl8169_reset_counters shares most of
      its code with rtl8169_update_counters, refactor the shared code into
      two new functions  rtl8169_map_counters and rtl8169_unmap_counters.
      
      Unfortunately chip versions prior to RTL_GIGA_MAC_VER_19 don't allow
      to reset the TCs programatically.  Therefore introduce an addition to
      the rtl8169_private struct and a function rtl8169_init_counter_offsets
      to store the TCs at first rtl_open.  Use these values as offsets in
      rtl8169_get_stats64.  Propagate a failure to reset *and* update the
      counters up to rtl_open and emit a warning message, if so.
      Signed-off-by: NCorinna Vinschen <vinschen@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e85d5ad
    • G
      ppp: implement x-netns support · 79c441ae
      Guillaume Nault 提交于
      Let packets move from one netns to the other at PPP encapsulation and
      decapsulation time.
      
      PPP units and channels remain in the netns in which they were
      originally created. Only the net_device may move to a different
      namespace. Cross netns handling is thus transparent to lower PPP
      layers (PPPoE, L2TP, etc.).
      
      PPP devices are automatically unregistered when their netns gets
      removed. So read() and poll() on the unit file descriptor will
      respectively receive EOF and POLLHUP. Channels aren't affected.
      Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79c441ae
    • H
      net: sun4i-emac: Claim emac sram · 542a64c7
      Hans de Goede 提交于
      Claim the emac sram ourselves, rather then relying on the bootloader
      having mapped the sram to the emac controller during boot.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      542a64c7
    • R
      net/mlx5e: Avoid accessing NULL pointer at ndo_select_queue · 5283af89
      Rana Shahout 提交于
      To avoid multiply/division operations on the data path,
      we hold a {channel, tc}==>txq mapping table.
      We held this mapping table inside the channel object that is
      being destroyed upon some configuration operations (e.g MTU change).
      So in case ndo_select_queue occurs during such a configuration operation,
      it may access a NULL channel pointer, resulting in kernel panic.
      To fix this issue we moved the {channel, tc}==>txq mapping table
      outside the channel object so that it will be available also
      during such configuration operations.
      Signed-off-by: NRana Shahout <ranas@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5283af89
    • J
      mlxsw: fix error return code · 5c121979
      Julia Lawall 提交于
      Return a negative error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c121979
    • J
      net: davinci_emac: fix error return code · 1ef53ebf
      Julia Lawall 提交于
      Propagate error code on failure.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      identifier ret; expression e1,e2;
      @@
      (
      if (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ef53ebf
  3. 25 8月, 2015 27 次提交