summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723au
Commit message (Collapse)AuthorAgeFilesLines
* cfg80211: remove enum ieee80211_bandJohannes Berg2016-04-123-30/+30
| | | | | | | | | This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* staging: refresh TODO for rtl8723auXose Vazquez Perez2016-03-231-0/+3
| | | | | | | | | | | | | People should not waste time and energy working on this staging driver. A replacement(rtl8xxxu) using the kernel wireless stack already was merged in the 4.3 kernel. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Remove unused functions and prototypeBhumika Goyal2016-03-122-118/+0Star
| | | | | | | | | The functions rtw_ap_inform_ch_switch23a, rtw_acl_remove_sta23a and rtw_acl_add_sta23a are not used anywhere in the kernel. So remove their definition and prototype. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* taging: rtl8723au: Remove empty function odm_Init_RSSIForDM23aBhumika Goyal2016-03-122-6/+0Star
| | | | | | | | The function odm_Init_RSSIForDM23a is empty and therefore there is no use of keeping it. Also, remove its prototype. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: Remove unnecessary function and its callBhaktipriya Shridhar2016-03-121-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | The function odm_DynamicBBPowerSaving23a on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, odm_DynamicBBPowerSaving23a and its calls have been removed. This was done using Coccinelle. @@ identifier f; @@ void f(...) { -return; } Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: Remove unnecessary else after returnBhaktipriya Shridhar2016-03-121-2/+2
| | | | | | | | | | | | | | | | | This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: Use macro DIV_ROUND_UPBhaktipriya Shridhar2016-03-121-2/+1Star
| | | | | | | | | | | | | | | | | | | | The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( - ((e1) + e2 - 1) / (e2) + DIV_ROUND_UP(e1,e2) | - ((e1) + (e2 - 1)) / (e2) + DIV_ROUND_UP(e1,e2) ) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_security: Change form of NULL comparisonsBhaktipriya Shridhar2016-03-121-2/+2
| | | | | | | | | | | | | | Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_sta_mgt: Change form of NULL comparisonsBhaktipriya Shridhar2016-03-121-3/+3
| | | | | | | | | | | | | | Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8723au: remove unneeded null testCihangir Akturk2016-03-121-11/+2Star
| | | | | | | | | | | | | | null test on pnetwork removed, because the iterator variable list_for_each_entry_safe cannot be null. This commit fixes the following error reported by coccinelle: drivers/staging/rtl8723au/core/rtw_mlme.c:1621:7-15: ERROR: iterator variable bound on line 1620 cannot be NULL Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: Remove Unused macroBhaktipriya Shridhar2016-03-121-2/+0Star
| | | | | | | PlatformIndicateBTACLData is an unused macro. Hence, removed. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: fix static checker warningGeliang Tang2016-03-121-2/+4
| | | | | | | | | | | Fix the following static checker warning: drivers/staging/rtl8723au/core/rtw_sta_mgt.c:365 rtw_get_stainfo23a() error: potential NULL dereference 'psta'. Fixes: e280d71("staging: rtl8723au: use list_for_each_entry*()") Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Remove print statements and debug messagesBhumika Goyal2016-03-122-8/+1Star
| | | | | | | | | | | | | | | | | | | | | | | The memory allocation functions generates a call stack containing all the context information on failure, so print statements and debug messages can be removed on failure of these functions. Also remove unwanted {} around if block after removal of these messages. Done using coccinelle: @@ expression e; @@ e=\(kmalloc\|kmalloc\|kmalloc_array\|alloc_netdev\|kzalloc\| devm_kzalloc\|devm_ioremap\)(...); ... if(!e){ - \(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: Eliminate commented out codeJanani Ravichandran2016-03-121-50/+0Star
| | | | | | | Reduce code clutter by removing commented out code. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Use min macro instead of ternary operatorBhumika Goyal2016-03-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | | This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min return the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: Remove CamelCaseJanani Ravichandran2016-03-121-2/+2
| | | | | | | Remove CamelCase on the variable FunctionContext. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: Drop unneeded pointer castJanani Ravichandran2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Void pointers don't need to be cast to other pointer types. Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: Remove useless return variablesBhaktipriya Shridhar2016-03-111-13/+3Star
| | | | | | | | | | | | | | | | | | | | This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Remove debug messagesBhumika Goyal2016-03-111-6/+2Star
| | | | | | | | | As kmalloc generates a backtrace on failure so there is no need of these debug messages when kmalloc fails. Also remove unwanted {} around if block after removal of these messages. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Clean up tests if NULL returned on failureBhumika Goyal2016-03-112-3/+3
| | | | | | | | | | | | | | | | | | | | Some functions like kmalloc/usb_alloc_urb returns Null as their return value on failure. !x is generally preferred over x==NULL or NULL==x. So make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: Remove unnecessary paranthesesBhaktipriya Shridhar2016-03-111-2/+2
| | | | | | | | | | | | | | | | | | Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = - ( b - ) ; Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_recv: use list_first_entry()Geliang Tang2016-03-111-3/+2Star
| | | | | | | | Use list_first_entry() instead of container_of() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_xmit: use list_first_entry_or_null()Geliang Tang2016-03-111-18/+8Star
| | | | | | | | | Use list_first_entry_or_null() instead of list_empty() + container_of() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_recv: use list_first_entry_or_null()Geliang Tang2016-03-111-31/+11Star
| | | | | | | | | Use list_first_entry_or_null() instead of list_empty() + container_of() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: Use macro ARRAY_SIZEBhaktipriya Shridhar2016-02-211-1/+1
| | | | | | | | | | | | | | | | | | The macro ARRAY_SIZE is more concise to use instead of dividing size of the array by the size of its type. Changes were made using Coccinelle. @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: Remove unnecessary else following returnJanani Ravichandran2016-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary else when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { ... return ...; } - else{ ... - } @rule2@ expression e2; statement s1; @@ if(e2) { ... return ...; } - else s1 Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: whitespace and blank line cleaningGeliang Tang2016-02-217-94/+12Star
| | | | | | | | | This patch cleans whitespaces and blank lines involved with previous two patchs in this patch set. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: rtw_recv: remove useless codesGeliang Tang2016-02-211-7/+2Star
| | | | | | | | | There are some useless codes in rtw_free_recvframe23a_queue() and recvframe_defrag(), so remove them. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: use list_for_each_entry*()Geliang Tang2016-02-218-138/+95Star
| | | | | | | | | Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: hal: Remove unused macrosBhumika Goyal2016-02-211-2/+0Star
| | | | | | | | The macros PlatformProcessHCICommands and PlatformTxBTQueuedPackets are not used anywhere in the kernel so remove them. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Replace header filesBhumika Goyal2016-02-151-3/+3
| | | | | | | | | The headers <asm/uaccess.h>,<asm/atomic.h>,<asm/atomic.h> should not be directly included so replace them. Warning generated by checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Remove unused macrosBhumika Goyal2016-02-151-2/+0Star
| | | | | | | | The macros PlatformAcquireSpinLock and PlatformReleaseSpinLock are not used anywhere so remove them. Used grep to find occurences. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: Use ARRAY_SIZE macro for sizes of arraysJanani Ravichandran2016-02-124-8/+6Star
| | | | | | | | | Use ARRAY_SIZE to calculate the size of an array to make code concise. The semantic patch used can be found here: https://github.com/coccinelle/coccinellery/commit/9cbab452a3a2e18439e8386d6c4a68ee42c3ee2b Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8*: fix my email address upGreg Kroah-Hartman2016-02-121-1/+1
| | | | | | | | For some reason I had an old linux.com address in these TODO files, point to my linuxfoundation.org address as that works properly here. Reported-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: Fixes unnecessary return warningBhaktipriya Shridhar2016-02-081-20/+0Star
| | | | | | | | | This patch fixes checkpatch.pl warning in rtw_mlme_ext.c file. WARNING: void function return statements are not generally useful Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: use %pM and %ph formattingDaniil Leshchev2016-02-083-47/+15Star
| | | | | | | | | use %pM and %ph specifiers instead of placing each byte on stack. (staging/rtl8723au/TODO) Signed-off-by: Daniil Leshchev <meleodr@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: change parameter type in rtl8723a_set_rssi_cmd declarationAnatoly Stepanov2016-02-083-5/+5
| | | | | | | | | | | | | | | | | Previosly the function had the following prototype: int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param) My suggestion here is to modify the prototype this way: int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param) We can do this based on the following considerations: 1. rtl8723a_set_rssi_cmd is used only with 32-bit "param" values 2. There's no point in using "u8 *param" until we pass param length 3. As we just read "param", it's ok to pass it by value Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: hal: rtl8723a_hal_init: fixed 4 spelling errors.Jiading Gai2016-02-081-4/+4
| | | | | | | Fixed four spelling errors. Signed-off-by: Jiading Gai <jiading.gai.github@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Declare function staticKsenija Stanojevic2015-11-161-1/+2
| | | | | | | | Declare function Efuse_ReadAllMap as static since it's defined and used only in this file. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Remove unused EFUSE_Write1Byte functionKsenija Stanojevic2015-11-161-42/+0Star
| | | | | | | Function is defined but not used, so remove it. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723au: core: Remove unnecessary functionsAmitoj Kaur Chawla2015-10-281-37/+0Star
| | | | | | | Drop functions that are declared but are not being used anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: remove unneeded forward function declarationsAlison Schofield2015-10-271-2/+0Star
| | | | | | | | | | Remove unneeded forward function declarations. Addresses checkpatch.pl: WARNING: externs should be avoided in .c files Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: move function type in line with function nameAlison Schofield2015-10-271-37/+21Star
| | | | | | | | Move function types to be adjacent to the function names in declarations to improve readability. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: insert correct spacing around operandsAlison Schofield2015-10-271-12/+16
| | | | | | | | Adds required spacing around operands to improve readability. Corrects checkpatch.pl ERROR: spaces required * Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: use kernel preferred style for commentingAlison Schofield2015-10-271-182/+60Star
| | | | | | | | | | | Reworked comments per kernel coding style to improve readability. Corrects checkpatch.pl: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: remove externs and include needed header fileAlison Schofield2015-10-251-4/+1Star
| | | | | | | | | | Remove extern declaration and add include of header file to get same. Addresses checkpatch.pl: WARNING: externs should be avoided in .c files Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: replace explicit NULL comparisons with !Alison Schofield2015-10-251-4/+4
| | | | | | | | | | | Replace explicit NULL comparison with ! operator to simplify code. Addresses checkpatch.pl: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: use kernel preferred style for commentingAlison Schofield2015-10-251-63/+89
| | | | | | | | | | | Reworked comments per kernel coding style to improve readability. Corrects checkpatch.pl: WARNING: Block comments use * on subsequent lines WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8723au: Use put_unaligned_le32Shraddha Barke2015-10-251-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Introduce the use of function put_unaligned_le32. A simplified version of Coccinelle semantic patch used - @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le32(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8723au: add & use local variable to simplify referencesAlison Schofield2015-10-251-5/+6
| | | | | | | | | | Add local variable scanned_queue to rtw_createbss_cmd23a_callback() and use it (5x) to simplify references. Addresses checkpatch.pl WARNING: line over 80 characters Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>