1. 17 Apr, 2015 8 commits
    • Peter Oh's avatar
      ath10k: use MAC clock rate same as FW uses for survey accuracy · 7df37f75
      Peter Oh authored
      WLAN survey data provides several informative values on each channels
      such as noise, active time, transmit time, and etc.
      Regarding the channel activity time data, it is reported from firmware
      in different form which is number of cycles instead of time itself.
      Hence host driver converts it to time unit by dividing it by clock rate
      that is used at baseband MAC.
      
      Using difference clock rate from that actual HW is using will result in
      inaccurate survey data. For instance, channel active time can be reported
      with bigger than 150ms even though we set Dwell time to 150ms.
      Therefore set the clock rate to 88000 (88 MHz) which is ath10k baseband
      MAC is using.
      Signed-off-by: default avatarPeter Oh <poh@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7df37f75
    • Janusz Dziedzic's avatar
      ath10k: enable ibss-rsn · 0cd9bc14
      Janusz Dziedzic authored
      With latest additions to the driver it seems
      viable to enable support for IBSS-RSN.
      
      It seems to work on QCA988X and 999.999.0.636 but
      is a bit slow to exchange RSN keys for some
      reason. This may be a firmware quirk or ath10k is
      missing something. Nevertheless it makes sense to
      finally enable IBSS-RSN in ath10k even if somewhat
      handicapped.
      
      QCA6174 firmware doesn't seem to be able to Tx
      EAPOL frames at all now (they get stuck in hw
      queues for some reason) so it never gets to set
      the keys in driver. It's fairly safe to assume that
      once this is fixed IBSS-RSN will work with QCA6174
      firmware without any additional changes. Hence no
      special handling for advertising
      IEEE80211_HW_SUPPORTS_PER_STA_GTK and
      WIPHY_FLAG_IBSS_RSN is done now.
      Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      0cd9bc14
    • Michal Kazior's avatar
      ath10k: set def key idx for ibss · 8461baf7
      Michal Kazior authored
      Some time ago there was a weird issue with AP
      using wrong multicast keys and generating
      corrupted traffic on 10.1 firmware.
      
      Apparently a very similar problem applies for
      IBSS-RSN on 999.999.0.636.
      
      ath10k doesn't have IBSS-RSN enabled yet. This
      patch is a prerequisite to support it.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      8461baf7
    • Michal Kazior's avatar
      ath10k: fix multiple key static wep with ibss · ce90b271
      Michal Kazior authored
      Apparently firmware requires both pairwise and
      groupwise keys to be installed per-peer for static
      WEP in IBSS. This wasn't necessary for AP mode
      (and installing both doesn't seem to break AP
      mode thus there's no special handling).
      
      Also there seems to be some kind of issue with
      mapping tx/rx keys in firmware properly which
      resulted in wrong keys being used and broken
      communication between devices.
      
      It can be argued the vdev param part is more of a
      workaround than a real fix. However I couldn't
      figure out how to fix this differently. It works
      and isn't super ugly.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      ce90b271
    • Michal Kazior's avatar
      ath10k: don't use reassoc flag · 73dc5a1d
      Michal Kazior authored
      Firmware actually re-creates peer entry when
      reassoc flag is set. This is undesired and could
      cause trouble with IBSS crypto-wise. This is also
      important for upcomming bitrate mask improvement.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      73dc5a1d
    • Michal Kazior's avatar
      ath10k: change static wep key handling for client mode · 29a10006
      Michal Kazior authored
      mac80211 sets static WEP keys as groupwise while
      firmware requires them to be installed twice as
      both pairwise and groupwise.
      
      Until now these keys were installed once as
      pairwise only and, due to that special handling,
      needed additional tricks to support 802.1x as
      well.
      
      Without this patch in some cases (when AP and
      ath10k client use different default tx keys)
      multicast communication was broken.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      29a10006
    • Michal Kazior's avatar
      ath10k: add extra check for frame tracing · 36d8230b
      Michal Kazior authored
      Frames are logged via tracing in two slices:
      header and payload, separately. This is done for
      performance reasons when one wants to, e.g.
      analyse metadata only of frames only.
      
      If for some reason device delivered a frame buffer
      which was sized below what 802.11 header implied
      tracing logic would blow doing an invalid memory
      accesses.
      
      I've hit this problem when running IBSS on QCA988X
      with 999.999.0.636 and tracing at the same time.
      
      Fixes: 5ce8e7fd ("ath10k: handle ieee80211 header and payload tracing separately")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      36d8230b
    • Michal Kazior's avatar
      ath10k: fix error handling in pci_probe · d9585a92
      Michal Kazior authored
      If chip_id wasn't recognized clean up code wasn't
      executed properly. It would skip freeing memory
      causing a leak and irqs causing possibly MSI
      warning splats later or even kernel crashes.
      
      Fixes: 1a7fecb7 ("ath10k: reset chip before reading chip_id in probe")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      d9585a92
  2. 15 Apr, 2015 5 commits
    • Peter Oh's avatar
      ath: lower JP W53 band DFS detection threshold around 30% · 26bea13a
      Peter Oh authored
      Japan's W53 band requires 50% data traffic during its DFS test,
      but WLAN baseband used by ath9k and ath10k is not able to achieve
      current threshold rate, 50%, under the data traffic rate.
      In other words, HW occasionally fails detecting radar pulses,
      so that SW cannot get enough radar reports to achieve the rate.
      Signed-off-by: default avatarPeter Oh <poh@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      26bea13a
    • Peter Oh's avatar
      ath: define JP DFS patterns separated from FCC · cb3fbd63
      Peter Oh authored
      Separate Japan's DFS pattern from FCC to control PPB threshold.
      
      Currently all the radar detectors use the same threshold rate at
      50%, but it's not able to achieve if data traffic rate is higher
      than 40% because WLAN baseband used by ath9k and ath10k often fails
      detecting radar pulses, so that SW cannot get enough radar reports
      to achieve the rate.
      
      Since Japan's W53 band requires 50% data traffic during its DFS
      test we need to apply different threshold rate than others on it.
      Hence define its own pattern to give flexibility to threshold rate.
      Signed-off-by: default avatarPeter Oh <poh@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      cb3fbd63
    • Michal Kazior's avatar
      ath10k: use scan burst for hw roc · dbd3f9f3
      Michal Kazior authored
      This improves chances of getting onto a foreign
      channel and thus makes P2P a bit more reliable.
      
      Without scan burst it was possible for firmware to
      not switch to foreign channel resulting in "failed
      to switch to channel for roc scan" warning. This
      would also effectively fail some offchan tx
      requests and lead to P2P find/connect taking
      longer. This could be observed when other vifs
      were running/busy, e.g. with P2P GO.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      dbd3f9f3
    • Michal Kazior's avatar
      ath10k: fix hw roc expiration · fcf98446
      Michal Kazior authored
      It is not guaranteed firmware will switch to
      foreign channel immediately after starting scan
      sequence. To account for that don't use duration
      parameter for scan time. Instead request insanely
      long scan and use timeout worker to cancel it from
      driver.
      
      This should improve P2P reliability a bit.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      fcf98446
    • Peter Oh's avatar
      ath: support new FCC DFS Radar Type 1 · 694c0e0a
      Peter Oh authored
      Add support for new FCC DFS rules released on August 14, 2014.
      FCC has added a new radar type named Radar Type 1 and original
      Radar Type 1 is renamed to Radar Type 0 in consequence.
      
      During the certificate test, Type 1 PRI values are randomly selected
      within the range of 518 and 3066 and we divide it to 3 groups based on
      practical test result data collected for more than a year.
      
      For about Radar type ID, it does nothing to functionalities.
      In other words, even if we re-order the IDs, DFS detection will
      work as well, but we give the ID with matching to FCC doc.
      
      By adding this support, the drivers using this DFS function are
      able to support both of old and new FCC DFS rules simultaneously
      without any other changes.
      Signed-off-by: default avatarPeter Oh <poh@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      694c0e0a
  3. 09 Apr, 2015 7 commits
  4. 01 Apr, 2015 17 commits
  5. 30 Mar, 2015 3 commits