aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/lib80211_crypt_tkip.c
AgeCommit message (Collapse)Author
2016-11-17wireless: fix bogus maybe-uninitialized warningArnd Bergmann
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>
2016-01-27lib80211: Use skcipher and ahashHerbert Xu
This patch replaces uses of blkcipher with skcipher and the long obsolete hash interface with ahash. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-12-04lib80211: ratelimit key index mismatchJohannes Berg
This indicates a driver key selection issue, but even then there's no point in printing it all the time, so ratelimit it. Also remove the priv pointer from it -- people debugging will only have a single device anyway and it's useless as anything but a cookie. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-29hostap: Don't use create_proc_read_entry()David Howells
Don't use create_proc_read_entry() as that is deprecated, but rather use proc_create_data() and seq_file instead. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: Jouni Malinen <j@w1.fi> cc: John W. Linville <linville@tuxdriver.com> cc: Johannes Berg <johannes@sipsolutions.net> cc: linux-wireless@vger.kernel.org cc: netdev@vger.kernel.org cc: devel@driverdev.osuosl.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-15net: Convert net_ratelimit uses to net_<level>_ratelimitedJoe Perches
Standardize the net core ratelimited logging functions. Coalesce formats, align arguments. Change a printk then vprintk sequence to use printf extension %pV. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-13wireless: Remove unnecessary OOM logging messagesJoe Perches
Removing unnecessary messages saves code and text. Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24net/wireless: Use pr_<level> and netdev_<level>Joe Perches
No change in output for pr_<level> prefixes. netdev_<level> output is different, arguably improved. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26lib80211: remove unused host_build_iv optionJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: correct sparse warning in lib80211_crypt_tkip.cJohn W. Linville
CHECK net/wireless/lib80211_crypt_tkip.c net/wireless/lib80211_crypt_tkip.c:581:27: warning: cast to restricted __le16 Caused by dereferencing a "u8 *" and passing it to le16_to_cpu... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-02lib80211: Introduce TKIP_HDR_LEN define for code clarityAndriy Tkachuk
Introduce TKIP_HDR_LEN define for code clarity (in the same way as CCMP_HDR_LEN). Also odd len variable (not used) dropped from lib80211_tkip_hdr(). Signed-off-by: Andriy V. Tkachuk <andrit@ukr.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-02lib80211: Cosmetics - make room for MIC/CRC near the actual calculationAndriy Tkachuk
Signed-off-by: Andriy V. Tkachuk <andrit@ukr.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16lib80211: silence excessive crypto debugging messagesJohn W. Linville
When they were part of the now defunct ieee80211 component, these messages were only visible when special debugging settings were enabled. Let's mirror that with a new lib80211 debugging Kconfig option. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-21lib80211: absorb crypto bits from net/ieee80211John W. Linville
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>