summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/efuse.c
Commit message (Collapse)AuthorAgeFilesLines
* rtlwifi: rtl8188ee: rtl8723ae: rtl8821ae: Initialize some variablesLarry Finger2014-09-301-2/+2
| | | | | | | | | | In a number of places, kmalloc or valloc were used to acquire memory. To ensure that these locations are correctly initialized, the calls were changed to kzalloc and vzalloc. The change fixes a problem that was causing HT operations to be cancelled. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Modify cam.{c,h} and efuse.{c,h} for new driversLarry Finger2014-09-261-108/+116
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: fix null dereference on efuse_word on kmalloc fail returns NULLColin Ian King2013-11-111-2/+3
| | | | | | | | | | | | | | | kmalloc on efuse_word can return null, leading to free'ing of elements in efuse_word on the error exit path even though it has not been allocated. Instead, don't free the elements of efuse_word if kmalloc failed. Also, kmalloc of any of the arrays in efuse_word[] can also fail, leading to undefined contents in the remaining elements leading to problems when free'ing these elements later on. So kzalloc efuse_word to ensure the kfree on the remaining elements won't cause breakage. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: rtlwifi: Replace variable with a breakPeter Senna Tschudin2013-09-261-10/+8
| | | | | | | | | | | This patch removes the variable continual, and change the while loop to break when efuse_data == 0xFF. Tested by compilation only. CC: Joe Perches <joe@perches.com> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix build errors for unusual casesLarry Finger2013-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The present build configuration for the rtlwifi family of drivers will fail under two known conditions: (1) If rtlwifi is selected without selecting any of the dependent drivers, there are errors in the build. (2) If the PCI drivers are built into the kernel and the USB drivers are modules, or vice versa, there are missing globals. The first condition is fixed by never building rtlwifi unless at least one of the device drivers is selected. The second failure is fixed by splitting the PCI and USB codes out of rtlwifi, and creating their own mini drivers. If the drivers that use them are modules, they will also be modules. Although a number of files are touched by this patch, only Makefile and Kconfig have undergone significant changes. The only modifications to the other files were to export entry points needed by the new rtl_pci and rtl_usb units, or to rename two variables that had names that were likely to cause namespace collisions. Reported-by: Fengguang Wu <fengguang.wu@intel.com> [Condition 1] Reported-by: Ben Hutchings <bhutchings@solarflare.com> [Condition 2] Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8188ee: Enable recognition of RTL8188EELarry Finger2013-04-011-2/+9
| | | | | | | | | | | | | | These patches modify the common probe routine to recognize the RTL8188EE chip and implement asynchronous firmware reading in the callback routine to initialize the sw variables. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: jcheung@suse.com Cc: machen@suse.com Cc: mmarek@suse.cz Cc: zhiyuan_yang@realsil.com.cn Cc: page_he@realsil.com.cn Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi Modify existing bits to match vendor version 2013.02.07Larry Finger2013-04-011-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | These changes add the new variables for P2P and modify the various struct definitions for other new features. This patch updates files base.{c,h} for the changes in the newest vendor driver. This patch updates files ps.{c,h} for the changes in the newest vendor driver. This patch updates files debug.{c,h}, efuse.c, pci.{c,h}, and wifi.h for the changes in the newest vendor driver. This patch updates files core.c, ps.c, rc.c, and wifi.h for the changes in the newest vendor driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: jcheung@suse.com Cc: machen@suse.com Cc: mmarek@suse.cz Cc: zhiyuan_yang@realsil.com.cn Cc: page_he@realsil.com.cn Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: Remove casts to same typeJoe Perches2012-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Neatened the mwifiex_deauthenticate_infra function which was doing odd things with array pointers and not using is_zero_ether_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: Remove boolean comparisons to true/falseJoe Perches2012-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Booleans should not be compared to true or false but be directly tested or tested with !. Done via cocci script: @@ bool t; @@ - t == true + t @@ bool t; @@ - t != true + !t @@ bool t; @@ - t == false + !t @@ bool t; @@ - t != false + t Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* rtlwifi: Update copyright datesLarry Finger2012-01-241-1/+1
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Convert RTPRINT macro to use ##__VA_ARGS__Joe Perches2012-01-241-14/+14
| | | | | | | | | | | | | | | | | | Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RTPRINT parentheses. Coalesce formats. Align arguments. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 590002 55333 127560 772895 bcb1f drivers/net/wireless/rtlwifi/built-in.o.new 594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__Joe Perches2012-01-241-16/+15
| | | | | | | | | | | | | | | | | | | | | | Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RT_TRACE parentheses. Miscellaneous typo and grammar fixes. Add missing newlines to formats. Remove duplicate KERN_DEBUG prefixes. Coalesce formats. Align arguments. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.new 607022 55333 138720 801075 c3933 drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Standardize RT_PRINT_DATA macro and usesJoe Perches2012-01-241-1/+1
| | | | | | | | | | | | | Use a single printk(KERN_DEBUG to emit the header line to avoid any possible output interleaving. Remove unnecessary parentheses from the calling uses. Standardize header arg without trailing \n or colon. Fix a few pairwiase/pairwise typos. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | | 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>
* rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with trueMike McCormack2011-06-201-4/+4
| | | | | | | | | These are a potential source of confusion, as most C code treats all non-zero values as true. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix warnings from gcc 4.6.0Larry Finger2011-06-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 4.6.0 warnings for rtlwifi: CC [M] drivers/net/wireless/rtlwifi/base.o drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’: drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’: drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable] CC [M] drivers/net/wireless/rtlwifi/efuse.o drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’: drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’: drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable] CC [M] drivers/net/wireless/rtlwifi/ps.o drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’: drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable] CC [M] drivers/net/wireless/rtlwifi/regd.o drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’: drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable] CC [M] drivers/net/wireless/rtlwifi/usb.o drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’: drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable] Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Move 2 large arrays off stackLarry Finger2011-05-101-7/+28
| | | | | | | | | | | In driver rtlwifi, efuse_read() places two relatively large arrays on the stack - a 1D u8 array of size 128, and a 2D array of u16 with 128 * 4 elements. With driver rtl8192de, the sizes will be 256 and 256 * 4 respectively. As that will make the 2D array be 2048 bytes, I have changed the code to use kmalloc to allocate the space. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192ce: rtl8192cu: Fix most sparse warningsLarry Finger2011-04-261-2/+2
| | | | | | | Fix most sparse warnings in rtlwifi, rtl8192ce and rtl8192cu drivers. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Change efuse routines addition of RTL8192SE and RTL8192DEChaoming_Li2011-04-261-37/+62
| | | | | | | | Change efuse routines for addition of RTL8192SE and RTL8192DE code Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Remove unused/unneeded variablesLarry Finger2011-04-041-56/+50
| | | | | | | Remove some unused variables and correct spelling errors. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix memset argument orderIlia Mirkin2011-03-211-16/+15
| | | | | | | | | | | | | | | These were found using the following semantic match: // <smpl> @@expression E1; type T;@@ * memset(E1, ... * sizeof(T) * ..., ...); // </smpl> Also take this opportunity to remove the unnecessary void* casts. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Eliminate udelay calls with too large valuesWilly Tarreau2011-02-231-18/+0
| | | | | | | | | | | On ARM, compilation of rtlwifi/efuse.c fails with the message: ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined! On inspection, the faulty calls are in routine efuse_reset_loader(), a routine that is never used, and the faulty routine is deleted. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: Fix firmware upload errorsChaoming Li2011-01-271-20/+20
| | | | | | | | | | When the source code from Realtek was prepared for kernel inclusion, some routines were refactored to reduce the level of indentation. This patch repairs errors introduced in that process. Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtl8192ce: Add new driverLarry Finger2010-12-151-0/+1189
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud