summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e/rtllib_softmac.c
AgeCommit message (Collapse)Author
2012-09-21staging: Fix misspellings of "whether".Adam Buchbinder
"Whether" is spelled "wether" in several places. This fixes those that are in the staging tree. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: rtl8192e: using random_ether_addr() to generate random MACWei Yongjun
Using random_ether_addr() to generate a random Ethernet address (MAC) that is not multicast and has the local assigned bit set. Not need to duplicating its implementation. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: rtl8192e: remove casting of returned pointer from kmallocDevendra Naga
as per Documentation/CodingStyle we dont need to cast the return of kmalloc Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: rtl8192e: use is_broadcast_ether_addr() instead of memcmp()Wei Yongjun
Using is_broadcast_ether_addr() instead of directly use memcmp() to determine if the ethernet address is broadcast address. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-14staging: rtl8192e: Fix typo in staging/rtl8192eMasanari Iida
Correct spelling typo in staging/rtl8192e. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24staging: rtl8192e: Fix typos.Justin P. Mattock
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> ACKed-by: Larry Finger <Larry.finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20staging: r8192e_pci: Change memcpy to memcmpLarry Finger
Routine rtllib_MlmeDisassociateRequest() has a comparison of memcpy() with NULL, which makes no sense. Analysis of the code suggests that memcmp() was intended. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-16Staging, rtl8192e, softmac: remove redundant memset and fix mem leakJesper Juhl
In drivers/staging/rtl8192e/rtllib_softmac.c::rtllib_rx_assoc_resp() we allocate memory for 'network' with kzalloc() and then proceed to zero the already zeroed mem we got from kzalloc() with memset(). That's redundant, so remove the memset() We also fail to kfree() the memory we allocated for 'network' if we do not enter if (ieee->current_network.qos_data.supported == 1) { and the variable then goes out of scope. To fix that I simply moved the kfree() that was inside that 'if' statement to instead be just after it. It then covers both the case where we take the branch and when we don't. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-12-22staging/rtl8192e: Register against lib80211Sean MacLennan
Convert rtllib from registering the crypt drivers against rtllib_crypt and instead register the against lib80211. The crypto functions have R- prepended (R-CCMP, R-TKIP, R-WEP) so they will not clash with the lib80211 versions. We cannot use the lib80211 crypt drivers since the rtl8192e has some hardware support that is not handled by the lib80211 crypt drivers. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22staging/rtl8192e: Convert to lib80211_crypt_infoSean MacLennan
Convert rtllib to use lib80211_crypt_info. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_opsSean MacLennan
Convert rtllib_crypt_data to lib80211_crypt_data and rtllib_crypt_ops to lib80211_crypt_ops. This is almost a 1:1 replacement, only extra_prefix_len and extra_postfix_len changed. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22staging/rtl8192e: Add lib80211.h to rtllib.hSean MacLennan
Add lib80211.h header file to rtllib.h and get it compiling. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-14staging: remove version.h includes in rtl8192eDevendra Naga
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30rtl8192e: Export symbolsSean MacLennan
The rtl8192e driver had a natural split between the more generic rtllib code and the more specific rtl8192e code. This patch exports all the symbols needed by the r8192 specific code from the rtllib generic code. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30rtl8192e: create generic rtllib_debug.hSean MacLennan
Rename rtl_debug.h to rtllib_debug.h. Source files should include rtllib.h if they are generic and rtl_core.h if they are r8192e specific. Files should never include both. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-27staging: rtl8192e: Use kmemdup rather than duplicating its implementationThomas Meyer
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-27staging: rtl8192e: Use kzalloc rather than kmalloc v2Thomas Meyer
Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-27rtl8192e: Don't copy huge struct by value (and make it const).Jesper Juhl
rtllib_is_shortslot() takes one argument - a struct that's more than a kilobyte large. It should take a pointer instead of copying such a huge struct - and the argument might as well be declared 'const' now that we are at it, since it is not modified. This patch makes these changes. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06staging: rtl8192e: Fix various problems noted by smatchLarry Finger
Smatch reports the following problems: CHECK drivers/staging/rtl8192e/rtllib_softmac.c drivers/staging/rtl8192e/rtllib_softmac.c +3143 rtllib_softmac_free(4) info: redundant null check on ieee->pDot11dInfo calling kfree() CHECK drivers/staging/rtl8192e/rtllib_module.c drivers/staging/rtl8192e/rtllib_module.c +198 free_rtllib(6) info: redundant null check on ieee->pHTInfo calling kfree() CHECK drivers/staging/rtl8192e/rtl819x_TSProc.c drivers/staging/rtl8192e/rtl819x_TSProc.c +280 SearchAdmitTRStream(52) error: potential null derefence 'pRet'. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Fix sparse (non-endian) messages - Part ILarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pMLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Cleanup checkpatch -f errors - Part XIVLarry Finger
With this patch, all of the checkpatch errors are fixed; however, only some of the lines that are too long were fixed. To complete the fixing of these warnings, the file rtllib_softmac.c will need refactoring. In addition, some of the variables may need renaming. Those changes can be deferred. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Modify time handlingLarry Finger
In several places, the driver keeps times (in jiffies) in two 32-bit quantities. In the rtl8192_hw_to_sleep(), there is an error in the calculation of the difference between two 64-bit quantities. Rather than fix that error, I have converted to a single 64-bit number. That makes the code be much cleaner and clearer. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24staging: rtl8192e: Convert typedef cb_desc to struct cb_descLarry Finger
Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Convert typedef RT_POWER_SAVE_CONTROL to struct ↵Larry Finger
rt_pwr_save_ctrl Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Convert typedef OCTET_STRING to struct octet_stringLarry Finger
Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Convert typedef RT_HIGH_THROUGHPUT to struct rt_hi_throughputLarry Finger
Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with CUSTOMER_ID_INTEL_CMPC ↵Larry Finger
and CONFIG_CRDA Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with FOR_ANDROID_X86 and ↵Larry Finger
FOR_MOBLIN Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with ADHOC_11NLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with WIFI_TESTLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with RTK_DMP_PLATFORMLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with SUPPORT_USPDLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with ↵Larry Finger
USB_TX_DRIVER_AGGREGATION_ENABLE Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove ifdefs that depend on ENABLE_DOT11DLarry Finger
This configuration parameter is selected in the Makefile, thus the conditional code can be removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code from removal of ENABLE_TKIP11NLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with PF_SYNCTHREADLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with COMPATIBLE_WITH_RALINK_MESHLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with USB_USE_ALIGNMENTLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code involved with TO_DOLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code involved with TO_DO_LISTLarry Finger
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove dead code associated with RTL8192SELarry Finger
The vendor code will generate several different drivers. As the RTL8192SE is covered by a mac80211 driver in mainline, eliminate that code heere. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24staging: rtl8192e: Remove code dependent on RTL8190PLarry Finger
The vendor code can conditionally generate drivers for a number of devices. Remove any code that depends on RTL8190P being set. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24rtl8192e: Remove occurences of #if 1Mike McCormack
Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-24rtl8192e: Remove extra ifdefsMike McCormack
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-24From: wlanfae <wlanfae@realtek.com>Larry Finger
[PATCH 1/8] rtl8192e: Import new version of driver from realtek Signed-off-by: wlanfae <wlanfae@realtek.com> Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> ---