Commit graph

580706 commits

Author SHA1 Message Date
Felix Fietkau
db0faac507 ath10k: stop abusing GFP_DMA
Allocations from the DMA zone were originally added for legacy ISA
stuff, or PCI devices that have specific limitations in their DMA
addressing capabilities. It has no place in ath10k, which can do
full 32-bit DMA.

Fixes memory allocation errors on some platforms.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:32 +05:30
Mohammed Shafi Shajakhan
744bdbf8b5 ath10k: Enable AP + STA interface combination support for 10.x
Enable AP + STA interface combination support for 10.x and
this enables Repeater mode testing (with WDS Repeater combinations
as well). Fix indentation as well.

Based on the suggestions from Michal and Yanbo Li,
thanks to them

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:31 +05:30
Peter Oh
c3642e0177 ath10k: fix board data fetch error message
The error message order of board data fetch is board info,
directory, and then file name, hence place print arguments
in the order.

Fixes: 0a51b343ab ("ath10k: add board 2 API support")
Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:31 +05:30
Michal Marek
4165e8c076 ath10k: Fix build with CONFIG_THERMAL=m
After commit cf4f21938e13 ("kbuild: Allow to specify composite modules
with modname-m"), thermal.c gets included in the driver and the build
fails with

drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of ‘ath10k_thermal_event_temperature’
drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of ‘ath10k_thermal_event_temperature’ was here
drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of ‘ath10k_thermal_set_throttling’
drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of ‘ath10k_thermal_set_throttling’ was here
drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of ‘ath10k_thermal_register’
drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of ‘ath10k_thermal_register’ was here
drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of ‘ath10k_thermal_unregister’
drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of ‘ath10k_thermal_unregister’ was here

Change the #ifdef to reflect the new kbuild behavior.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2017-01-06 15:58:31 +05:30
Michal Kazior
d8e7cd18cb ath10k: store msdu_id instead of txbuf pointers
Txbuf is no longer a DMA pool and can be easily
tracked with a mere msdu_id. This saves 10 bytes
on 64bit systems and 6 bytes on 32bit systems of
precious sk_buff control buffer.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:31 +05:30
Michal Kazior
e29fb8f892 ath10k: replace vdev_id and tid in skb cb
This prepares the driver for future ieee80211_txq
and wake_tx_queue() support.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:31 +05:30
Michal Kazior
7f620b935b ath10k: fix tx header parsing
Frames are not guaranteed to be 802.11 frames in
ath10k_htt_tx() and the tx completion handler.
In some cases, like TDLS, they can be Ethernet.
Hence checking, e.g. frame_control could yield
bogus results and behavior.

Fortunately this wasn't a real problem so far
because there's no FW/HW combination to encounter
this problem.

However it is good to fix this in advance.

Fixes: 75d85fd999 ("ath10k: introduce basic tdls functionality")
Fixes: eebc67fef3 ("ath10k: fix pmf for wmi-tlv on qca6174")
Fixes: 7b7da0a021 ("ath10k: drop probe responses when too many are queued")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:31 +05:30
Michal Kazior
e7b8400db7 ath10k: pack up flags in skb_cb
It was wasteful to have all the flags as separate
bools.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Michal Kazior
971de37033 ath10k: remove freq from skb_cb
It was wasteful to keep it in the struct.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Michal Kazior
3594df2eae ath10k: remove is_offchan
It was wasteful to keep it in the struct.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Michal Kazior
226caa33bc ath10k: remove txmode from skb_cb
It was wasteful to keep it in the struct because
it can be passed as function argument down the tx
path.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Michal Kazior
bf9e75d798 ath10k: rename function to adhere to naming convention
All functions should have ath10k_{filename}_
prefixes.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Michal Kazior
04a22eefea ath10k: merge is_protected with nohwcrypt
It was wasteful to have two flags describing
the same thing.

While at it fix code style of
ath10k_tx_h_use_hwcrypto().

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:30 +05:30
Yanbo Li
0a0e23c0f2 ath10k: adjust the RX packet pad offset at QCA99X0 4addr mode
The QCA99X0 4 addresses RX packets pad 2 bytes at the beginning of
MSDU instead the end of ieee80211 header to keep alignment. The currently RX
data path can't parse the header correctly in this case. This patch fixes it
for QCA99X0.

Signed-off-by: Yanbo Li <yanbol@qca.qualcomm.com>
[kvalo@qca.qualcomm.com: checkpatch fixes and naming changes]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Yanbo Li
ebf04e9f63 ath10k: fix the wrong RX rate idx report at 11G mode
The RX rate idx is not correct for 11G mode OFDM packet.
Because the bitrate table start with CCK index instead of OFDM.

Signed-off-by: Yanbo Li <yanbol@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Vasanthakumar Thiagarajan
401d91104c ath10k: fix peerid configuration in htt tx desc for htt version < 3.4
Of a word in struct htt_data_tx_desc htt version >= 3.4 firmware uses
LSB 16-bit for frequency configuration which is used for offchannel tx
and MSB 16-bit is for peerid. But other firmwares using version 2.X
(10.1, 10.2.2, 10.2.4 and 10.4) are using 32-bit for peerid in htt tx
desc. So far no issue is found with the existing code setting peerid and
freq for HTT version 2.X, this could be mainly because of 0 as frequecy
(home channel) is being always passed with those firmwares. There may be
issues when non-zero freq is passed with firmware using < 3.4 htt version.
To be safe use target_version_major and target_version_minor along with
htt-op-version before configuring peer id and freq in htt tx desc. This
patch extends ath10k_mac_tx_frm_has_freq() to check for htt_op_version_tlv
and uses the helper while setting peerid in htt_tx_desc.

Fixes: 8d6d362436 ("ath10k: fix offchan reliability")
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Vasanthakumar Thiagarajan
e621101bb3 ath10k: rename the helper which is used for off-channel tx
Rename ath10k_mac_need_offchan_tx_work() to ath10k_mac_tx_frm_has_freq()
to make it more meaningful. This helper will be used in the future
change. No functionality change.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Vasanthakumar Thiagarajan
0065aaa567 ath10k: fix peer assoc complete WMI command for 10.4
There is an extra 4-byte member when compared to WMI 10.2 added to
assoc complete command in WMI 10.4. This new member is used for 160Mhz
related configuration. This WMI command mismatch between host and
firmware does not cause any real issues because this new member is not
used in 10.4 firmwares so far (10.4.1.00030-1). This difference in WMI
command interface brings in a new wmi_ops for 10.4 gen_peer_assoc().
No noticeable functionality differences with this change can be seen
with the current 10.4 firmwares, but the WMI interface has to be
fixed to work with future 10.4 firmwares which may be using this new
member.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Govind Singh
72980ae743 ath10k: add support for pktlog in QCA99X0
This patch adds pktlog support for 10.4 fw versions.

Change-Id: Idf8c04dbc0da427dabbeb09b91e328ee1730dc80
Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:29 +05:30
Yanbo Li
dacedd1b3f ath10k: debugfs file to enable Bluetooth coexistence feature
As not all QCA98XX radios are not connected to Bluetooth modules, enabling the
BT coex feature in firmware will have side effects if the radio's GPIO are
connected with other (non-BT) HW modules. Add debugfs file to control the
firmware BT coex logic and set the feature as disable by default to avoid that
btcoex is accidentally enabled.

To enable this feature, execute:

echo 1 > /sys/kernel/debug/ieee80211/phyX/ath10k/btcoex

To disable:

echo 0 > /sys/kernel/debug/ieee80211/phyX/ath10k/btcoex

The firmware support this feature since 10.2.4.54 on 2G-only board, dual band
or 5G boards don't support this. The feature's name is WMI_SERVICE_COEX_GPIO
and the btcoex file is not created if firmware doesn't support it.

Signed-off-by: Yanbo Li <yanbol@qca.qualcomm.com>
[kvalo@qca.qualcomm.com: use btcoex filename and other smaller fixes]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Vasanthakumar Thiagarajan
36a347c870 ath10k: add new pdev params defines to 10.4
No functionality change, just sync to the latest
pdev params that 10.4 firmware defines.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Vasanthakumar Thiagarajan
b7ac3da64e ath10k: add new WMI cmd/event defines for 10.4
No real functionality change, add WMI command/event
defines to be in sync with 10.4 firmware.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Vasanthakumar Thiagarajan
42dc15b91c ath10k: add new service defines for 10.4
No functional changes, adds new wmi service bits for
10.4 firmware to be sync with 10.4 firmware.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Tamizh chelvam
ff2c6a4c23 ath10k: add thermal throttling support for 10.4 firmware
This patch enables thermal throttling support for 10.4 firmware.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Tamizh chelvam
00afeb5bdc ath10k: set peer MFP flag in peer assoc command
Set peer's management frame protection flag in peer assoc command,
this setting will enable/disable encrytion of management frames in fw.

Setting of this flag is based on whether MFP is enabled/disabled at STA
and a firmware feature flag ATH10K_FW_FEATURE_MFP_SUPPORT. This is because
only firmwares 10.1.561 and above have support for MFP.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: Manikanta pubbisetty <c_mpubbi@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:28 +05:30
Tamizh chelvam
3be1467111 ath10k: add abstraction layer for peer flags
Abstraction layer for peer flags is added to fix ABI breakage.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:27 +05:30
Manikanta Pubbisetty
198b1f92d0 ath10k: consolidate if statements in ath10k_wmi_event_mgmt_rx
This patch replaces multiple if conditional checks with a single if condition
in WMI management rx handler. Found during code review.

Signed-off-by: Manikanta Pubbisetty <manikanta.pubbisetty@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-01-06 15:58:27 +05:30
Linux Build Service Account
2116b44bd3 Merge "ARM: dts: msm: Add APC0/1 CPR instances for sdm660" 2017-01-05 02:09:06 -08:00
Linux Build Service Account
ed4ef900e9 Merge "sched: Delete heavy task heuristics in prediction code" 2017-01-05 02:09:05 -08:00
Linux Build Service Account
54aaf0328a Merge "thermal: tsens: Remove calibration functions" 2017-01-05 02:09:04 -08:00
Linux Build Service Account
e48066aa5f Merge "msm: mdss: advertize hdr support on msm8998" 2017-01-05 02:09:03 -08:00
Linux Build Service Account
3ef2b6c93c Merge "msm: mdss: avoid possible infinite loop on kmalloc failure" 2017-01-05 02:09:02 -08:00
Linux Build Service Account
8b24b9db96 Merge "msm: mdss: fix cwb output buffer memory leak" 2017-01-05 02:09:01 -08:00
Linux Build Service Account
c4ae5b8690 Merge "ARM: dts: msm: Introduce bus topology for sdm630" 2017-01-05 02:09:01 -08:00
Linux Build Service Account
53a6c09ff4 Merge "msm: mdss: fix programming of scaler lut_ctrl register" 2017-01-05 02:09:00 -08:00
Linux Build Service Account
6b5c6d44ea Merge "msm: sde: move config validation earlier to stream on" 2017-01-05 02:08:59 -08:00
Linux Build Service Account
1841235aad Merge "ARM: dts: msm: add support for truly panel in dsc mode" 2017-01-05 02:08:58 -08:00
Linux Build Service Account
dbbac4f76f Merge "sched: Fix new task accounting bug in transfer_busy_time()" 2017-01-05 02:08:58 -08:00
Linux Build Service Account
24df0afae9 Merge "ppp: take reference on channels netns" 2017-01-05 02:08:57 -08:00
Linux Build Service Account
0cb304caa5 Merge "msm: kgsl: Add Zap shader name for A512 GPU on SDM660" 2017-01-05 02:08:56 -08:00
Linux Build Service Account
fa69f96bbb Merge "msm: mdss: rename dsi phy version for msm8996 and sdm660" 2017-01-05 02:08:55 -08:00
Linux Build Service Account
a5d7c799af Merge "msm: mdss: Set default fps for dedicated WB" 2017-01-05 02:08:50 -08:00
Linux Build Service Account
fbc0f1b44f Merge "msm: mdss: Memset commit structure in compat path" 2017-01-05 02:08:49 -08:00
Linux Build Service Account
11e1f7acff Merge "msm: mdss: Add sysfs node for mdss to give runtime fps" 2017-01-05 02:08:48 -08:00
Linux Build Service Account
d4e1fb98bd Merge "msm: mdss: Allow WB to use first available control path" 2017-01-05 02:08:48 -08:00
Linux Build Service Account
9bcaa86e0c Merge "msm: mdss: Fix potential NULL pointer dereference in mdss smmu driver" 2017-01-05 02:08:47 -08:00
Linux Build Service Account
7da94c32a4 Merge "msm: mdss: print fence name during sync fence timeouts" 2017-01-05 02:08:47 -08:00
Linux Build Service Account
afc76e01c9 Merge "msm: mdss: Fix compat IOCTLS in rotator and primary" 2017-01-05 02:08:46 -08:00
Linux Build Service Account
dfc703f24a Merge "msm: mdss: Fix potential NULL pointer dereferences" 2017-01-05 02:08:46 -08:00
Linux Build Service Account
fff2d13b25 Merge "msm: mdss: Initialize pan_name array to 0 and handle error case" 2017-01-05 02:08:45 -08:00