History log of /linux-master/drivers/net/wireless/ath/ath5k/mac80211-ops.c
Revision Date Author Comments
# 0a44dfc0 29-Jan-2024 Johannes Berg <johannes.berg@intel.com>

wifi: mac80211: simplify non-chanctx drivers

There are still surprisingly many non-chanctx drivers, but in
mac80211 that code is a bit awkward. Simplify this by having
those drivers assign 'emulated' ops, so that the mac80211 code
can be more unified between non-chanctx/chanctx drivers. This
cuts the number of places caring about it by about 15, which
are scattered across - now they're fewer and no longer in the
channel context handling.

Link: https://msgid.link/20240129194108.6d0ead50f5cf.I60d093b2fc81ca1853925a4d0ac3a2337d5baa5b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 3b86f86d 14-Aug-2023 Arnd Bergmann <arnd@arndb.de>

wifi: ath: remove unused-but-set parameter

This has never been used since the driver was merged, but it now causes
a W=1 warning in recent clang versions

drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]

Remove the bit manipulation on the otherwise unused parameter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230814073255.1065242-1-arnd@kernel.org


# a790cc3a 09-Oct-2022 Alexander Wetzel <alexander@wetzel-home.de>

wifi: mac80211: add wake_tx_queue callback to drivers

mac80211 is fully switching over to the internal TX queue (iTXQ)
implementation. Update all drivers not yet providing the now mandatory
wake_tx_queue() callback.

As an side effect the netdev interfaces of all updated drivers will
switch to the noqueue qdisc.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
[add staging drivers]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# eaedf62f 15-Jul-2022 Jilin Yuan <yuanjilin@cdjrlc.com>

wifi: ath5k: fix repeated words in comments

Delete the redundant word 'don't' and 'but'.

Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220708154929.19199-1-yuanjilin@cdjrlc.com


# b3e2130b 24-Jun-2022 Johannes Berg <johannes.berg@intel.com>

wifi: mac80211: change QoS settings API to take link into account

Take the link into account in the QoS settings (EDCA parameters)
APIs.

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


# 7b7090b4 24-May-2022 Johannes Berg <johannes.berg@intel.com>

wifi: mac80211: split bss_info_changed method

Split the bss_info_changed method to vif_cfg_changed and
link_info_changed, with the latter getting a link ID.
Also change the 'changed' parameter to u64 already, we
know we need that.

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


# f276e20b 10-May-2022 Johannes Berg <johannes.berg@intel.com>

wifi: mac80211: move interface config to new struct

We'll use bss_conf for per-link configuration later, so
move out all the non-link-specific data out into a new
struct ieee80211_vif_cfg used in the vif.

Some adjustments were done with the following spatch:

@@
expression sdata;
struct ieee80211_vif *vifp;
identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
@@
(
-sdata->vif.bss_conf.var
+sdata->vif.cfg.var
|
-vifp->bss_conf.var
+vifp->cfg.var
)

@bss_conf@
struct ieee80211_bss_conf *bss_conf;
identifier var = { assoc, ibss_joined, aid, arp_addr_list, arp_addr_cnt, ssid, ssid_len, s1g, ibss_creator };
@@
-bss_conf->var
+vif_cfg->var

(though more manual fixups were needed, e.g. replacing
"vif_cfg->" by "vif->cfg." in many files.)

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


# 144cd24d 14-Dec-2020 Jouni Malinen <jouni@codeaurora.org>

ath: Modify ath_key_delete() to not need full key entry

tkip_keymap can be used internally to avoid the reference to key->cipher
and with this, only the key index value itself is needed. This allows
ath_key_delete() call to be postponed to be handled after the upper
layer STA and key entry have already been removed. This is needed to
make ath9k key cache management safer.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201214172118.18100-5-jouni@codeaurora.org


# e64fa6d9 08-Dec-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ath5k: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/e127232621c4de340509047a11d98093958303c5.1605896059.git.gustavoars@kernel.org


# fb24ea52 22-Feb-2019 Will Deacon <will@kernel.org>

drivers: Remove explicit invocations of mmiowb()

mmiowb() is now implied by spin_unlock() on architectures that require
it, so there is no reason to call it from driver code. This patch was
generated using coccinelle:

@mmiowb@
@@
- mmiowb();

and invoked as:

$ for d in drivers include/linux/qed sound; do \
spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done

NOTE: mmiowb() has only ever guaranteed ordering in conjunction with
spin_unlock(). However, pairing each mmiowb() removal in this patch with
the corresponding call to spin_unlock() is not at all trivial, so there
is a small chance that this change may regress any drivers incorrectly
relying on mmiowb() to order MMIO writes between CPUs using lock-free
synchronisation. If you've ended up bisecting to this commit, you can
reintroduce the mmiowb() calls using wmb() instead, which should restore
the old behaviour on all architectures other than some esoteric ia64
systems.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>


# a70e1d6f 11-Jan-2017 Felix Fietkau <nbd@nbd.name>

ath5k: drop bogus warning on drv_set_key with unsupported cipher

Simply return -EOPNOTSUPP instead.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 9352c19f 20-Apr-2015 Johannes Berg <johannes.berg@intel.com>

mac80211: extend get_tkip_seq to all keys

Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.

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


# df140465 22-Apr-2015 Johannes Berg <johannes.berg@intel.com>

mac80211: remove support for IFF_PROMISC

This support is essentially useless as typically networks are encrypted,
frames will be filtered by hardware, and rate scaling will be done with
the intended recipient in mind. For real monitoring of the network, the
monitor mode support should be used instead.

Removing it removes a lot of corner cases.

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


# 4ed20beb 14-Nov-2014 Johannes Berg <johannes.berg@intel.com>

cfg80211: remove "channel" from survey names

All of the survey data is (currently) per channel anyway,
so having the word "channel" in the name does nothing. In
the next patch I'll introduce global data to the survey,
where the word "channel" is actually confusing.

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


# a344d677 12-Jun-2014 Johannes Berg <johannes.berg@intel.com>

mac80211: allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR

Allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR with software
based scanning and generate a random MAC address for them for every
scan request with the flag.

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


# a4bcaf55 04-Sep-2014 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>

mac80211: extend set_coverage_class signature

Extend mac80211 set_coverage_class API in order to enable ACK timeout
estimation algorithm (dynack) passing coverage class equals to -1
to lower drivers. Synchronize set_coverage_class routine signature with
mac80211 function pointer for p54, ath9k, ath9k_htc and ath5k drivers.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 41881354 13-Jun-2014 Mathy Vanhoef <vanhoefm@gmail.com>

ath5k: support for FIF_FCSFAIL filter

When the FIF_FCSFAIL filter flag is set, pass frames with CRC errors.

Signed-off-by: Mathy Vanhoef <vanhoefm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# ef1b4141 22-Feb-2014 Felix Fietkau <nbd@openwrt.org>

ath5k: set SURVEY_INFO_IN_USE on get_survey

Only one channel is returned - the one currently being used.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 4d70f2fb 14-Aug-2013 Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>

ath5k: enable support for 5 MHz and 10 MHz channels

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f287cbd0 11-Jul-2013 Bob Copeland <me@bobcopeland.com>

ath5k: fix extra set bit in multicast mask

Bit 32 was always set which looks to have been accidental,
according to git history.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 0967e01e 11-Jun-2013 Thomas Huehn <thomas@net.t-labs.tu-berlin.de>

ath5k: make use of the new rate control API

This patch enabels ath5k to use the new rate table to lookup each
mrr rate and retry information per packet.

Signed-off-by: Benjamin Vahl <bvahl@net.t-labs.tu-berlin.de>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 675a0b04 25-Mar-2013 Karl Beldan <karl.beldan@rivierawaves.com>

mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan

Drivers that don't use chanctxes cannot perform VHT association because
they still use a "backward compatibility" pair of {ieee80211_channel,
nl80211_channel_type} in ieee80211_conf and ieee80211_local.

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
[fix kernel-doc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 596ab5ec 10-Dec-2012 Felix Fietkau <nbd@openwrt.org>

ath5k: fix tx path skb leaks

ieee80211_free_txskb() needs to be used instead of dev_kfree_skb_any for
tx packets passed to the driver from mac80211

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8b2c9824 06-Nov-2012 Johannes Berg <johannes.berg@intel.com>

mac80211: clarify interface iteration and make it configurable

During hardware restart, all interfaces are iterated even
though they haven't been re-added to the driver, document
this behaviour. The same also happens during resume, which
is even more confusing since all of the interfaces were
previously removed from the driver. Make this optional so
drivers relying on the current behaviour can still use it,
but to let drivers that don't want this behaviour disable
it.

Also convert all API users, keeping the old semantics
except in hwsim, where the new normal ones are desired.

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


# 90e6274d 14-Sep-2012 Chun-Yeow Yeoh <yeohchunyeow@gmail.com>

ath5k: disable HW crypto in management frame

Hardware support for MFP is not available in ath5k. Thus,
this implementation allows the mac80211 stack to do the
actuall crypto operation.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# e548c49e 04-Sep-2012 Johannes Berg <johannes.berg@intel.com>

mac80211: add key flag for management keys

Mark keys that might be used to receive management
frames so drivers can fall back on software crypto
for them if they don't support hardware offload.
As the new flag is only set correctly for RX keys
and the existing IEEE80211_KEY_FLAG_SW_MGMT flag
can only affect TX, also rename the latter to
IEEE80211_KEY_FLAG_SW_MGMT_TX.

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


# 7dd6753f 12-Aug-2012 Bob Copeland <me@bobcopeland.com>

ath5k: fix spin_lock_irqsave/spin_lock_bh nesting in mesh

Lockdep found an inconsistent lock state when joining a mesh with
ath5k. The problem is that ath5k takes the lock for its beacon state,
ah->block, with spin_lock_irqsave(), while mesh internally takes the
sync_offset_lock with spin_lock_bh() in mesh_sync_offset_adjust_tbtt(),
which in turn is called under ah->block.

This could deadlock if the beacon tasklet was run on the processor
that held the beacon lock during the do_softirq() in spin_unlock_bh().

We probably shouldn't hold the lock around the callbacks, but the
easiest fix is to switch to spin_lock_bh for ah->block: it doesn't
need interrupts disabled anyway as the data in question is only accessed
in softirq or process context.

Fixes the following lockdep warning:

[ 446.892304] WARNING: at kernel/softirq.c:159 _local_bh_enable_ip+0x38/0xa6()
[ 446.892306] Hardware name: MacBook1,1
[ 446.892309] Modules linked in: tcp_lp fuse sunrpc cpufreq_ondemand acpi_cpufreq mperf ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4 ip6table_filter nf_defrag_ipv4 xt_state nf_conntrack ip6_tables ext2 arc4 btusb bluetooth snd_hda_codec_idt snd_hda_intel carl9170 snd_hda_codec coretemp joydev ath5k snd_hwdep snd_seq isight_firmware ath snd_seq_device snd_pcm applesmc appletouch mac80211 input_polldev snd_timer microcode cfg80211 snd lpc_ich pcspkr i2c_i801 mfd_core soundcore rfkill snd_page_alloc sky2 tpm_infineon virtio_net kvm_intel kvm i915 drm_kms_helper drm i2c_algo_bit i2c_core video
[ 446.892385] Pid: 1892, comm: iw Not tainted 3.6.0-rc1-wl+ #296
[ 446.892387] Call Trace:
[ 446.892394] [<c0432958>] warn_slowpath_common+0x7c/0x91
[ 446.892398] [<c04399d7>] ? _local_bh_enable_ip+0x38/0xa6
[ 446.892403] [<c04399d7>] ? _local_bh_enable_ip+0x38/0xa6
[ 446.892459] [<f7f9ae3b>] ? mesh_sync_offset_adjust_tbtt+0x95/0x99 [mac80211]
[ 446.892464] [<c043298f>] warn_slowpath_null+0x22/0x24
[ 446.892468] [<c04399d7>] _local_bh_enable_ip+0x38/0xa6
[ 446.892473] [<c0439a52>] local_bh_enable_ip+0xd/0xf
[ 446.892479] [<c088004f>] _raw_spin_unlock_bh+0x34/0x37
[ 446.892527] [<f7f9ae3b>] mesh_sync_offset_adjust_tbtt+0x95/0x99 [mac80211]
[ 446.892569] [<f7f7650f>] ieee80211_beacon_get_tim+0x28f/0x4e0 [mac80211]
[ 446.892575] [<c047ceeb>] ? trace_hardirqs_on_caller+0x10e/0x13f
[ 446.892591] [<f7fdc541>] ath5k_beacon_update+0x40/0x26b [ath5k]
[ 446.892597] [<c047ad67>] ? lock_acquired+0x1f5/0x21e
[ 446.892612] [<f7fdf9fb>] ? ath5k_bss_info_changed+0x167/0x1b2 [ath5k]
[ 446.892617] [<c087f9ea>] ? _raw_spin_lock_irqsave+0x78/0x82
[ 446.892632] [<f7fdf9fb>] ? ath5k_bss_info_changed+0x167/0x1b2 [ath5k]
[ 446.892647] [<f7fdfa09>] ath5k_bss_info_changed+0x175/0x1b2 [ath5k]
[ 446.892651] [<c0479dd4>] ? lock_is_held+0x73/0x7b
[ 446.892662] [<c0458fd5>] ? __might_sleep+0xa7/0x17a
[ 446.892698] [<f7f5d8f7>] ieee80211_bss_info_change_notify+0x1ed/0x21a [mac80211]
[ 446.892703] [<c0449875>] ? queue_work+0x24/0x32
[ 446.892718] [<f7fdf894>] ? ath5k_configure_filter+0x163/0x163 [ath5k]
[ 446.892766] [<f7f95fa4>] ieee80211_start_mesh+0xb9/0xbd [mac80211]
[ 446.892806] [<f7f6e610>] ieee80211_join_mesh+0x10c/0x116 [mac80211]
[ 446.892834] [<f7a96b90>] __cfg80211_join_mesh+0x176/0x1b3 [cfg80211]
[ 446.892855] [<f7a96c1c>] cfg80211_join_mesh+0x4f/0x6a [cfg80211]
[ 446.892875] [<f7a89891>] nl80211_join_mesh+0x1de/0x1ed [cfg80211]
[ 446.892908] [<f7a8db99>] ? nl80211_set_wiphy+0x4cf/0x4cf [cfg80211]
[ 446.892919] [<c07cfa36>] genl_rcv_msg+0x1d5/0x1f3
[ 446.892940] [<c07cf861>] ? genl_rcv+0x25/0x25
[ 446.892946] [<c07cf009>] netlink_rcv_skb+0x37/0x78
[ 446.892950] [<c07cf85a>] genl_rcv+0x1e/0x25
[ 446.892955] [<c07cebf3>] netlink_unicast+0xc3/0x12d
[ 446.892959] [<c07cee46>] netlink_sendmsg+0x1e9/0x213
[ 446.892966] [<c079f282>] sock_sendmsg+0x79/0x96
[ 446.892972] [<c04eb90d>] ? might_fault+0x9d/0xa3
[ 446.892978] [<c07a81d8>] ? copy_from_user+0x8/0xa
[ 446.892983] [<c07a852c>] ? verify_iovec+0x43/0x77
[ 446.892987] [<c079f4d8>] __sys_sendmsg+0x180/0x215
[ 446.892993] [<c045f107>] ? sched_clock_cpu+0x134/0x144
[ 446.892997] [<c047992f>] ? trace_hardirqs_off+0xb/0xd
[ 446.893002] [<c047bf88>] ? __lock_acquire+0x46b/0xb6e
[ 446.893006] [<c047992f>] ? trace_hardirqs_off+0xb/0xd
[ 446.893010] [<c045f149>] ? local_clock+0x32/0x49
[ 446.893015] [<c0479ec1>] ? lock_release_holdtime.part.9+0x4b/0x51
[ 446.893020] [<c0479dd4>] ? lock_is_held+0x73/0x7b
[ 446.893025] [<c050d127>] ? fcheck_files+0x97/0xcd
[ 446.893029] [<c050d4df>] ? fget_light+0x2d/0x81
[ 446.893034] [<c07a01f3>] sys_sendmsg+0x3b/0x52
[ 446.893038] [<c07a07b4>] sys_socketcall+0x238/0x2a2
[ 446.893044] [<c0885edf>] sysenter_do_call+0x12/0x38
[ 446.893047] ---[ end trace a9af5998f929270f ]---
[ 447.627222]
[ 447.627232] =================================
[ 447.627237] [ INFO: inconsistent lock state ]
[ 447.627244] 3.6.0-rc1-wl+ #296 Tainted: G W
[ 447.627248] ---------------------------------
[ 447.627253] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[ 447.627260] swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
[ 447.627264] (&(&ah->block)->rlock){+.?...}, at: [<f7fdd2d1>] ath5k_tasklet_beacon+0x91/0xa7 [ath5k]
[ 447.627299] {SOFTIRQ-ON-W} state was registered at:
[ 447.627304] [<c047cdbf>] mark_held_locks+0x59/0x77
[ 447.627316] [<c047ceeb>] trace_hardirqs_on_caller+0x10e/0x13f
[ 447.627324] [<c047cf27>] trace_hardirqs_on+0xb/0xd
[ 447.627332] [<c0439a3d>] _local_bh_enable_ip+0x9e/0xa6
[ 447.627342] [<c0439a52>] local_bh_enable_ip+0xd/0xf
[ 447.627349] [<c088004f>] _raw_spin_unlock_bh+0x34/0x37
[ 447.627359] [<f7f9ae3b>] mesh_sync_offset_adjust_tbtt+0x95/0x99 [mac80211]
[ 447.627451] [<f7f7650f>] ieee80211_beacon_get_tim+0x28f/0x4e0 [mac80211]
[ 447.627526] [<f7fdc541>] ath5k_beacon_update+0x40/0x26b [ath5k]
[ 447.627547] [<f7fdfa09>] ath5k_bss_info_changed+0x175/0x1b2 [ath5k]
[ 447.627569] [<f7f5d8f7>] ieee80211_bss_info_change_notify+0x1ed/0x21a [mac80211]
[ 447.627628] [<f7f95fa4>] ieee80211_start_mesh+0xb9/0xbd [mac80211]
[ 447.627712] [<f7f6e610>] ieee80211_join_mesh+0x10c/0x116 [mac80211]
[ 447.627782] [<f7a96b90>] __cfg80211_join_mesh+0x176/0x1b3 [cfg80211]
[ 447.627816] [<f7a96c1c>] cfg80211_join_mesh+0x4f/0x6a [cfg80211]
[ 447.627845] [<f7a89891>] nl80211_join_mesh+0x1de/0x1ed [cfg80211]
[ 447.627872] [<c07cfa36>] genl_rcv_msg+0x1d5/0x1f3
[ 447.627881] [<c07cf009>] netlink_rcv_skb+0x37/0x78
[ 447.627891] [<c07cf85a>] genl_rcv+0x1e/0x25
[ 447.627898] [<c07cebf3>] netlink_unicast+0xc3/0x12d
[ 447.627907] [<c07cee46>] netlink_sendmsg+0x1e9/0x213
[ 447.627915] [<c079f282>] sock_sendmsg+0x79/0x96
[ 447.627926] [<c079f4d8>] __sys_sendmsg+0x180/0x215
[ 447.627934] [<c07a01f3>] sys_sendmsg+0x3b/0x52
[ 447.627941] [<c07a07b4>] sys_socketcall+0x238/0x2a2
[ 447.627949] [<c0885edf>] sysenter_do_call+0x12/0x38
[ 447.627959] irq event stamp: 1929200
[ 447.627963] hardirqs last enabled at (1929200): [<c043a0e9>] tasklet_hi_action+0x3e/0xbf
[ 447.627972] hardirqs last disabled at (1929199): [<c043a0c0>] tasklet_hi_action+0x15/0xbf
[ 447.627981] softirqs last enabled at (1929196): [<c043999d>] _local_bh_enable+0x12/0x14
[ 447.627989] softirqs last disabled at (1929197): [<c040443b>] do_softirq+0x63/0xb8
[ 447.627999]
[ 447.627999] other info that might help us debug this:
[ 447.628004] Possible unsafe locking scenario:
[ 447.628004]
[ 447.628009] CPU0
[ 447.628012] ----
[ 447.628016] lock(&(&ah->block)->rlock);
[ 447.628023] <Interrupt>
[ 447.628027] lock(&(&ah->block)->rlock);
[ 447.628034]
[ 447.628034] *** DEADLOCK ***

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 987af54f 05-Aug-2012 Nick Kossifidis <mickflemm@gmail.com>

ath5k: Put power_level where it belongs and rename it

Put power_level to ah_txpower struct with the rest tx power infos and
also rename it to txp_requested to make more sense.

v2 make sure we don't memset it to zero on reset

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 36323f81 23-Jul-2012 Thomas Huehn <thomas@net.t-labs.tu-berlin.de>

mac80211: move TX station pointer and restructure TX

Remove the control.sta pointer from ieee80211_tx_info to free up
sufficient space in the TX skb control buffer for the upcoming
Transmit Power Control (TPC).
Instead, the pointer is now on the stack in a new control struct
that is passed as a function parameter to the drivers' tx method.

Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[reworded commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 0f245ed2 16-Jul-2012 Felix Fietkau <nbd@openwrt.org>

ath5k: fix txop limit handling

Same as the recent ath9k fix

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 516304b0 18-Mar-2012 Joe Perches <joe@perches.com>

ath: Add and use pr_fmt, convert printks to pr_<level>

Use a more current logging style.
Make sure all output is prefixed appropriately.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# da473b61 02-Mar-2012 Chun-Yeow Yeoh <yeohchunyeow@gmail.com>

ath5k: allow AP and mesh mode to operate simultaneously

This patch allows the possibility of having the mesh point and AP to be operated
simultaneously in one single radio. Previously, mesh point fails to generate the
mesh beacon if virtual AP is created for the same radio.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f9972577 14-Jan-2012 Antonio Quartulli <ordex@autistici.org>

ath5k: claim support for IBSS RSN

Disable group keys programming when using IBSS RSN. Keys will be managed using
software. In this way IBSS RSN can correctly work.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8a3a3c85 02-Oct-2011 Eliad Peller <eliad@wizery.com>

mac80211: pass vif param to conf_tx() callback

tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
conf_tx_op (
- struct ieee80211_hw *hw,
+ struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u16 queue,
const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 37a41b4a 21-Sep-2011 Eliad Peller <eliad@wizery.com>

mac80211: add ieee80211_vif param to tsf functions

TSF can be kept per vif.
Add ieee80211_vif param to set/get/reset_tsf, and move
the debugfs entries to the per-vif directory.

Update all the drivers that implement these callbacks.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 931be260 26-Jul-2011 Pavel Roskin <proski@gnu.org>

ath5k: clean up base.h and its use

Remove unnecessary includes from base.h. Add includes to other files as
necessary. Don't include base.h unless needed.

Move declarations for functions in base.c from ath5k.h to base.h.

Use a better named define to protect base.h against double inclusion.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 2972cc18 23-Jul-2011 Pavel Roskin <proski@gnu.org>

ath5k: remove unused and write-only structures and fields

struct ath5k_avg_val is unused.

In struct ath5k_hw, lladdr, ah_radar and ah_mac_revision are write-only,
rxbufsize is unused, ah_phy is write-only and referenced by unused
macros.

In struct ath5k_vif, lladdr is write-only.

Remove AR5K_TUNE_RADAR_ALERT, which has no effect.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# fabba048 21-Jul-2011 Pavel Roskin <proski@gnu.org>

ath5k: merge ath5k_{init, deinit}_hw() with their thin wrappers

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# e0d687bd 14-Jul-2011 Pavel Roskin <proski@gnu.org>

ath5k: merge ath5k_hw and ath5k_softc

Both ath5k_hw and ath5k_softc represent one instance of the hardware.
This duplication is historical and is not needed anymore.

Keep the name "ath5k_hw" for the merged structure and "ah" for the
variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more
descriptive and more widely used.

Put the combined structure to ath5k.h where the old ath5k_softc used to
be. Move some code from base.h to ath5k.h as needed.

Remove memory allocation for struct ath5k_hw and the corresponding error
handling. Merge iobase and ah_iobase fields.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6a2a0e73 08-Jul-2011 Pavel Roskin <proski@gnu.org>

ath5k: fix typos, bad comment formatting and GHz in place of MHz

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f5cbc8ba 15-Jun-2011 Pavel Roskin <proski@gnu.org>

ath5k: minor cleanup

Move an extern variable declaration to a header file. Prefix all
functions with "ath5k_". Make ath5k_intr() static. Remove unneeded
forward declarations. Remove pointless "extern" in a function
declaration.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# b1ad1b6f 09-Apr-2011 Felix Fietkau <nbd@openwrt.org>

ath5k: fix slot time handling

Set the slot time based on the mac80211 short slot vs long slot setting
instead of just forcing long slot for all CCK-enabled channels.
This slightly improves 802.11g mode performance in in my tests.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 81266baf 07-Mar-2011 John W. Linville <linville@tuxdriver.com>

ath5k: implement ieee80211_ops->{get,set}_ringparam

set_ringparam only allows changes to tx ring at this time.

Signed-off-by: John W. Linville <linville@tuxdriver.com>


# e4b0b32a 03-Mar-2011 Ben Greear <greearb@candelatech.com>

ath5k: Put hardware in PROMISC mode if there is more than 1 stations.

It seems ath5k has issues receiving broadcast packets (ARPs) when
using multiple STA interfaces associated with multiple APs.
This patch ensures the NIC is always in PROMISC mode if there
are more than 1 stations associated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 7bb45683 24-Feb-2011 Johannes Berg <johannes.berg@intel.com>

mac80211: make tx() operation return void

The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).

Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.

Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 12873372 15-Feb-2011 Bob Copeland <me@bobcopeland.com>

ath5k: move external function definitions to a header file

Johannes pointed out the mess of external function prototypes in the
mac80211-ops.c file. Woe to anyone who changes these functions...

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 76a9f6fd 28-Jan-2011 Bruno Randolf <br1@einfach.org>

ath5k: Fix short and long retry configuration

The register definition for retry configuration on AR5212 was wrong, and simply
copied over from AR5210. Update the register definitions from the documentation.

Let the short and long retries be configured from mac80211 and use the standard
values of 7 and 4 by default. Also we need to make sure we don't export more
retries than we are configured for to mac80211 (and the rate module) in
hw->max_rate_tries.

Also clean up the code by removing unused defines and variables and drop the
different values for "station retries" - if these need to be different it can
be handled tru ah_retry_long/short.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 18cb6e32 05-Jan-2011 John W. Linville <linville@tuxdriver.com>

ath5k: qualify global modparam_nohwcrypt variable

Signed-off-by: John W. Linville <linville@tuxdriver.com>


# cd2c5486 22-Dec-2010 Bruno Randolf <br1@einfach.org>

ath5k: Move mac80211 functions into new file

Move mac80211 functions into new file mac80211-ops.c to have a better
separation and to make base.c smaller.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>