History log of /drivers/net/wireless/hostap/hostap_80211_tx.c
Revision Date Author Comments
d22fbd70c2770b5e3ba0d7bc5b29f6ee686cdba4 26-Dec-2013 dingtianhong <dingtianhong@huawei.com> hostap: slight optimization of addr compare

Use possibly more efficient ether_addr_equal
instead of memcmp.

Cc: Jouni Malinen <j@w1.fi>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ee40fa0656a730491765545ff7550f3c1ceb0fbc 27-May-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE

These were getting the macros from an implicit module.h
include via device.h, but we are planning to clean that up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c

This relatively recently added file uses EXPORT_SYMBOL and hence
needs export.h included so that it is compatible with the module.h
split up work.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
d0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf 31-Aug-2009 Stephen Hemminger <shemminger@vyatta.com> wireless: convert drivers to netdev_tx_t

Mostly just simple conversions:
* ray_cs had bogus return of NET_TX_LOCKED but driver
was not using NETIF_F_LLTX
* hostap and ipw2x00 had some code that returned value
from a called function that also had to change to return netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ec634fe328182a1a098585bfc7b69e5042bdb08d 06-Jul-2009 Patrick McHardy <kaber@trash.net> net: convert remaining non-symbolic return values in ndo_start_xmit() functions

This patch converts the remaining occurences of raw return values to their
symbolic counterparts in ndo_start_xmit() functions that were missed by the
previous automatic conversion.

Additionally code that assumed the symbolic value of NETDEV_TX_OK to be zero
is changed to explicitly use NETDEV_TX_OK.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
5b548140225c6bbbbd560551dd1048b2c0ce58be 12-Jun-2009 Patrick McHardy <kaber@trash.net> net: use symbolic values for ndo_start_xmit() return codes

Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively.

0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases
where its in direct proximity to one of the other values.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
1ea893fde29d8cf1639da8989f4b843dc3283ca8 11-Feb-2009 Dan Williams <dcbw@redhat.com> hostap: convert usage of net/ieee80211.h to linux/ieee80211.h

So that net/ieee80211.h can be made private to ipw2x00 in a follow-up.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
274bfb8dc5ffa16cb073801bebe76ab7f4e2e73d 29-Oct-2008 John W. Linville <linville@tuxdriver.com> lib80211: absorb crypto bits from net/ieee80211

These bits are shared already between ipw2x00 and hostap, and could
probably be shared both more cleanly and with other drivers. This
commit simply relocates the code to lib80211 and adjusts the drivers
appropriately.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
e174961ca1a0b28f7abf0be47973ad57cb74e5f0 27-Oct-2008 Johannes Berg <johannes@sipsolutions.net> net: convert print_mac to %pM

This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.

I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
21f644f3eabde637f255f75ad05d0821a7a36b7f 09-Apr-2008 David S. Miller <davem@davemloft.net> [NET]: Undo code bloat in hot paths due to print_mac().

If print_mac() is used inside of a pr_debug() the compiler
can't see that the call is redundant so still performs it
even of pr_debug() ends up being a nop.

So don't use print_mac() in such cases in hot code paths,
use MAC_FMT et al. instead.

As noted by Joe Perches, pr_debug() could be modified to
handle this better, but that is a change to an interface
used by the entire kernel and thus needs to be validated
carefully. This here is thus the less risky fix for
2.6.25

Signed-off-by: David S. Miller <davem@davemloft.net>
0795af5729b18218767fab27c44b1384f72dc9ad 04-Oct-2007 Joe Perches <joe@perches.com> [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()

This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
d7ea3be56adc95b17351221fd95e78115f3b01f4 28-May-2007 Brandon Craig Rhodes <brandon@rhodesmill.org> [PATCH] hostap: Allocate enough tailroom for TKIP

When hostap_tx_encrypt() tries to allocate enough headroom and
tailroom for ieee80211 encryption, it only makes enough room for the
"mpdu" phase of the operation, but forgets about the "msdu" phase.
(For TKIP, these two phases require, respectively, 4 and 8 bytes of
tailroom, per the "ieee80211_crypt_tkip" structure at the bottom of
net/ieee80211/ieee80211_crypt_tkip.c.)

Signed-off-by: Brandon Craig Rhodes <brandon@rhodesmill.org>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d626f62b11e00c16e81e4308ab93d3f13551812a 27-Mar-2007 Arnaldo Carvalho de Melo <acme@redhat.com> [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}

To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
459a98ed881802dee55897441bc7f77af614368e 19-Mar-2007 Arnaldo Carvalho de Melo <acme@redhat.com> [SK_BUFF]: Introduce skb_reset_mac_header(skb)

For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can
later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.

This one touches just the most simple case, next will handle the slightly more
"complex" cases.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5d25ea7c0c77cbdba1b5f092d60d624e24dfa938 02-May-2006 Arjan van de Ven <arjan@linux.intel.com> [PATCH] unused exports in wireless drivers

There's a bunch of unused exports in the wireless drivers; that's
bad since unused exports take up quite a bit of space in total;
the patch below removes them.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfa146e4be274fd04bfdb26b3c96cdfe81a43dc2 25-Mar-2006 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Fix EAPOL frame encryption

Fixed encrypted of EAPOL frames from wlan#ap interface (hostapd). This
was broken when moving to use new frame control field defines in
net/ieee80211.h. hostapd uses Protected flag, not protocol version
(which was cleared in this function anyway). This fixes WPA group key
handshake and re-authentication.
http://hostap.epitest.fi/bugz/show_bug.cgi?id=126

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
79058acaf5b6d4bcc3056382619de3ca9cebc62f 25-Mar-2006 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Make hostap_tx_encrypt() static

hostap_tx_encrypt() is used only inside hostap_80211_tx.c and there
are no plans to use it elsewhere in the future either, so let's make
it static. As a bonus, this should silence Coverity scanner from
complaining about bogus FORWARD_NULL case (CID: 274).

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5fad5a2e1f34b333a801b749c4e143c2ac3e8a4f 14-Jan-2006 Adrian Bunk <bunk@stusta.de> [PATCH] hostap: don't #include C files in hostap_main.c

This patch contains an attempt to properly build hostap.o without
#include'ing C files.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5bfc819b53ed67c76f33f969ab627070e85d87c1 21-Sep-2005 James Ketrenos <jketreno@linux.intel.com> [PATCH] ieee80211: Updated hostap to be compatible with extra_prefix_len changes

tree 8c1676c8a15c08e6d4c718fc7cd42d9bf4cd8235
parent 0ccc3dd6469ed492578c184f47dde2baccde3593
author James Ketrenos <jketreno@linux.intel.com> 1126715240 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127316717 -0500

Updated hostap to be compatible with extra_prefix_len changes.

Accomplished via:

for i in hostap_ap.c hostap_80211_tx.c; do
sed -i -e "s:\([.>]\)extra_prefix_len:\1extra_mpdu_prefix_len:g" \
-e "s:\([.>]\)extra_postfix_len:\1extra_mpdu_postfix_len:g" \
drivers/net/wireless/hostap/$i
done

CC: Jouni Malinen <jkmaline@cc.hut.fi>

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
d041674d62e1ad565f2fb6d53ae80b31d6656033 21-Sep-2005 James Ketrenos <jketreno@linux.intel.com> [PATCH] ieee80211: Updated hostap to be compatible with ieee80211_hdr changes

tree 8ec97d9056ceaf0f845ed51175dd842b700baadd
parent 329128457008ace3110c96971addf85a767dd5af
author James Ketrenos <jketreno@linux.intel.com> 1126714484 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127316636 -0500

Updated hostap to be compatible with ieee80211_hdr changes.

Change accomplished via:

for i in hostap_ap.{c,h} hostap_80211_{t,r}x.c; do
sed -i -e "s:ieee80211_hdr\([^_]\):ieee80211_hdr_4addr\1:g" \
drivers/net/wireless/hostap/$i
done

CC: Jouni Malinen <jkmaline@cc.hut.fi>

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
831a179fc9387af6dbaa12816ae1e074d1f1a730 26-Aug-2005 Jeff Garzik <jgarzik@pobox.com> hostap: s/IEEE80211_FCTL_WEP/IEEE80211_FCTL_PROTECTED/ to fix build
b2f4a2e3b1620667da9654f9e220c92ea52bdbe4 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Replace WLAN_FC_ defines with ieee80211 ones

Replace remaining WLAN_FC_* defines with the ones used in ieee80211
header file. This completes the move from hostap version of frame
control field processing to ieee80211 version.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
4339d328631aa815fe2181b9164b3690ca2db4da 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Use ieee80211 WLAN_FC_GET_{TYPE,STYPE}

Replace temporary HOSTAP_FC_GET_{TYPE,STYPE} macros with the ieee80211
version of WLAN_FC_GET_{TYPE,STYPE}.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
c0f72ca8e4f1b459b5582c1c8dcaf7e53151f069 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Replace hostap_ieee80211_hdr with ieee80211_hdr

Replace hostap-specific struct hostap_ieee80211_hdr with struct
ieee80211_hdr from net/ieee80211.h.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
5bee720fd7fa5ed4eade96058acd3a684da30932 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Fix skb->cb use for TX meta data

Old AP mode code for power saving was using skb->cb for couple of
flags before the more generic 802.11 TX code started using the same
buffer for struct hostap_skb_tx_data. This resulted in the power save
code corrupting the magic value in beginning of the buffer and TX code
dropping the power saved packets because of this for the case where
STAs send PS-Poll frames with PwrMgmt flag set.

This patch modifies the power save code to use the same struct
hostap_skb_tx_data as rest of the TX path in order to avoid corrupting
the data in skb->cb.

In addition, this patch reorders fields in the structure and makes
them use smaller types in order to make the structure fit in skb->cb
on 64-bit hosts.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
62fe7e378109537ff80971c5208e12d40bf88bee 31-Jul-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Replace crypto code with net/ieee80211 version

Replace Host AP version of WEP, TKIP, CCMP implementation with
net/ieee80211 that has more or less identical implementation (since
it is based on the Host AP implementation). Remove Host AP specific
implementation and modules from drivers/net/wireless/hostap.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
ebed67d2847a9d299b47eeb5d82744671ab2b198 31-Jul-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Start using net/ieee80211.h

Preparations for starting to use net/ieee80211 instead of private
IEEE 802.11 implementation. Include net/ieee80211.h and
net/ieee80211_crypt.h into files that will be needed these in the
future. Remove duplicate definitions from hostap_common.h and
rename WLAN_FC_GET_{TYPE,STYPE} macros for now sinc net/ieee80211.h
is using incompatible definitions. This will be resolved in the
future by updating Host AP to use the versions that do not shift
type/stype.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
ff1d2767d5a43c85f944e86a45284b721f66196c 13-May-2005 Jouni Malinen <jkmaline@cc.hut.fi> Add HostAP wireless driver.

Includes minor cleanups from Adrian Bunk <bunk@stusta.de>.