aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-06-20Staging: r8188eu: core: rtw_xmit: Fixed some spelling errors in the commentsChang Yu1-5/+5
Fixed the spelling of "broadcast" and "update" in the comments. Signed-off-by: Chang Yu <marcus.yu.56@gmail.com> Link: https://lore.kernel.org/r/8d2f49631551b53ad970c9165cceb845c4d60b75.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20Staging: r8188eu: core: rtw_xmit: Fixed two indentation coding style issues.Chang Yu1-2/+2
Fixed two indentation issues. Signed-off-by: Chang Yu <marcus.yu.56@gmail.com> Link: https://lore.kernel.org/r/6b0e3efe83bf06ea60cdbe27f31f6f3aa1058f01.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20Staging: r8188eu: core: rtw_xmit: Fixed some whitespace coding style issuesChang Yu1-7/+2
Removed superfluous blank lines and added blank lines after variable declarations as per checkpath.pl Signed-off-by: Chang Yu <marcus.yu.56@gmail.com> Link: https://lore.kernel.org/r/841716cec5032ad706fbee8677e1b67aec8ad736.1655666628.git.marcus.yu.56@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: rtl8723bs: remove trailing whitespaceDaniel Watson1-1/+1
remove trailing whitespace found by checkpatch Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/20220620054529.4019-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: vchiq: provide testing instructionsStefan Wahren1-0/+82
This small document should to help kernel developer to test their changes on the VCHIQ driver. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/20220618090002.20663-1-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: sm750fb: fix CamelCase function parameterArne Petersen1-1/+1
Change function parameter in header file from powerMode to mode, now identical to c file function declaration. Issue found by checkpatch. Signed-off-by: Arne Petersen <petersenarne@yahoo.com> Link: https://lore.kernel.org/r/Yq2NufHtWbuXCjWE@ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: call rtw_IOL_append_WRF_cmd directlyDaniel Watson2-5/+3
Call rtw_IOL_append_WRF_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/4f26e0dd99e32738d7019ebcf680e7c73ed8ac8a.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: call rtw_IOL_append_WD_cmd directlyDaniel Watson2-5/+3
Call rtw_IOL_append_WD_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/005bbee3575555135be26be9b80a9ceb35d6069f.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: call rtw_IOL_append_WW_cmd directlyDaniel Watson2-5/+3
Call rtw_IOL_append_WW_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/ca53fca1d5557684a4f6430ecd88aef481238ada.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: call rtw_IOL_append_WB_cmd directlyDaniel Watson2-5/+3
Call rtw_IOL_append_WB_cmd directly, instead of using wrapper macro. Delete wrapper macro, which is not needed. Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/e0002dcce35e78a4c7308515f68e473cad2f290b.1655312169.git.ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: remove unused macrosNam Cao1-31/+0
Remove LE_BITS_TO_1BYTE and relevant macros because they are not used anywhere. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/a7f700c0688a16bb697fb693894f4c16594fd483.1655220367.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: replace confusing macrosNam Cao2-19/+6
The macro GET_TX_REPORT_TYPE1_RERTY_0 and similar macros are not obvious on what they are doing. Replace them with clearer codes. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/e697e47aad21362f68d148d2351e6d49f4fa9eaf.1655220367.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20staging: r8188eu: remove NULL check before vfreeDongliang Mu1-1/+1
vfree can handle NULL pointer as its argument. According to coccinelle isnullfree check, remove NULL check before vfree operation. Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Link: https://lore.kernel.org/r/20220614133239.147076-1-dzm91@hust.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-20Merge 5.19-rc3 into staging-nextGreg Kroah-Hartman4-19/+11
This resolves the merge issue with: drivers/staging/r8188eu/os_dep/ioctl_linux.c Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-12staging: rtl8723bs: uninitialize static variableDaniel Watson1-1/+1
ensure static variable is not initialized, per checkpatch Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/20220612030734.31469-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-12staging: r8188eu: replace FIELD_OFFSET with offsetofNam Cao3-6/+4
This driver defines FIELD_OFFSET which does the same as offsetof. Replace this macro with offsetof. Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/9443ef83f565eafe1e4f348412772d4ab966093a.1654994517.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10vme: move back to stagingArnd Bergmann9-1/+7799
The VME subsystem graduated from staging into a top-level subsystem in 2012, with commit db3b9e990e75 ("Staging: VME: move VME drivers out of staging") stating: The VME device drivers have not moved out yet due to some API questions they are still working through, that should happen soon, hopefully. However, this never happened: maintenance of drivers/vme effectively stopped in 2017, with all subsequent changes being treewide cleanups. No hardware driver remains in staging, only the limited user-level access, and I just removed one of the two bridge drivers and the only remaining board. drivers/staging/vme/devices/ was recently moved to drivers/staging/vme_user/, but as the vme_user driver is the only one remaining for this subsystem, it is easier to just move the remaining three source files into this directory rather than keeping the original hierarchy. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20220606084109.4108188-3-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: olpc_dcon: Replace flush_scheduled_work() with flush_work().Tetsuo Handa1-1/+1
Since "struct dcon_priv" is per a device struct, I assume that dcon_set_source_sync() needs to wait for only one work associated with that device. Therefore, wait for only that work using flush_work(). Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Link: https://lore.kernel.org/r/a973969d-cfd0-adc8-2651-d299199dbd7b@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: greybus: audio: replace safe list iterationJohan Hovold1-3/+2
No entry is being removed from the list when iterating the widget list in gbaudio_dapm_free_controls() so there's no need to use list_for_each_entry_safe(). Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20220610075347.18917-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read32Pavel Skripkin14-56/+202
rtw_read32() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read32() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/583c3d21c46066275e4fc8da5ba4fd0e3679335b.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read16Pavel Skripkin7-21/+73
rtw_read16() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read16() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/06b45afda048d0aeddeed983c2318680fe6265f5.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read8Pavel Skripkin16-102/+418
rtw_read8() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read8() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/c8f8ef4f14db3ba2478a87d5be6eb768a093dfaf.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: rtl8723bs: Allocate full pwep structureKees Cook1-2/+4
The pwep allocation was always being allocated smaller than the true structure size. Avoid this by always allocating the full structure. Found with GCC 12 and -Warray-bounds: ../drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function 'rtw_set_encryption': ../drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:591:29: warning: array subscript 'struct ndis_802_11_wep[0]' is partly outside array bounds of 'void[25]' [-Warray-bounds] 591 | pwep->length = wep_total_len; | ^~ Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220608215512.1070847-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: olpc_dcon: mark driver as brokenJavier Martinez Canillas1-1/+1
The commit eecb3e4e5d9d ("staging: olpc_dcon: add OLPC display controller (DCON) support") added this driver in 2010, and has been in staging since then. It was marked as broken at some point because it didn't even build but that got removed once the build issues were addressed. But it seems that the work to move this driver out of staging has stalled, the last non-trivial change to fix one of the items mentioned in its todo file was commit e40219d5e4b2 ("staging: olpc_dcon: allow simultaneous XO-1 and XO-1.5 support") in 2019. And even if work to destage the driver is resumed, the fbdev subsystem has been deprecated for a long time and instead it should be ported to DRM. Now this driver is preventing to land a kernel wide change, that makes the num_registered_fb symbol to be private to the fbmem.c file. So let's just mark the driver as broken. Someone can then work on making it not depend on the num_registered_fb symbol, allowing to drop the broken dependency again. Suggested-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20220609223424.907174-1-javierm@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: qlge: qlge_main.c: rewrite do-while loops into more compact for loopsSrivathsan Sivakumar1-14/+10
simplify do-while loops into for loops Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Srivathsan Sivakumar <sri.skumar05@gmail.com> Link: https://lore.kernel.org/r/YqJcLwUQorZQOrkd@Sassy Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: ftbft: Use backlight helperStephen Kitt2-4/+2
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of manually checking the power state in struct backlight_properties, use backlight_is_blank(). Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Noralf Trønnes" <noralf@tronnes.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Len Baker <len.baker@gmx.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220607185516.1129900-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: Add blank line after declarationsRommel Rodriguez Perez1-0/+1
This patch adds a blank line after the variable declarations, it should remove a checkpatch.pl warning and improve readability. checkpatch output: WARNING: Missing a blank line after declarations Signed-off-by: Rommel Rodriguez Perez <alrodperez@gmail.com> Link: https://lore.kernel.org/r/YqALs/7VkGsYUngw@debianmain.debian.pc.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: olpc_dcon: Use backlight helperStephen Kitt1-4/+1
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Cc: Jens Frederich <jfrederich@gmail.com> Cc: Jon Nettleton <jon.nettleton@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220607190049.1132154-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-07staging: r8188eu: remove HW_VAR_SLOT_TIME from SetHwReg8188EU()Michael Straube3-26/+25
In order to get rid of the function SetHwReg8188EU() remove the HW_VAR_SLOT_TIME case from that function and move the functionality into a static function in rtw_wlan_util.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220606064055.12565-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-07staging: greybus: loopback: fix a spelling error.Steve Lemuel1-1/+1
asynchronus -> asynchronous Signed-off-by: Steve Lemuel <wlemuel@hotmail.com> Link: https://lore.kernel.org/r/SYBP282MB347864E247D2EC70BF46F9A3A0A29@SYBP282MB3478.AUSP282.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-07staging: r8188eu: fix declaration to match 'foo *bar'Daniel Watson1-1/+1
put '*' next to variable to match kernel style from checkpatch Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/20220607061113.32633-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: Fix warning of array overflow in ioctl_linux.cLarry Finger1-1/+1
Building with -Warray-bounds results in the following warning plus others related to the same problem: CC [M] drivers/staging/r8188eu/os_dep/ioctl_linux.o In function ‘wpa_set_encryption’, inlined from ‘rtw_wx_set_enc_ext’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:1868:9: drivers/staging/r8188eu/os_dep/ioctl_linux.c:412:41: warning: array subscript ‘struct ndis_802_11_wep[0]’ is partly outside array bounds of ‘void[25]’ [-Warray-bounds] 412 | pwep->KeyLength = wep_key_len; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from drivers/staging/r8188eu/os_dep/../include/osdep_service.h:19, from drivers/staging/r8188eu/os_dep/ioctl_linux.c:4: In function ‘kmalloc’, inlined from ‘kzalloc’ at ./include/linux/slab.h:733:9, inlined from ‘wpa_set_encryption’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:408:11, inlined from ‘rtw_wx_set_enc_ext’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:1868:9: ./include/linux/slab.h:605:16: note: object of size [17, 25] allocated by ‘__kmalloc’ 605 | return __kmalloc(size, flags); | ^~~~~~~~~~~~~~~~~~~~~~ ./include/linux/slab.h:600:24: note: object of size [17, 25] allocated by ‘kmem_cache_alloc_trace’ 600 | return kmem_cache_alloc_trace( | ^~~~~~~~~~~~~~~~~~~~~~~ 601 | kmalloc_caches[kmalloc_type(flags)][index], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 602 | flags, size); | ~~~~~~~~~~~~ Although it is unlikely that anyone is still using WEP encryption, the size of the allocation needs to be increased just in case. Fixes commit 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Phillip Potter <phil@philpotter.co.uk> Cc: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220531013103.2175-3-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: fix rtw_alloc_hwxmits error detection for nowPhillip Potter1-15/+5
In _rtw_init_xmit_priv, we use the res variable to store the error return from the newly converted rtw_alloc_hwxmits function. Sadly, the calling function interprets res using _SUCCESS and _FAIL still, meaning we change the semantics of the variable, even in the success case. This leads to the following on boot: r8188eu 1-2:1.0: _rtw_init_xmit_priv failed In the long term, we should reverse these semantics, but for now, this fixes the driver. Also, inside rtw_alloc_hwxmits remove the if blocks, as HWXMIT_ENTRY is always 4. Fixes: f94b47c6bde6 ("staging: r8188eu: add check for kzalloc") Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220521204741.921-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use u8, u16 in issue_action_BA prototypeMartin Kaiser2-3/+2
Use u8 and u16 in the issue_action_BA prototype. The code expects these parameters to be exactly 8 and 16 bits wide. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: remove the pframe variableMartin Kaiser1-3/+1
Remove the pframe variable, it is no longer used for populating fields of the outgoing frame. pmgntframe->buf_addr is already a u8 *, we can drop the (u8 *) cast. Increment the u8 *pmgntframe->buf_addr by TXDESC_OFFSET before we cast it to struct ieee80211_mgmt *. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: calculate the delba lengthMartin Kaiser1-6/+1
Use offsetofend to calculate the length of the delba message. We are now calculating all message lengths based on the offset of their last field. All intermediate updates of pattrib->pktlen can be removed. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: clarify the contents of the delba paramsMartin Kaiser1-1/+4
The delba parameters field contains an initiator/receiver flag and the tid. The caller of issue_action_BA passes these components in the status parameter. Extract the two components from status and use u16_encode_bits to copy them into the parameters field. This should clarify what's going on and should make it easier to replace the status parameter in the future. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use mgmt to set delba paramsMartin Kaiser1-7/+2
Use the mgmt struct to set the delba parameters. Use the exact same value for the parameters as the current code. Remove a dead increment of pframe, we don't use pframe for the delba message any more. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use mgmt to set the delba reason codeMartin Kaiser1-4/+2
Use the mgmt struct to set the delba reason code. Replace the numeric value with a define and remove the temporary variable. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: calculate the addba response lengthMartin Kaiser1-5/+1
An addba response always ends with the timeout field. The length of the addba response is the offset of the end of the timeout field in the struct ieee80211_mgmt that defines the message. Use offsetofend to calculate this offset and drop the intermediate pktlen increments as we add addba response components. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use ieee80211 to set addba resp capabilitiesMartin Kaiser1-10/+5
Use the mgmt structure and defines from ieee80211.h to set the capabilities field of an addba response. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use mgmt to set the addba resp timeoutMartin Kaiser1-1/+2
Use the mgmt struct to set the addba response timeout. Copy the timeout from the saved addba request. The timeout field is already le16, we don't have to convert the endianness. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use mgmt to set the addba resp statusMartin Kaiser1-1/+2
Use the mgmt struct to set the addba response status. The caller passes the status code in host endianness, we have to convert it to little endian. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use mgmt to set resp dialog tokenMartin Kaiser1-1/+2
Use the mgmt structure to set the dialog token of an addba response. Tested-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220602193726.280922-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: greybus: audio: fix loop cursor use after iterationJared Kangas1-6/+7
gbaudio_dapm_free_controls() iterates over widgets using list_for_each_entry_safe(), which leaves the loop cursor pointing to a meaningless structure if it completes a traversal of the list. The cursor was set to NULL at the end of the loop body, but would be overwritten by the final loop cursor update. Because of this behavior, the widget could be non-null after the loop even if the widget wasn't found, and the cleanup logic would treat the pointer as a valid widget to free. To fix this, introduce a temporary variable to act as the loop cursor and copy it to a variable that can be accessed after the loop finishes. This was detected with the help of Coccinelle. Signed-off-by: Jared Kangas <kangas.jd@gmail.com> Link: https://lore.kernel.org/r/20220605231806.720085-1-kangas.jd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: Drop redundant memset overwritten by memcpyHaowen Bai2-3/+0
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1654084164-10869-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: fix the declaration of process_pwrbit_dataMartin Kaiser1-2/+1
Fix the declaration of process_pwrbit_data. Make the function static and remove its prototype. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20220602194807.281115-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: r8188eu: use ieee80211 defines for back action codesMartin Kaiser2-10/+3
Replace the driver-specific defines for back action codes with the defines from ieee80211.h. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20220602194807.281115-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: remove global 'vchiq_states' arrayAdrien Thierry2-10/+0
Remove global 'vchiq_states' array, which is not used anymore. This is part of an effort to address TODO item "Get rid of all non essential global structures and create a proper per device structure" Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-10-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06staging: vchiq_arm: use state from vchiq instanceAdrien Thierry2-11/+8
In 'handle_to_service', access the vchiq state from the vchiq instance instead of the global 'vchiq_states' array. This will allow getting rid of the global 'vchiq_states' array. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220518191126.60396-9-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>