1. 15 1月, 2015 12 次提交
  2. 07 1月, 2015 1 次提交
    • C
      wil6210: use 'uint64_t' instead of 'cycles_t' to avoid warnings · c20e7789
      Chen Gang 提交于
      do_div() checks the type strictly. 'cycles_t' may be 32-bit under quite
      a few architectures (parisc, arm, avr32 ...). So use 'uint64_t' instead
      of, the related warning (with allmodconfig under parisc):
      
          CC [M]  drivers/net/wireless/ath/wil6210/debugfs.o
        In file included from arch/parisc/include/generated/asm/div64.h:1:0,
                         from include/linux/kernel.h:124,
                         from include/linux/list.h:8,
                         from include/linux/module.h:9,
                         from drivers/net/wireless/ath/wil6210/debugfs.c:17:
        drivers/net/wireless/ath/wil6210/debugfs.c: In function ‘wil_vring_debugfs_show’:
        include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast
          (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                                    ^
        drivers/net/wireless/ath/wil6210/debugfs.c:107:4: note: in expansion of macro ‘do_div’
            do_div(idle, total);
            ^
        In file included from include/uapi/linux/stddef.h:1:0,
                         from include/linux/stddef.h:4,
                         from ./include/uapi/linux/posix_types.h:4,
                         from include/uapi/linux/types.h:13,
                         from include/linux/types.h:5,
                         from include/linux/list.h:4,
                         from include/linux/module.h:9,
                         from drivers/net/wireless/ath/wil6210/debugfs.c:17:
        include/asm-generic/div64.h:44:18: warning: right shift count >= width of type [-Wshift-count-overflow]
          if (likely(((n) >> 32) == 0)) {   \
                          ^
        include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
         # define likely(x) __builtin_expect(!!(x), 1)
                                                ^
        drivers/net/wireless/ath/wil6210/debugfs.c:107:4: note: in expansion of macro ‘do_div’
            do_div(idle, total);
            ^
        In file included from arch/parisc/include/generated/asm/div64.h:1:0,
                         from include/linux/kernel.h:124,
                         from include/linux/list.h:8,
                         from include/linux/module.h:9,
                         from drivers/net/wireless/ath/wil6210/debugfs.c:17:
        include/asm-generic/div64.h:48:22: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type [-Wincompatible-pointer-types]
           __rem = __div64_32(&(n), __base); \
                              ^
        drivers/net/wireless/ath/wil6210/debugfs.c:107:4: note: in expansion of macro ‘do_div’
            do_div(idle, total);
            ^
        include/asm-generic/div64.h:35:17: note: expected ‘uint64_t * {aka long long unsigned int *}’ but argument is of type ‘cycles_t * {aka long unsigned int *}’
         extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
                         ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      c20e7789
  3. 02 12月, 2014 10 次提交
  4. 31 10月, 2014 5 次提交
  5. 20 10月, 2014 1 次提交
  6. 03 10月, 2014 2 次提交
  7. 29 9月, 2014 1 次提交
  8. 27 9月, 2014 1 次提交
  9. 16 9月, 2014 1 次提交
    • V
      fixup! wil6210: fix usage of print_hex_dump_debug · a43b5142
      Vladimir Kondratiev 提交于
      Use empty inline functions instead of empty #define. Fix for "unused variable"
      as reported below:
      
      tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
      head:   167bf96d
      commit: 871d8c4b [45/62] wil6210: fix usage of print_hex_dump_debug
      config: i386-allyesconfig
      reproduce:
        git checkout 871d8c4b
        make ARCH=i386  allyesconfig
        make ARCH=i386
      
      All warnings:
      
         drivers/net/wireless/ath/wil6210/wmi.c: In function 'wmi_evt_rx_mgmt':
      
      >> drivers/net/wireless/ath/wil6210/wmi.c:341:10: warning: unused variable 'ie_len' [-Wunused-variable]
            size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
                   ^
      
      >> drivers/net/wireless/ath/wil6210/wmi.c:340:13: warning: unused variable 'ie_buf' [-Wunused-variable]
            const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
                      ^
      
      vim +/ie_len +341 drivers/net/wireless/ath/wil6210/wmi.c
      
      2be7d22f Vladimir Kondratiev 2012-12-20  334
      2be7d22f Vladimir Kondratiev 2012-12-20  335    if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) {
      2be7d22f Vladimir Kondratiev 2012-12-20  336            struct cfg80211_bss *bss;
      8eea944a Vladimir Kondratiev 2014-06-16  337            u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp);
      8eea944a Vladimir Kondratiev 2014-06-16  338            u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info);
      8eea944a Vladimir Kondratiev 2014-06-16  339            u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int);
      8eea944a Vladimir Kondratiev 2014-06-16  340            const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
      8eea944a Vladimir Kondratiev 2014-06-16  341            size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
      8eea944a Vladimir Kondratiev 2014-06-16  342                                             u.beacon.variable);
      8eea944a Vladimir Kondratiev 2014-06-16  343            wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
      8eea944a Vladimir Kondratiev 2014-06-16  344            wil_dbg_wmi(wil, "TSF : 0x%016llx\n", tsf);
      
      :::::: The code at line 341 was first introduced by commit
      :::::: 8eea944a wil6210: print more info about BSS found
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a43b5142
  10. 12 9月, 2014 6 次提交
    • V
      wil6210: fix PTR_ERR() usage after initialization to constant · 867fa0d4
      Vladimir Kondratiev 提交于
      Reported by coccinelle:
      
      tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
      head:   6a5d088a
      commit: b7cde470 [18/80] wil6210: convert debugfs to the table mode
      
      coccinelle warnings: (new ones prefixed by >>)
      
      >> drivers/net/wireless/ath/wil6210/debugfs.c:327:17-24: ERROR: PTR_ERR applied after initialization to constant on line 304
      
      vim +327 drivers/net/wireless/ath/wil6210/debugfs.c
      
         298                                          struct dentry *dbg, void *base,
         299                                          const struct dbg_off * const tbl)
         300  {
         301          int i;
         302
         303          for (i = 0; tbl[i].name; i++) {
      
       > 304                  struct dentry *f = NULL;
         305
         306                  switch (tbl[i].type) {
         307                  case doff_u32:
         308                          f = debugfs_create_u32(tbl[i].name, tbl[i].mode, dbg,
         309                                                 base + tbl[i].off);
         310                          break;
         311                  case doff_x32:
         312                          f = debugfs_create_x32(tbl[i].name, tbl[i].mode, dbg,
         313                                                 base + tbl[i].off);
         314                          break;
         315                  case doff_ulong:
         316                          f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode,
         317                                                       dbg, base + tbl[i].off);
         318                          break;
         319                  case doff_io32:
         320                          f = wil_debugfs_create_iomem_x32(tbl[i].name,
         321                                                           tbl[i].mode, dbg,
         322                                                           base + tbl[i].off);
         323                          break;
         324                  }
         325                  if (IS_ERR_OR_NULL(f))
         326                          wil_err(wil, "Create file \"%s\": err %ld\n",
      
       > 327                                  tbl[i].name, PTR_ERR(f));
         328          }
         329  }
         330
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      867fa0d4
    • V
      wil6210: fix for oops while stopping interface · 73d839ae
      Vladimir Kondratiev 提交于
      When interface stopped while running intensive Rx traffic, the following oops
      observed:
      
      [89846.734683] Call trace:
      [89846.737117] [<ffffffc00083aa64>] dev_gro_receive+0xac/0x358
      [89846.742674] [<ffffffc00083ae94>] napi_gro_receive+0x24/0xa4
      [89846.748251] [<ffffffbffc1c2f88>] $x+0xec/0x1f8 [wil6210]         wil_netif_rx_any
      [89846.753547] [<ffffffbffc1c4830>] $x+0x34/0x54 [wil6210]          wil_release_reorder_frame
      [89846.758755] [<ffffffbffc1c48ac>] wil_release_reorder_frames+0x5c/0x78 [wil6210]
      [89846.766044] [<ffffffbffc1c4bf8>] wil_tid_ampdu_rx_free+0x20/0x48 [wil6210]
      [89846.772901] [<ffffffbffc1bedc8>] $x+0x190/0x1e8 [wil6210]
      [89846.778285] [<ffffffbffc1c0ed4>] wmi_event_worker+0x230/0x2f8 [wil6210]
      [89846.784865] [<ffffffc0000b0bc8>] process_one_work+0x278/0x3fc
      [89846.790591] [<ffffffc0000b1218>] worker_thread+0x200/0x330
      [89846.796060] [<ffffffc0000b6664>] kthread+0xac/0xb8
      [89846.800836] Code: b940c661 f9406a62 8b010041 f9400026 (f8636882)
      [89846.807008] ---[ end trace d6fdc17cd27d18f6 ]---
      
      Reason is the following: when removing Rx vring
      (wil_netdev_ops.ndo_stop -> wil_stop -> wil_down -> __wil_down -> wil_rx_fini),
      Rx interrupt occurs. It trigger Rx NAPI, calling wil_rx_handle() that reaps
      (already cleaned) buffer, causing skb referring to garbage memory being set into reorder buffer.
      Then, network stack trying to access this buffer and fails.
      
      Prevent Rx NAPI from being scheduled if device going to stop. Bit wil_status_napi_en reflects
      NAPI enablement state, check it when triggering Rx NAPI.
      
      Testing shows that check for wil_status_napi_en sometimes gets negative, and new error message
      get printed - in this case kernel oops would be observed. Original oops is no more reproducible.
      
      This change requires also changes in the AP flows.
      Properly enable/disable NAPI for the AP. Make sure Rx VRING is disabled
      when resetting target.
      
      For this, promote __wil_up() and __wil_down() to the module scope, and use it
      in the relevant flows.
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      73d839ae
    • V
      wil6210: rename [en|dis]able irq to [un]mask · e4dbb093
      Vladimir Kondratiev 提交于
      To better reflect real action performed, rename:
      s/wil6210_disable_irq/wil_mask_irq/
      s/wil6210_enable_irq/wil_unmask_irq/
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e4dbb093
    • V
      d00a6367
    • V
      wil6210: specify max. IE length · 77c91295
      Vladimir Kondratiev 提交于
      Expose firmware limit for the max_scan_ie_len;
      also do actually set IE's for the probe request
      
      max_scan_ie_len used to be 0, this blocks scan requests with non-zero IE's
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      77c91295
    • D
      wil6210: introduce separate completion for WMI · 59502647
      Dedy Lansky 提交于
      re-use of wmi_ready for both FW ready event and for wmi_call was causing
      false "FW not ready" indication in case wmi_call() was invoked while reset
      took place.
      add wmi_call completion variable instead of re-using wmi_ready.
      Signed-off-by: NDedy Lansky <qca_dlansky@qca.qualcomm.com>
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      59502647