summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
Commit message (Collapse)AuthorAgeFilesLines
* Staging: rtl8712: Coding style warning fix for block commentPunit Vara2015-09-211-1/+2
| | | | | | | | | | This is a patch to mlme_linux.c that fixes up following warning reported by checkpatch.pl : -Block comments use a trailing */ on a separate line Signed-off-by: Punit Vara <punitvara@gmailc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: usb_ops_linux: fixed a comparison coding style issueSamuel Dominguez Lorenzo2015-09-141-1/+1
| | | | | | | | Fixed a coding style issue where a comparison had the constant on the left side of the test instead of being on the right side of it. Signed-off-by: Samuel Dominguez Lorenzo <yysamueldominguez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/rtl8712 : Remove duplicated BIT() definitionsAnish Bhatt2015-09-132-9/+0Star
| | | | | | | | The BIT() macro is already defined in bitops.h, remove duplicate definitions. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/rtl8712 : Remove unused macro definitions.Anish Bhatt2015-09-131-4/+0Star
| | | | | | | | WLAN_ETHHDR_LEN/WLAN_ETHADDR_LEN/WLAN_ADDR_LEN are unused, duplicate or unnecessary, remove. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary externsJoe Perches2015-08-151-16/+12Star
| | | | | | | Using 'extern' is not necessary for function prototypes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: change SupportedRates to ratesJoshua Clayton2015-08-083-25/+20Star
| | | | | | | | | | Change the value to a name that conforms to Linux coding style. "rates" is equally expressive in this context, and I have left alone a comment and function name that describe the rates as supported rates. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove typedefsJoshua Clayton2015-08-082-12/+7Star
| | | | | | | | | Coding style fix. Get rid of typedefs NDIS_802_11_RATES and NDIS_802_11_RATES_EX Undo any casting that was done as a result of the typedef. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rename functionJoshua Clayton2015-08-084-14/+14
| | | | | | | | Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(), which corresponds to the struct whose size it measures. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove duplicate structJoshua Clayton2015-08-087-49/+26Star
| | | | | | | | | | | | struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex, and is used about a third as often. Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: removed unused wrapper structsJoshua Clayton2015-08-081-18/+0Star
| | | | | | | | Remove wrapper structs that just wrap struct ndis_wlan_bssid_ex, and are unused. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix commentJoshua Clayton2015-08-081-11/+1Star
| | | | | | | | | | | | The old comment refers to a typedef name which is being removed, and to a style of calculation which is no longer being used. It falsely states that IELength is variable length, instead of IEs. Change comment to simply state that the IEs field is a buffer of variable size and that IELength refers to the current size. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: simplify size calculationJoshua Clayton2015-08-081-10/+1Star
| | | | | | | | | | replace item-by-item size calculation of a struct with the size of the struct. This gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix buggy size calculationJoshua Clayton2015-08-081-11/+1Star
| | | | | | | | | | | | r8712_get_ndis_wlan_bssid_ex_sz has a "6 * sizeof(unsigned long)" where the underlying struct has a 6 * unsigned char. Simplify the calculation by just subtracting the variable part from the size of the struct. This also gets rid of a use of typedef NDIS_802_11_RATES_EX Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8712:Fix checkpatch warningRavi Teja Darbha2015-07-151-2/+2
| | | | | | | Fix line over 80 characters warning. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_security.c: remove unnecessary variable initializationSunil Shahu2015-07-151-1/+1
| | | | | | | | | | Variable "u32 c" always re-initialize in for loop. Initialized value of "u32 c" is not used in function and is redundant, hence removed. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sunil Shahu <shshahu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8712: remove unnecessary else statementSunil Shahu2015-07-151-19/+16Star
| | | | | | | "else" statement after "if" is unnecessary, hence removed. Signed-off-by: Sunil Shahu <shshahu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix else after break or return warningDogukan Ergun2015-06-131-2/+1Star
| | | | | | | | This patch fixes checkpatch.pl warning. WARNING: else is not generally useful after a break or return Signed-off-by: Dogukan Ergun <dogukan.ergun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: use swap() in dequeue_xframe_ex()Fabian Frederick2015-06-131-7/+3Star
| | | | | | | | | Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8712:Fix compressed return statementPrasanna Karthik2015-06-081-3/+1Star
| | | | | | | | | Fix reported by coccinelle compressing last two lines with single return call Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix indentation issueHari Prasath Gujulan Elango2015-06-081-2/+2
| | | | | | | Fixed indentation issue in few lines Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove useless return valueLuca Ceresoli2015-05-311-3/+1Star
| | | | | | | | | | | The loadparam() function cannot fail, it's called only once and its return value is ignored there. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <greg@kroah.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove unneeded forward declarationLuca Ceresoli2015-05-311-1/+0Star
| | | | | | | | Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <greg@kroah.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove useless commentLuca Ceresoli2015-05-311-1/+0Star
| | | | | | | | | | "step 2" does mean much as there is no "step 1" stated anywhere... Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <greg@kroah.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: prevent buffer overrun in recvbuf2recvframeHaggai Eran2015-05-311-1/+2
| | | | | | | | | | | | | With an RTL8191SU USB adaptor, sometimes the hints for a fragmented packet are set, but the packet length is too large. Allocate enough space to prevent memory corruption and a resulting kernel panic [1]. [1] http://www.spinics.net/lists/linux-wireless/msg136546.html Cc: <stable@vger.kernel.org> Signed-off-by: Haggai Eran <haggai.eran@gmail.com> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix stack dumpSudip Mukherjee2015-05-315-78/+78
| | | | | | | | | | | | | | | | del_timer_sync() is not to be called in the interrupt context unless the timer is irqsafe. but most of the functions where commits 6501c8e7d86cca5f and 382d020f4459cd77 touched were called in interrupt context. And as a result the WARN_ON was getting triggered. Changed to del_timer() in places which were called from interrupt. Fixes: 382d020f4459cd77 ("Staging: rtl8712: Eliminate use of _cancel_timer" Fixes: 6501c8e7d86cca5f ("Staging: rtl8712: Eliminate use of _cancel_timer_ex") Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=97711 Reported-by: Arek Rusniak <arek.rusi@gmail.com> Tested-by: Arek Rusniak <arek.rusi@gmail.com> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Use ether_addr_copy() instead of memcpy()Jagan Teki2015-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Warning encounter this by applying checkpatch.pl against this file: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) pahole output for respective structures: - addr->sa_data struct sockaddr { sa_family_t sa_family; /* 0 2 */ char sa_data[14]; /* 2 14 */ /* size: 16, cachelines: 1, members: 2 */ /* last cacheline: 16 bytes */ }; - pnetdev->dev_addr dev_addr is interface address infor from generic net_device structure which is properly aligned and have some patches with this change as well. "staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()" (sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38) Signed-off-by: Jagan Teki <jteki@openedev.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.1-rc4 into staging-nextGreg Kroah-Hartman2015-05-181-10/+7Star
|\ | | | | | | | | | | We want the fixes in here for testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: rtl8712: freeing an ERR_PTRDan Carpenter2015-05-081-10/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If memdup_user() fails then "pparmbuf" is an error pointer and we can't pass it to kfree(). I changed the "goto _r871x_mp_ioctl_hdl_exit" to a direct return. I changed the earlier goto to a direct return as well for consistency and removed the "pparmbuf = NULL" initializer since it's no longer needed. Fixes: 45de432775d6 ('Staging: rtl8712: Use memdup_user() instead of copy_from_user()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | rtl8712: don't duplicate ieee80211 constants for status/reasonPaul Gortmaker2015-05-081-29/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are all defined as a part of the standard and should not be duplicated on a per-driver basis. Use the global ones and delete the local ones. It seems that ieee80211 was already included everywhere it was needed, since no explicit include <...> were needed to be added in order to preserve getting a successful compile. This isn't the totality of duplicated data removed, but it is a start. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: fixed multiple spelling errors.Carlos E. Garcia2015-05-082-2/+2
|/ | | | | | | Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Drop unneeded cast on netdev_privJulia Lawall2015-04-033-41/+41
| | | | | | | | | | | | | | | | | | | | | | The result of netdev_priv is already implicitly cast to the type of the left side of the assignment. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; @@ x = - (T *) netdev_priv(...) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Remove zero-testing pointer typed valueAmitoj Kaur Chawla2015-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes variable comparison with 0 by using !. Done using following coccinelle script. @ disable is_zero,isnt_zero @ expression *E; expression E1,f; @@ E = f(...) <... ( - E == 0 + !E | - E != 0 + E | - 0 == E + !E | - 0 != E + E ) ...> ?E = E1 @ disable is_zero,isnt_zero @ expression *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | - 0 + NULL == E | - 0 + NULL != E ) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Remove duplicated argument to |Cristina Opriceana2015-04-011-2/+1Star
| | | | | | | | | Delete duplicated argument to | for the state argument in the _clr_fwstate_() function call as it is redundant. Detected with coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use memdup_user() instead of copy_from_user()Cristina Opriceana2015-04-011-7/+3Star
| | | | | | | | | | Use memdup_user() to avoid its duplicated implementation and simplify code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC, which is valid because copy_from_user() might sleep and it's useless to make the allocation atomic. Found with coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: replace memcpy with ether_addr_copyHaneen Mohammed2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace memcpy with ethe_addr_copy to address the following warning generated by checkpatch.pl: ""Prefer ether_addr_copy over memcpy if the Ethernet addresses are __aligned(2)" Follwoing is the output of pahole for the relevant datastructures: 1- for "iwe.u.ap_addr.sa_data" and "wrqu->ap_addr.sa_data" struct sockaddr { sa_family_t sa_family; /* 0 2 */ char sa_data[14]; /* 2 14 */ /* size: 16, cachelines: 1, members: 2 */ /* last cacheline: 16 bytes */ }; struct iw_event { __u16 len; /* 0 2 */ __u16 cmd; /* 2 2 */ /* XXX 4 bytes hole, try to pack */ union iwreq_data u; /* 8 16 */ /* size: 24, cachelines: 1, members: 3 */ /* sum members: 20, holes: 1, sum holes: 4 */ /* last cacheline: 24 bytes */ }; 2- for "pnetwork->network.MacAddress" and "pcur_bss->MacAddress" struct wlan_network { struct list_head list; /* 0 16 */ int network_type; /* 16 4 */ int fixed; /* 20 4 */ unsigned int last_scanned; /* 24 4 */ int aid; /* 28 4 */ int join_res; /* 32 4 */ struct ndis_wlan_bssid_ex network; /* 36 884 */ /* --- cacheline 14 boundary (896 bytes) was 24 bytes ago --- */ /* size: 920, cachelines: 15, members: 7 */ /* last cacheline: 24 bytes */ }; struct ndis_wlan_bssid_ex { u32 Length; /* 0 4 */ unsigned char MacAddress[6]; /* 4 6 */ u8 Reserved[2]; /* 10 2 */ struct ndis_802_11_ssid Ssid; /* 12 36 */ u32 Privacy; /* 48 4 */ s32 Rssi; /* 52 4 */ enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; /* 56 4 */ struct NDIS_802_11_CONFIGURATION Configuration; /* 60 32 */ /* --- cacheline 1 boundary (64 bytes) was 28 bytes ago --- */ enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; /* 92 4 */ NDIS_802_11_RATES_EX SupportedRates; /* 96 16 */ u32 IELength; /* 112 4 */ u8 IEs[768]; /* 116 768 */ /* --- cacheline 13 boundary (832 bytes) was 52 bytes ago --- */ /* size: 884, cachelines: 14, members: 12 */ /* last cacheline: 52 bytes */ }; Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Replace __constant_cpu_to_le16Dilek Uzulmez2015-03-161-2/+2
| | | | | | | | This fixes the following checkpatch.pl warning: WARNING: __constant_cpu_to_le16 should be cpu_to_le16 Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: fix potential null pointer dereferenceMatteo Semenzato2015-03-161-0/+2
| | | | | | | Check if kmalloc succeded before using the pointer in memcpy. Signed-off-by: Matteo Semenzato <mattew8898@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove else after return statementHaneen Mohammed2015-03-161-11/+9Star
| | | | | | | | else after return generally is not useful. This patch removes else after return statement. Issue addressed by checkpatch.pl. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Eliminate use of _cancel_timerVaishali Thakkar2015-03-164-16/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | Use timer API function del_timer_sync instead of driver specific function _cancel_timer as besides deactivating a timer, it also ensures that the timer is stopped on all CPUs before the driver exists. Also, variables timer_cancelled and bool are removed as they are no longer needed. @a@ expression x; identifier y; @@ - _cancel_timer (&x, &y); + del_timer_sync (&x); @@type T; identifier a.y;@@ - T y; ...when != y Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Eliminate use of _cancel_timer_exVaishali Thakkar2015-03-166-88/+82Star
| | | | | | | | | | | | | | | | | | | | Use timer API function del_timer_sync instead of driver specific function _cancel_timer_ex as besides deactivating a timer, it ensures that the timer is stopped on all CPUs before the driver exists. Also, definition of function _cancel_timer_ex is removed as it is no longer needed after this change. This is done using Coccinelle and semantic patch used for this is as follows: @@ expression x; @@ - _cancel_timer_ex (&x); + del_timer_sync (&x); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging rtl8172: Remove unnecessary typecastVatika Harlalka2015-03-091-1/+1
| | | | | | | | | Using addressof and then casting to the original type is unneeded. So these casts can be removed. Issue detected via Coccinelle script. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8712: Removed unnecessary parenthesesTina Johnson2015-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch: @rule1@ identifier x,y; constant c; @@ ( x = -( y << c -) ; | x = -( y >> c -) ; | x = -( y + c -) ; | x = -( y - c -) ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: replace memset(x,0,ETH_ALEN)Aya Mahfouz2015-03-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The aforementioned function replaces memset. In addition, linux/etherdevice.h was included as a header since it is the file that defines the inline function eth_zero_addr(). The changes were carried out using the following coccinelle script: @header@ @@ #include <linux/etherdevice.h> @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include <linux/etherdevice.h> + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove extra parentheses around right bit shift operationAya Mahfouz2015-03-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes extra parentheses around bitwise right shift operation. The cases handled are when the resultant value is assigned to a variable or when a shift operation is carried out for a function argument. The issues were detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Eliminate use of _init_timerVaishali Thakkar2015-03-068-49/+40Star
| | | | | | | | | | | | | | | | | | | | | This patch introduces the use of API function setup_timer instead of driver specific function _init_timer as it is the preferred and standard way to setup and set the timer. To be compatible with the change, argument types of referenced functions are changed. Also, definition of function _init_timer is removed as it is no longer needed after this change. This is done using Coccinelle and semantic patch used for this is as follows: @@ expression x, y; identifier a, b;@@ - _init_timer (&x, y, a, b); + setup_timer (&x, a, (unsigned long)b); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Use del_timerVaishali Thakkar2015-03-021-1/+1
| | | | | | | | | | | | | | | | Use timer API function del_timer instead of driver specific function _cancel_timer_ex as it is a standard way for deactivating a timer. This is done using Coccinelle and semantic patch used for this is as follows: @@ expression x; @@ - _cancel_timer_ex (&x); + del_timer (&x); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Eliminate use of _set_timerVaishali Thakkar2015-03-028-174/+199
| | | | | | | | | | | | | | | | | | | | This patch introduces the use of API function mod_timer instead of driver specific function _set_timer as it is a more efficient and standard way to update the expire field of an active timer. Also, definition of function _set_timer is removed as it is no longer needed after this change. Here, these cases are handled using Coccinelle and semantic patch used for this is as follows: @@ expression x; expression y;@@ - _set_timer (&x, y); + mod_timer (&x, jiffies + msecs_to_jiffies (y)); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz2015-02-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz2015-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>