History log of /linux-master/drivers/net/wireless/ath/ath6kl/wmi.c
Revision Date Author Comments
# 0dff6f05 07-Mar-2022 Gustavo A. R. Silva <gustavoars@kernel.org>

ath6kl: wmi: Replace one-element array with flexible-array member in struct wmi_aplist_event

Replace one-element array with flexible-array member in struct
wmi_aplist_event.

Also, make use of the struct_size() helper and remove unneeded variable
ap_info_entry_size.

This issue was found with the help of Coccinelle and audited and fixed,
manually.

Link: https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/79
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1b7889828f23763c034c1558cbab9c8e2066053e.1645736204.git.gustavoars@kernel.org


# 56f1257f 07-Mar-2022 Gustavo A. R. Silva <gustavoars@kernel.org>

ath6kl: wmi: Replace one-element array with flexible-array member in struct wmi_start_scan_cmd

Replace one-element array with flexible-array member in struct
wmi_start_scan_cmd. Also, make use of the struct_size() helper.

This issue was found with the help of Coccinelle and audited and fixed,
manually.

Link: https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/8b33c6d86a6bd40b5688cf118b4b35850db8d8c7.1645736204.git.gustavoars@kernel.org


# 324edddf 07-Mar-2022 Gustavo A. R. Silva <gustavoars@kernel.org>

ath6kl: wmi: Replace one-element array with flexible-array member in struct wmi_begin_scan_cmd

Replace one-element array with flexible-array member in struct
wmi_begin_scan_cmd. Also, make use of the struct_size() helper.

This issue was found with the help of Coccinelle and audited and fixed,
manually.

Link: https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/79
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1ef801ea24475501fa0f296cb5435a440135206e.1645736204.git.gustavoars@kernel.org


# fd6729ec 13-Aug-2021 Dan Carpenter <dan.carpenter@oracle.com>

ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()

This error path is unlikely because of it checked for NULL and
returned -ENOMEM earlier in the function. But it should return
an error code here as well if we ever do hit it because of a
race condition or something.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210813113438.GB30697@kili


# 54433367 03-May-2021 Anirudh Rayabharam <mail@anirudhrb.com>

ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

Propagate error code from failure of ath6kl_wmi_cmd_send() to the
caller.

Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-44-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# efba106f 03-May-2021 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()"

This reverts commit fc6a6521556c8250e356ddc6a3f2391aa62dc976.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted. It will be fixed up "correctly" in a
later kernel change.

The change being reverted does NOTHING as the caller to this function
does not even look at the return value of the call. So the "claim" that
this fixed an an issue is not true. It will be fixed up properly in a
future patch by propagating the error up the stack correctly.

Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-43-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ce54bf5e 26-Oct-2020 Arnd Bergmann <arnd@arndb.de>

ath6kl: fix enum-conversion warning

gcc -Wextra points out a type mismatch

drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_cmd_send':
drivers/net/wireless/ath/ath6kl/wmi.c:1825:19: warning: implicit conversion from 'enum <anonymous>' to 'enum wmi_data_hdr_data_type' [-Wenum-conversion]
1825 | false, false, 0, NULL, if_idx);
| ^~~~~

As far as I can tell, the numeric value is current here,
so just use the correct enum literal instead of 'false'.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201026213040.3889546-9-arnd@kernel.org


# 6a950755 18-Sep-2020 Dan Carpenter <dan.carpenter@oracle.com>

ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd()

The "tsid" is a user controlled u8 which comes from debugfs. Values
more than 15 are invalid because "active_tsids" is a 16 bit variable.
If the value of "tsid" is more than 31 then that leads to a shift
wrapping bug.

Fixes: 8fffd9e5ec9e ("ath6kl: Implement support for QOS-enable and QOS-disable from userspace")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200918142732.GA909725@mwanda


# e5851849 26-Aug-2020 Lee Jones <lee.jones@linaro.org>

ath6kl: wmi: Remove unused variable 'rate'

Fixes the following W=1 kernel build warning(s):

drivers/net/wireless/ath/ath6kl/wmi.c: In function ‘ath6kl_wmi_bitrate_reply_rx’:
drivers/net/wireless/ath/ath6kl/wmi.c:1204:6: warning: variable ‘rate’ set but not used [-Wunused-but-set-variable]

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200826093401.1458456-15-lee.jones@linaro.org


# ab8c31dd 03-Jul-2019 Fuqian Huang <huangfq.daxian@gmail.com>

net/wireless: Use kmemdup rather than duplicating its implementation

kmemdup is introduced to duplicate a region of memory in a neat way.
Rather than kmalloc/kzalloc + memcpy, which the programmer needs to
write the size twice (sometimes lead to mistakes), kmemdup improves
readability, leads to smaller code and also reduce the chances of mistakes.
Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 5d6751ea 04-Apr-2019 Dan Carpenter <dan.carpenter@oracle.com>

ath6kl: add some bounds checking

The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bounds
checks to prevent array overflows.

I also modified one existing check from "if (traffic_class > 3) {" to
"if (traffic_class >= WMM_NUM_AC) {" just to make them all consistent.

Fixes: bdcd81707973 (" Add ath6kl cleaned up driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 83d9562b 03-Apr-2019 Gustavo A. R. Silva <gustavo@embeddedor.com>

ath6kl: wmi: use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, replace code of the following form:

sizeof(*ev) + ev->num_neighbors * sizeof(struct wmi_neighbor_info)

with:

struct_size(ev, neighbor, ev->num_neighbors)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# fc6a6521 25-Dec-2018 Kangjie Lu <kjlu@umn.edu>

ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

ath6kl_wmi_cmd_send could fail, so let's return its error code upstream.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 3152a974 03-Dec-2018 Sagi Grimberg <sagi@lightbitslabs.com>

ath6kl: add ath6kl_ prefix to crypto_type

Prevent a namespace conflict as in following patches as skbuff.h will
include the crypto API.

Acked-by: David S. Miller <davem@davemloft.net>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 7ac76764 24-Oct-2017 Kees Cook <keescook@chromium.org>

ath: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# b34939b9 28-Apr-2017 Arend Van Spriel <arend.vanspriel@broadcom.com>

cfg80211: add request id to cfg80211_sched_scan_*() api

Have proper request id filled in the SCHED_SCAN_RESULTS and
SCHED_SCAN_STOPPED notifications toward user-space by having the
driver provide it through the api.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 169345d4 30-Mar-2017 Joe Perches <joe@perches.com>

ath6kl: add __printf verification to ath6kl_dbg

Fix fallout too.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Steve deRosier <derosier@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 10f3366b 24-Oct-2016 Arnd Bergmann <arnd@arndb.de>

wireless: fix bogus maybe-uninitialized warning

The hostap_80211_rx() function is supposed to set up the mac addresses
for four possible cases, based on two bits of input data. For
some reason, gcc decides that it's possible that none of the these
four cases apply and the addresses remain uninitialized:

drivers/net/wireless/intersil/hostap/hostap_80211_rx.c: In function ‘hostap_80211_rx’:
arch/x86/include/asm/string_32.h:77:14: warning: ‘src’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/net/wireless/intel/ipw2x00/libipw_rx.c: In function ‘libipw_rx’:
arch/x86/include/asm/string_32.h:77:14: error: ‘dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
arch/x86/include/asm/string_32.h:78:22: error: ‘*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This warning is clearly nonsense, but changing the last case into
'default' makes it obvious to the compiler too, which avoids the
warning and probably leads to better object code too.

The same code is duplicated several times in the kernel, so this
patch uses the same workaround for all copies. The exact configuration
was hit only very rarely in randconfig builds and I only saw it
in three drivers, but I assume that all of them are potentially
affected, and it's better to keep the code consistent.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# b9301505 18-Sep-2016 Chaehyun Lim <chaehyun.lim@gmail.com>

ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd

When building with W=1, we got one warning as belows:
drivers/net/wireless/ath/ath6kl/wmi.c:3509:6: warning: variable ‘ret’
set but not used [-Wunused-but-set-variable]

At the end of ath6kl_wmi_set_pvb_cmd, it is returned by 0 regardless of
return value of ath6kl_wmi_cmd_send.
This patch fixes return value from 0 to ret that has result of
ath6kl_wmi_cmd_send execution.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 93b4a09f 17-May-2016 Heinrich Schuchardt <xypron.glpk@gmx.de>

ath6kl: simplify logical condition

x <= 7 implies x < 8.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 57fbcce3 12-Apr-2016 Johannes Berg <johannes.berg@intel.com>

cfg80211: remove enum ieee80211_band

This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# c9b260a6 07-Mar-2016 Steve deRosier <derosier@gmail.com>

ath6kl: ignore WMI_TXE_NOTIFY_EVENTID based on fw capability flags

Certain 6004 firmware releases redefine the WMI_TXE_NOTIFY_EVENTID event
number and sends the new event frequently. However it doesn't have the
tx-err-notify feature and thus this firmware capability flag isn't set on
the firmware package. By guarding the processing of this event by the same
method we guard the sending of the WMI_SET_TXE_NOTIFY_CMDID command, we
can ignore the spurious event that we don't know how to process.

Without this change we call cfg80211_cqm_txe_notify() with possibly bad
data.

Signed-off-by: Steve deRosier <steve.derosier@lairdtech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e1c05067 06-Jul-2015 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: fix typos in comment blocks

Looks like the word "contiguous" is often mistyped.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>


# 5bc8c1f2 12-Aug-2014 Johannes Berg <johannes.berg@intel.com>

cfg80211: allow passing frame type to cfg80211_inform_bss()

When using the cfg80211_inform_bss[_width]() functions drivers
cannot currently indicate whether the data was received in a
beacon or probe response. Fix that by passing a new enum that
indicates such (or unknown).

For good measure, use it in ath6kl.

Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath6kl]
Acked-by: Arend van Spriel <arend@broadcom.com> [brcmfmac]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 970fdfa8 11-Aug-2014 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>

cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()

In the cfg80211_rx_mgmt(), parameter @gfp was used for the memory allocation.
But, memory get allocated under spin_lock_bh(), this implies atomic context.
So, one can't use GFP_KERNEL, only variants with no __GFP_WAIT. Actually, in all
occurrences GFP_ATOMIC is used (wil6210 use GFP_KERNEL by mistake),
and it should be this way or warning triggered in the memory allocation code.

Remove @gfp parameter as no actual choice exist, and use hard coded
GFP_ATOMIC for memory allocation.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# c1d32d30 16-Jun-2014 Jessica Wu <wjessica@qca.qualcomm.com>

ath6kl: add support wmi rate tables with mcs15

Some of the firmware versions support rate tables up to mcs15, add support for
that.

Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# eba95bce 16-Jun-2014 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: convert ar6004 hardware flags to firmware feature flags

The functionality defined through these flags were actually firmware features
which can change between firmware versions. To make it possible to support
different firmware versions with the same driver, convert the flags to firmware
feature flags.

For backwards compatibility support for old ar6004 firmware FW
API 3 or smaller images we forcefully set the feature bits in the driver.
Starting from FW API 5 the firmware image needs to set them.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c1e5f471 19-May-2014 Johannes Berg <johannes.berg@intel.com>

cfg80211: constify more pointers in the cfg80211 API

This also propagates through the drivers.

The orinoco driver uses the cfg80211 API structs for internal
bookkeeping, and so needs a (void *) cast that removes the
const - but that's OK because it allocates those pointers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# a5d8f9df 10-Mar-2014 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: use braces on both arms of if statement

Fixes checkpatch warning:

CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3629fa14 10-Mar-2014 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: fix blank lines before and after braces

Fixes checkpatch warnings:

CHECK: Blank lines aren't necessary after an open brace '{'
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ef8c0017 13-Feb-2014 Kalle Valo <kvalo@qca.qualcomm.com>

ath: remove camel case from struct reg_dmn_pair_mapping

Fixes a checkpatch warning in ath10k:

drivers/net/wireless/ath/ath10k/mac.c:1636: WARNING: Avoid CamelCase: <regpair->regDmnEnum>

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d1e33e65 05-Dec-2013 Janusz Dziedzic <janusz.dziedzic@tieto.com>

cfg80211: in bitrate_mask, rename mcs to ht_mcs

Rename NL80211_TXRATE_MCS to NL80211_TXRATE_HT and also
rename mcs to ht_mcs in struct cfg80211_bitrate_mask.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
[reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 19504cf5 15-Aug-2013 Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>

cfg80211: add flags to cfg80211_rx_mgmt()

Add flags intended to report various auxiliary information
and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report
that the frame was already answered by the device.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
[REPLIED->ANSWERED, reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 99089ab7 09-Mar-2013 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()

Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd()
where we might access sc->supp_rates beyond the end. It shouldn't happen as
ar->wiphy->bands always have just the first two bands set, but add an extra
check just to be sure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 416cf0b4 18-Mar-2013 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add tracing support and tracing points for wmi packets

Add basic tracing infrastructure support to ath6kl and which can be
enabled with CONFIG_ATH6KL_TRACING.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 5b112d3d 31-Jan-2013 Johannes Berg <johannes.berg@intel.com>

cfg80211: pass wiphy to cfg80211_ref_bss/put_bss

This prepares for using the spinlock instead of krefs
which is needed in the next patch to track the refs
of combined BSSes correctly.

Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# eb922e4b 16-Nov-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath6kl: Parse beacon interval from userspace

Parse beacon interval from userspace to
firmware. Incase the firmware does not
supports it, just print a warning message
and continue with AP settings.

Cc: Sumathi Mandipati <sumathi@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e16ccfee 16-Nov-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath6kl: remove unnecessary check for NULL skb

dev_kfree_skb kernel API itself takes for checking for NULL
skb, so an explicit check is not required.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 42d97a59 08-Nov-2012 Johannes Berg <johannes.berg@intel.com>

cfg80211: remove remain-on-channel channel type

As mwifiex (and mac80211 in the software case) are the
only drivers actually implementing remain-on-channel
with channel type, userspace can't be relying on it.
This is the case, as it's used only for P2P operations
right now.

Rather than adding a flag to tell userspace whether or
not it can actually rely on it, simplify all the code
by removing the ability to use different channel types.
Leave only the validation of the attribute, so that if
we extend it again later (with the needed capability
flag), it can't break userspace sending invalid data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# c0b34e2b 27-Sep-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath6kl: Rename ATH6KL_HW_FLAG_64BIT_RATES

Rename ATH6KL_HW_FLAG_64BIT_RATES to ATH6KL_HW_64BIT_RATES.
This seemed to be necessary to add/use new hardware flags
without exceeding 80 lines. We shall be adding new hw flags
dropping the FLAG term.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d54601b9 21-Sep-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Check for valid rate table index

There are 28 items defined in rate table array 'wmi_rate_tbl'.
The rate table index (reply->rate_index) in ath6kl_wmi_bitrate_reply_rx()
func is not checked for the valid max limit index before accessing
rate table array. There may be some incidents to get memory crashes
without safe max check. Fix this.

Found this on code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 43a06b34 21-Sep-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Avoid null ptr dereference while printing reg domain pair

Return value of ath6kl_get_regpair() is stored in 'regpair' in
ath6kl_wmi_regdomain_event() func and it's directly accessed
in the debug prints without checking for NULL value. There are
situation to get NULL pointer as a return value from
ath6kl_get_regpair() func. Fix this.

Found this on code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 92332993 29-Aug-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Add support to detect fw error through heart beat

This patch adds support to detect fw error condition by sending
periodic message (heart beat challenge) to firmware. Upon reception
of the message, fw would send a response event to driver. When
there are no reponses from fw for about 5 cmd driver would
trigger the recovery logic assuming that fw has gone into an
error state.

Capable fw will advertise this capability through
ATH6KL_FW_CAPABILITY_HEART_BEAT_POLL bit. This feature
is disabled by default, can be enabled through a modparam
(heart_beat_poll). This modparam also confiures the polling
interval in msecs.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 83685091 28-Aug-2012 Dengke Qiu <dqiu@qca.qualcomm.com>

ath6kl: fix link speed when using sgi

The MSB of rate index from FW is used for sgi. But the ath6kl_wmi_get_rate
doesn't handle it. The access to wmi_rate_tbl array may be out of range
if sgi is 1. This may cause the return value of ath6kl_wmi_get_rate()
function is incorrect link rate. We add sgi adjustment to avoid such case.

kvalo: change patch title

Signed-off-by: Dengke Qiu <dqiu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# b1f47e3a 15-Aug-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: rework scheduled scan

This patch reflects changes in the firmware scheduled scan
implementation to behave better in cases with multiple concurrent vifs.
Major changes:

- scheduled scan filters and state are now programmed per-vif.
- decouple scheduled scan from host sleep.

To maintain graceful failure with old firmwares, a new firmware
capability bit is introduced: ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2.
ath6kl simply won't advertise scheduled scan to cfg80211 if the
SCHED_SCAN_V2 is not supported.

Since firmwares from here on out won't support the previous implicit API
for scheduled scan (set WoW filters and host sleep), bump the firmware
API to protect old drivers.

Unfortunately, due to firmware RAM constraints ath6kl still cannot
expect a scan complete event at the end of a scheduled scan results
cycle, so the sched_scan_timer is retained.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 0616dc1f 13-Aug-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Fix potential skb double free in ath6kl_wmi_sync_point()

skb given to ath6kl_control_tx() is owned by ath6kl_control_tx().
Calling function should not free the skb for error cases.
This is found during code review.

kvalo: fix a checkpatch warning in ath6kl_wmi_cmd_send()

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f8c03053 11-Jul-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: fix incorrect use of IEEE80211_NUM_BANDS

ath6kl was incorrectly assuming that IEEE80211_NUM_BANDS will always be 2
and used that also in the firmware WMI interface definitions. But after
the support for 60 GHz was added to cfg80211 IEEE80211_NUM_BANDS changed to 3
and this can cause all sort of problems, possibly even memory corruption.
I only found this during code review and didn't notice any bugs, but I'm
sure there are a few lurking somewhere.

To fix this rename unused A_NUM_BANDS to ATH6KL_NUM_BANDS, which is
always defined to be 2, and use that in WMI.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 84841ba2 19-Jul-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add support for changing contry code

To make it possible to change the country code from user space via nl80211
add handler for reg_notifier. The feature is only enabled when built
time option CONFIG_ATH6KL_REGDOMAIN is enabled, which again depends on
CFG80211_CERTIFICATION_ONUS for certication purposes.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 11f0bfcf 19-Jul-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: refactor wmi scan command

ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX was checked in cfg80211.c which is
a bit awkward when adding more callsites to the scan functions. Refactor
the code to wmi.c so that it's transparent to the callers.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c8c72b74 19-Jul-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: move ath6kl_wmi_startscan_cmd()

To make it easier to refactor the scan commands move
ath6kl_wmi_startscan_cmd() before the beginscan function. No functional
changes.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 279b2862 17-Jul-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: support TX error rate notification

The ath6kl firmware can monitor a connection and report when a certain
TX failure threshold is crossed. Support this configuration and event
reporting on compatible firmwares.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 85b20fc2 21-Jun-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: support rssi threshold for sched scan

The ath6kl firmware can filter scan results based on rssi. This is
useful to limit hosts wakeups on scheduled scans.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 71bbc994 15-Jun-2012 Johannes Berg <johannes.berg@intel.com>

cfg80211: use wdev in mgmt-tx/ROC APIs

The management frame and remain-on-channel APIs will be
needed in the P2P device abstraction, so move them over
to the new wdev-based APIs. Userspace can still use both
the interface index and wdev identifier for them so it's
backward compatible, but for the P2P Device wdev it will
be able to use the wdev identifier only.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# d154f32e 30-May-2012 Etay Luz <eluz@qca.qualcomm.com>

ath6kl: support changing dtim period on AP mode

This patch adds support for dtim_period configuration in beacon.

kvalo: add a comment about ignoring the error, use vif_idx,
add \n to the warning message

Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 824174c3 28-May-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Remove unneeded memset in roam related config func

No need to clear requested memory after allocating new SKB
with help of ath6kl_wmi_get_new_buf(). This clear part is
already taken care in ath6kl_wmi_get_new_buf().

Found this on code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 06e360ac 22-May-2012 Bala Shanmugam <bkamatch@qca.qualcomm.com>

ath6kl: Add support for setting tx rateset.

Tx legacy and mcs rateset can configured using iw for
2.4 and 5 bands. Add support for the same in driver.

kvalo: add an enum for the hw flags and rename the flag accordingly,
rename ath6kl_cfg80211_set_bitrate_mask() to a shorter version to make
it easier to indent

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c422d52d 15-May-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: enable enhanced bmiss detection

Enable enhanced bmiss detection if the firmware supports it. This
feature is only enabled on some firmwares since it comes with a power
cost.

Also add a few missing command ids to keep the enums straight.

kvalo: fix a compiler with ath6kl_err(), add few empty lines

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 8ab5415d 09-May-2012 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Use correct max-scan-SSIDs limit

The currently used firmware images support 16 SSIDs in the scan
request (indexes 0..15), so update the host driver to use the same
limit to allow some more SSIDs to be scanned per request. In addition,
change the max-index to max-SSIDs to make it easier to understand the
implementation and fix couple of off-by-one checks that could limit
the maximum number of entries too strictly.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f3740572 02-May-2012 Vivek Natarajan <nataraja@qca.qualcomm.com>

ath6kl_sdio: Fix the EAPOL out of order issue

Send the EAPOL and management frames in the same AC_VO queue. The issue
happens when the AP supports QOS, the management frames are sent to AC_VO
queue and EAP frame goes to AC_BE queue. Even though the EAP frame is
queued before the DEAUTH management frame, as they are queued on different
h/w queues, order of delivery between these frames cannot be controlled.

This fixes the connection failure seen in P2P case.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 03e2084a 24-Apr-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: check for sband existence when creating scan cmd

The patch "ath6kl: support fw reporting phy capabilities" gave the
firmware the ability to disable certain wiphy supported bands. Check if
this is the case in ath6kl_wmi_beginscan_cmd to avoid dereferencing a
NULL pointer.

kvalo: change the patch so that there's no code between declarations

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1560ac7d 23-Apr-2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>

ath6kl: include in.h explicitly

Do not assume anyone before us includes it for us.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d92917e4 19-Apr-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: support fw reporting phy capabilities

Currently the supported bands are just hard coded in the driver.
However, the ath6kl FW will include its 11n and band capabilites in a
WMI_READY event. Handle this and report capabilites to cfg80211
accordingly.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# cdeb8602 12-Apr-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: merge split format strings into one

Found by checkpatch:

WARNING: quoted string split across lines

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d97c121b 09-Apr-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Fix 4-way handshake failure in AP and P2P GO mode

RSN capability field of RSN IE which is generated (which is what really
advertised in beacon/probe response) differs from the one generated in
wpa_supplicant. This inconsistency in rsn IE results in 4-way handshake
failure. To fix this, configure rsn capability used in wpa_supplicant
in firmware using a new wmi command, WMI_SET_IE_CMDID. There is a bit
(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) in fw_capabilities to advertise
this support to driver.

Signed-off-by: Subramania Sharma <sharmat@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# df90b369 09-Apr-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Configure htcap in fw based on the channel type in AP mode

This patch disables HT in start_ap if the type of the channel on
which the AP mode is going to be operating is non-HT. HT is enabled
with default ht cap setting if the operating channel is going to be
11n.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 03bdeb0d 21-Mar-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Configure inactivity timeout in fw

Configure the inactivity timeout passed in start_ap() to
firmware. This capability is advertised only when fw supports
it, there is a new bit (ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT)
in firmware capability ie for driver to learn fw's capability.
After the fw finds out the station is inactive, it will probe
the station with null func frames. By default, the timeout is
10 secs.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 7397ddeb 15-Mar-2012 Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>

ath6kl: add debug log for AP MLME operations

This is useful during debugging to check if disconnect commands were issued by
the host.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ddc3d77c 07-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: logical continuations should be on the previous line

All found by checkpatch:

ath6kl/wmi.c:1036: CHECK: Logical continuations should be on the previous line

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 96f1fadc 07-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: alignment should match open parenthesis

Fix the issues which checkpatch found and were easy to fix. Especially
callers of ath6kl_bmi_write() are tricky and that needs to be fixed
separately.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ce0dc0cf 20-Feb-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Set optimal listen intvl,bmiss,scan params while going to wow suspend

* In order to save the target power in WOW suspend state,
configure the best optimal values for the below parameters,
- listen interval.
- beacon miss interval.
- scan parameters.

Default values for above attributes are reverted in
wow resume operation.

* The default listen interval is set before the host issue
connect request.

* New function is added to configure beacon miss count.

kvalo: minor changes to fix open parenthesis alignment

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 804483e9 05-Mar-2012 Johannes Berg <johannes.berg@intel.com>

cfg80211/mac80211: report signal strength for mgmt frames

Add the signal strength (in dBm only for now) to
frames that are received via nl80211's various
frame APIs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 67cd22e4 28-Feb-2012 Thomas Pedersen <c_tpeder@qca.qualcomm.com>

ath6kl: implement hidden ssid

The ath6kl FW does not distinguish between different types of hidden
SSIDs (empty or null), so treat all cfg80211 requests for hidden ssid
the same.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e5348a1e 25-Feb-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Make sure wiphy is registered before calling regulatory_hint()

As regulatory events are processed even before the wiphy is registered,
calling regulatory_hint() at early stage should be fixed.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 5dbc811f 28-Feb-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Refactor ath6kl_wmi_control_rx()

Split the wmi event processing into the one which needs to be
vif specific and the reset. This is a step towards avoiding
the need for wiphy and a netdev registration before getting
any message from firmware.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d0ff7383 08-Feb-2012 Naveen Gangadharan <ngangadh@qca.qualcomm.com>

ath6kl: Add unicast mgmt frame buffering

PS buffering of unicast Action frames that are sent in a context
of a BSS. In AP mode when the recepient station goes to powersave
and PS_POLL flag is not set, we would buffer the frames. Send out
unicast mgmt bufferred frame when PS_POLL is received.

This fixes a bug in P2P GO behavior when sending a GO Discoverability
Request to a client that is in sleep mode.

kvalo: indentation fixes

Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Naveen Gangadharan <ngangadh@qca.qualcomm.com>
Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1b2df407 06-Feb-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Update license header

Update license header with the copyright to Qualcomm Atheros, Inc.
for the year 2011-2012.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 081c7a84 30-Jan-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Wait for host sleep mode cmd processed event during WOW suspend

For every WMI_SET_HOST_SLEEP_MODE_CMDID command (send from the host),
the firmware sends WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID as
an acknowledgement to the host.

In order to being sync with the firmware, the host has to wait for
WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENT event before going to
the suspend state. This patch ensures ath6kl_wow_suspend() waits
until it gets this event after sending set host sleep mode command.

This patch adds,
* New command WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID in
WMI event table.
* New WMI function ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
to process the event.
* New flag HOST_SLEEP_MODE_CMD_PROCESSED in VIF flags to record
the arrival of the event.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d91e8eee 30-Jan-2012 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Configure WOW patterns while going to wow_suspend

First preference is given to the user configured WOW patterns.
If the user doesn't configure any patterns (for ex, via iw command),
the default patterns will be configured based on the current mode
(vif->nw_type) while going to WOW suspend.

Summary of changes:

* ath6kl_wow_ap() is added to configure the below default
patterns when the system enters into WOW suspend in AP mode.
+ Unicast IP, EAPOL-like and ARP packet pattern
+ ARP packet pattern
+ mDNS/SSDP/LLMNR pattern
+ DHCP broadcast pattern

* ath6kl_wow_sta() is added to configure the below default
patterns when the system enters into WOW suspend in STA mode.
+ Unicast packet pattern
+ mDNS/SSDP/LLMNR pattern

* Move the user provided WOW patterns configuration code
from ath6kl_wow_suspend() to a separate function called
ath6kl_wow_usr().

* Two argument variable's ('filter' and 'mask) data type in
ath6kl_wmi_add_wow_pattern_cmd() are changed from 'u8 *' to
'const u8 *'. This is needed to make all pattern and mask
arrays to be 'static const u8' in the caller function.

* New conditional check is added to make sure user
configured pattern count is within the limit (WOW_MAX_FILTERS_PER_LIST).

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 5afa5aa7 17-Jan-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: get rid of AR_DBG_LVL_CHECK()

We don't need it as debug calls already have a log level and compiler
should be smart enough to optimise away the code when ath6kl debug code
is not enabled. Also it makes it easier to abstract core code to
ath6kl_core.ko.

In ath6kl_dump_registers() I had to change the debug level from ANY to IRQ
as I removed the AR_DBG_LVL_CHECK() check before calling the function.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c1762a3f 12-Jan-2012 Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>

ath6kl: Add support for uAPSD

* A new APSD power save queue is added in the station structure.
* When a station has APSD capability and goes to power save, the frame
designated to the station will be buffered in APSD queue.
* When the host receives a frame which the firmware marked as trigger,
host delivers the buffered frame from the APSD power save queue.
Number of frames to deliver is decided by MAX SP length.
* When a station moves from sleep to awake state, all frames buffered
in APSD power save queue are sent to the firmware.
* When a station is disconnected, all frames bufferes in APSD power save
queue are dropped.
* When the host queues the first frame to the APSD queue or removes the
last frame from the APSD queue, it is indicated to the firmware using
WMI_AP_APSD_BUFFERED_TRAFFIC_CMD.

kvalo: fix buggy handling of sks queues, made it more obvious
the user priority when wmm is disabled, remove unneed else block and
combined some variable declarations

Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f914edd3 03-Jan-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Add a function in wmi.c to add/delete a multicast filter

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>


# 3f3c4ee7 03-Jan-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Add a function in wmi to send WMI_MCAST_FILTER_CMDID

This will be used to disable/enable multicast receive.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>


# 4f34dace 30-Dec-2011 Thomas Pedersen <twpedersen@qca.qualcomm.com>

ath6kl: send TCMD response through testmode events

ath6kl no longer knows what it is transmitting through
cfg80211_testmode, and simply passes opaque buffers between userspace
and the firmware. Leave the CONT_RX enum for backwards compatibility.

kvalo: change ATH6KL_TM_CMD_RX_REPORT to return -EOPNOTSUPP

Signed-off-by: Thomas Pedersen <twpedersen@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ca1d16a0 16-Dec-2011 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Avoid taking struct as argument in ath6kl_wmi_set_ip_cmd

In this way, caller is free to pass only the value of IP addr
to configure.

In addition to this,
* 'ips' variable data type in struct wmi_set_ip_cmd is changed
from __le32 to __be32 in order to match network byte order.
* ipv4_is_multicast() is used to validate multicast ip addr.
* New argument if_idx is added to supply correct vif index
to ath6kl_wmi_cmd_send().

This will be used in the next patch.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3ca9d1fc 13-Dec-2011 Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>

ath6kl: support for P2P mgmt operations on station interface

This patch enables support for doing P2P management operations like device
discovery on top of a station interface. After group formation, the station
interface will become a P2P GO/client interface as the case may be.

This feature requires modifications to a couple of existing WMI structures and
therefore new command ids and structures have been defined in order to be
compatible with older firmware versions and other chips. The exception here is
the wmi_connect_cmd. Adding a new field to the end of the structure will not
cause any issues with previous firmware versions since firmware only checks for
minimum length of the command. The other structures are of variable length,
hence it was not possible to add new fields to the end.

The new command ids have to be added to the end of enum wmi_cmd_id, so it has
updated to match the firmware.

The driver will support both the 'old' and the 'new' commands for a while by
checking the firmware capabilities.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 10509f90 13-Dec-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: implement scheduled scan

ath6kl firmware supports scheduled scan functionality with the wow ssid
filter. But the firmware does not send any events after scan results
so I had to add a timer which notifies about new scan results.

Sched scan needs firmware version 3.2.0.6 or later. If firmware doesn't
support sched scan the driver will not enable the feature.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 71f96ee6 14-Nov-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: make maximum number of vifs runtime configurable

Needed when detecting how many vifs firmware supports.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# bd24a50f 09-Nov-2011 Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>

ath6kl: Fix target minimum length requirement for WMI_SEND_PROBE_RESPONSE_CMDID

The firmware expects the minimum length of
WMI_SEND_PROBE_RESPONSE_CMDID to be 13. However, when the device is a
P2P GO and it needs to send a probe response to a non-P2P client,
there are no P2P IEs to be added, and therefore the length of the WMI
command is 12. This command gets rejected by the firmware. To fix
this, add an extra byte to satisfy the minimum length requirement.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 902b4629 07-Nov-2011 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Remove few unused WMI stuff

* Removed unused WOW_MAX_FILTER_LISTS macro.

* Removed empty ath6kl_wmi_get_wow_list_event_rx() function.
List of configured WOW patterns are maintained in CFG layer
itself. No need to have this function in ath6kl to get
configured WOW pattern list. It can added later if we need
it for debugging.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 45cf110b 07-Nov-2011 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Add wmi functions to configure WOW mode and host sleep mode

It will be used in WOW suspend/resume functions to
active/deactivate WOW suspend mode.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 5c9b4fa1 07-Nov-2011 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Add wmi functions to add/delete WOW patterns

These commands will be used in WOW suspend/resume functions
to configure WOW parameters like patterns to be matched
and it's mask value, etc.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f4bb9a6f 02-Nov-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Fix key configuration to copy at most seq_len from seq

There is no guarantee on the caller using 8-octet buffer for
key->seq, so better follow the key->seq_len parameter on figuring
out how many octets to copy.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 11f6e40d 01-Nov-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Fix lockdep warning

The following is the lockdep warning which detects possible
deadlock condition with the way ar->lock and ar->list_lock
are being used.

(&(&ar->lock)->rlock){+.-...}, at: [<ffffffffa0492d13>] ath6kl_indicate_tx_activity+0x83/0x110 [ath6kl]
but this lock took another, SOFTIRQ-unsafe lock in the past:
(&(&ar->list_lock)->rlock){+.+...}

and interrupts could create inverse lock ordering between them.

other info that might help us debug this:
Possible interrupt unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&(&ar->list_lock)->rlock);
local_irq_disable();
lock(&(&ar->lock)->rlock);
lock(&(&ar->list_lock)->rlock);
<Interrupt>
lock(&(&ar->lock)->rlock);

*** DEADLOCK ***

softirqs have to be disabled when acquiring ar->list_lock to avoid
the above deadlock condition. When the above warning printed the
interface is still up and running without issue.

Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c89c591d 27-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: rename ath6kl_wmi_qos_state_init() to _wmi_reset()

Just to make it more clear that this function is supposed to
reset wmi related variables.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3101edef 27-Oct-2011 Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>

ath6kl: fix missing copy of action frame contents

The wpa_supplicant was receiving incorrect frame contents in the
callback function that indicates the status of the frame transmitted.
This patch fixes a missing copy of the frame contents to a local
buffer. The local buffer keeps track of the last sent management frame.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1052261e 27-Oct-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Report unique remain-on-channel cookie values

Even though only a single concurrent remain-on-channel operation is
supported, there may be two pending remain-on-channel events (one to
indicate end of a canceled operation and another to indicate start of a
new operation). User space won't be able to distinguish these events
unless unique cookies are used.

The previous behavior resulted in wpa_supplicant getting quite
confused about the driver's offchannel state in various sequences
and this made the P2P state machine behave incorrectly. Use of
more than a single remain-on-channel cookie value fixes this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 0ce59445 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Initialize target wlan values for every vif

Wlan parameters need to be configured for every vif
in target.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 990bd915 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Maintain virtual interface in a list

This patch removes all references to ar->vif and takes
vif from a list.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 6765d0aa 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Use interface index from wmi data headr

Interface index is passed in wmi data header as well, use it
to get the corresponding vif structure.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 240d2799 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Take vif information from wmi event

Interface index is passed in wmi command header from target.
Use this index to get the appropriate vif.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 334234b5 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Maintain firmware interface index in struct ath6kl_vif

Pass this index to target in wmi commands to specify the interface
for which the command needs to be handled.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# cf5333d7 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move few more vif specific information to struct ath6kl_vif

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 8c8b65e3 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move bssid information to vif structure

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f5938f24 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move nw_type to vif structure

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 59c98449 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Define interface specific states

Currently ar->flag maintains interface stats. Move interface
specific states from ar->flag to vif->flags.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# be98e3a4 25-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Keep wiphy reference in ath6kl structure

This is to avoid using ar->wdev to get wiphy pointer, this
may need further cleanup for multi vif support.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ff0b0075 11-Oct-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add debugfs control for keepalive and disconnection timeout

The new debugfs files keepalive and disconnect_timeout can be used to
fetch the current values and to change the values for keepalive and
disconnect event timeout (both in seconds).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1261875f 11-Oct-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add debugfs files for roaming control

Roaming mode can be changed by writing roam mode (default, bssbias, or
lock) to roam_mode. Forced roam can be requested by writing the BSSID
into force_roam.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 4b28a80d 11-Oct-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add debugfs file for target roam table

The new roam_table debugfs file can be used to display the current
roam table from the target.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# a7f0c58b 04-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: remove unused parameters from struct wmi

There's no use for these, at least right now, so better to remove them.
If some of them are ever needed, we can always add them back.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# b9b6ee60 27-Sep-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: improve wmi debug messages

Add a new debug level ATH6KL_DBG_WMI_DUMP and other minor
improvements to the wmi debug messages.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ef094103 27-Sep-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add prefix parameter to ath6kl_dbg_dump()

Makes it easier to recognise longs dumps.

Obligatory screenshot using "rx" prefix:

ath6kl: ath6kl_rx
rx 00000000: 10 10 00 00 00 00 08 30 00 00 00 00 00 00 f9 0b .......0........
rx 00000010: 2c 44 08 30 00 00 f9 0b 0c a4 02 00 00 00 73 d2 ,D.0..........s.
rx 00000020: 94 00 f9 0b 04 8c 01 00 02 00 07 02 02 00 f9 0b ................

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 86512136 21-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Report PMKSA candidate events through cfg80211

This allows RSN pre-authentication to be used when roaming decisions are
done in the target.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 32c10874 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Export beacon interval and DTIM period through STA info

Now that we allow the first Beacon frame after each connection to
be processed at the host, we can figure out the DTIM period and
expose it with Beacon interval through STA info BSS parameters
to user space.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 551185ca 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Update BSS information after connection

Since we may end up using a dummy BSS entry when roaming, allow one Beacon
frame -based bssinfo from the current BSS to be processed prior to starting
to filter all bssinfo events. This allows cfg80211 BSS table to be filled
with proper data in the roaming case where the full Beacon data may not
have been present at the time of roamed event.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 82e14f56 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Remove unnecessary bssinfo event header conversion

There is no point in unconditionally converting the bssinfo header
to the old version since only the new header is being used and the
driver can as well read the values from it when needed. Leaving out
the conversion saves some extra memory copying.

In addition, use the calculated "rssi" value snr - 95 dBm to get the
proper value in cfg80211 BSS table (i.e., something that more or less
matches with the value used in STA info).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 457fb041 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Remove the unused node table implementation

Now that the scan results are reported directly to the cfg80211 BSS
table there is no need for maintaining this internal node table
implementation for scan results. Remove the definitions and node
table functions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1aaa8c74 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Replace internal node table with cfg80211 BSS table

The internal node table in ath6kl was not really used for any useful
purpose. It was just used to collect scan results during a scan and then
provide them in a burst to cfg80211 at the completion of the scan. There
is no point in doing this since cfg80211 is perfectly capable of
maintaining the BSS table and the BSS inform messages are sent in
separate function calls anyway.

This provides more complete information in the cfg80211 BSS table since
this allows Beacon and Probe Response frames to be distinguished and IEs
from them reported separately.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f195d507 19-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Remove deprecated WMI_OPT_RX_FRAME_EVENTID processing

This event has been deprecated and there is no need for ath6kl to
include code for processing it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 06033760 06-Sep-2011 Vivek Natarajan <nataraja@qca.qualcomm.com>

ath6kl: Process regulatory requests from firmware.

Process the regulatory code from eeprom and pass the
country information to cfg80211.

kvalo: add space between struct name and *

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 572e27c0 05-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Fix AP mode connect event parsing and TIM updates

This cleans up the connect event parsing by defining a union in
struct wmi_connect_event to match with the three possible sets of
fields that the target uses depending on which type of connect
event is being indicated. In addition, two AP cases are now
separated from ath6kl_connect_event() so that correct field names
can be used to make it actually possible to understand what the
code is doing.

The bug hiding in the previous mess was in parsing the AID incorrectly
when processing the new station connecting event in AP mode. The fix
here for that is also fixing TIM updates for PS buffering to use the
correct AID.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# d6e51e6a 05-Sep-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Fix WMI message structure for AP_SET_PVB

There is a 2-octet reserved field between the flag and aid fields. Fix
that to make the target actually behave as requested.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e5090444 31-Aug-2011 Vivek Natarajan <nataraja@qca.qualcomm.com>

ath6kl: Add debugfs entry to modify roaming parameters.

Firmware initiates roaming only after it reaches a rssi of 20.
This lower rssi threshold can be modified through a wmi command
to modify the roaming behavior.

kvalo: rename debugfs functions and move comment about rssi units next to
ath6kl_wmi_set_roam_lrssi_cmd()

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 939f1cce 02-Sep-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: implement support to set firmware log parameters

Firmware log parameters can be controlled now with help of fwlog_mask
debugfs file.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# bdf5396b 02-Sep-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add firmware log support

Firmware sends binary logs with WMIX_DBGLOG_EVENTID event. Create
a buffer which stores the latest logs and which can be copied from
fwlog debugfs file with cp command.

To save memory firmware log support is enabled only when CONFIG_ATH6KL_DEBUG
is enabled.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 003353b0d 01-Sep-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add testmode support

This is port from the staging version of ath6kl. The interface to user space
is exactly same.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 9809d8ef 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Report received Action frames to cfg80211

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# a0df5db1 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Notify cfg80211 of TX status of mgmt_tx frames

Use WMI_TX_STATUS_EVENTID event to generate cfg80211_mgmt_tx_frame()
calls. Since we support only a single pending frame for now, use the
hardcoded cookie value 1 and store a copy of the pending frame in
the driver.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ae32c30a 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Report received Probe Request frames to cfg80211

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1276c9ef 30-Aug-2011 Edward Lu <elu@qca.qualcomm.com>

ath6kl: Support channel set request for startscan command

Signed-off-by: Edward Lu <elu@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f9e5f05c 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add cfg80211 calls for remain-on-channel events

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 6465ddcf 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add new WMI commands and events for P2P

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 23875136 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Use change_station() to authorize/unauthorize STAs

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 9a5b1318 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Delay initial group key setup in AP mode

The target is not ready to accept addkey commands until the connect
event has been delivered, so delay these operations for the initial GTK.
In addition, properly set interface connected and mark netdev ready when
the AP mode setup has been completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 6a7c9bad 30-Aug-2011 Jouni Malinen <jouni@qca.qualcomm.com>

ath6kl: Add functionality for starting AP mode

Use cfg80211 add/del_beacon callbacks for starting/stopping AP mode and
set_beacon to update AP configuration (mainly, to update Beacon and
Probe Response IEs).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3ce6ff50 22-Aug-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Add wmi meta data information only it is available

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 594a0bc8 14-Aug-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Cleanup ath6kl_wmi_data_hdr_remove()

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 77fccc78 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Remove ath6kl_wmi_iterate_nodes()

Use wlan_iterate_nodes() directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 39dd3fcb 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Pass only the needed scan_table to ath6kl_wmi_iterate_nodes()

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 852bd9d9 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move initialization/deinitialization of scan_table to appropriate functions

By having scan_table in struct ath6kl, it makes sense to move initialization
to ath6kl_init() and deinitialization to ath6kl_destroy().

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 9d0c6bcf 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Cleanup parameters of wlan_node_table_init()

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 46ff8d59 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Remove ath6kl_wmi_get_current_bssid()

Use the bssid from ath6kl directly.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 70df0516 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Remove bssid from struct wmi

This is nothing but bssid of struct ath6kl.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e4c7ffcb 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Cleanup parameters for wlan_refresh_inactive_nodes()

And remove the reference to wmi in ath6kl_node_table.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 7c3075e9 21-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move scan table from wmi to ath6kl

It does not need to be in wmi

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 2865785e 20-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Cleanup void *parent_dev in struct wmi

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# c8790cba 19-Jul-2011 Raja Mani <rmani@qca.qualcomm.com>

ath6kl: Avoid two memset to clear src and desr mac addr variable memory in ath6kl_wmi_dot11_hdr_remove()

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# bdcd8170 17-Jul-2011 Kalle Valo <kvalo@qca.qualcomm.com>

Add ath6kl cleaned up driver

Last May we started working on cleaning up ath6kl driver which is
currently in staging. The work has happened in a separate
ath6kl-cleanup tree:

http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary

After over 1100 (!) patches we have now reached a state where I would
like to start discussing about pushing the driver to the wireless
trees and replacing the staging driver.

The driver is now a lot smaller and looks like a proper Linux driver.
The size of the driver (measured with simple wc -l) dropped from 49
kLOC to 18 kLOC and the number of the .c and .h files dropped from 107
to 22. Most importantly the number of subdirectories reduced from 26
to zero :)

There are two remaining checkpatch warnings in the driver which we
decided to omit for now:

drivers/net/wireless/ath/ath6kl/debug.c:31:
WARNING: printk() should include KERN_ facility level
drivers/net/wireless/ath/ath6kl/sdio.c:527:
WARNING: msleep < 20ms can sleep for up to 20ms;
see Documentation/timers/timers-howto.txt

The driver has endian annotations for all the hardware specific
structures and there are no sparse errors. Unfortunately I don't have
any big endian hardware to test that right now.

We have been testing the driver both on x86 and arm platforms. The
code is also compiled with sparc and parisc cross compilers.

Notable missing features compared to the current staging driver are:

o HCI over SDIO support
o nl80211 testmode
o firmware logging
o suspend support

Testmode, firmware logging and suspend support will be added soon. HCI
over SDIO support will be more difficult as the HCI driver needs to
share code with the wifi driver. This is something we need to research
more.

Also I want to point out the changes I did for signed endian support.
As I wasn't able to find any support for signed endian annotations I
decided to follow what NTFS has done and added my own. Grep for sle16
and sle32, especially from wmi.h.

Various people have been working on the cleanup, the hall of
fame based on number of patches is:

543 Vasanthakumar Thiagarajan
403 Raja Mani
252 Kalle Valo
16 Vivek Natarajan
12 Suraj Sumangala
3 Joe Perches
2 Jouni Malinen

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Suraj Sumangala <surajs@qca.qualcomm.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>