diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-12 11:18:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-12 11:18:49 -0800 |
commit | 22ef12195e13c5ec58320dbf99ef85059a2c0820 (patch) | |
tree | 12f57c3a89d7784060b7a7665e1bf882a56376b2 /drivers/staging/rtl8192e | |
parent | 6dc69d3d0d18d587ab9d809fe060ba4417cf0279 (diff) | |
parent | fa783154524a71ab74e293cd8251155e5971952b (diff) | |
download | lwn-22ef12195e13c5ec58320dbf99ef85059a2c0820.tar.gz lwn-22ef12195e13c5ec58320dbf99ef85059a2c0820.zip |
Merge tag 'staging-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here's the big set of staging driver updates for 5.17-rc1
Nothing major in here at all, just lots and lots of tiny cleanups.
Overall more code was removed than added, which is always nice, but
not a huge change.
Majority of the work happened in the r8188eu driver, that had hundreds
of cleanups happen on it, but almost all other staging drivers had
cleanups as well. No new functionality was added, cleanups only.
All of these have been in linux-next for a while with no reported
problems"
* tag 'staging-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (308 commits)
staging: r8188eu: rename camelcase variable uintPeerChannel
staging: r8188eu: make BW20_24G_Diff a 1-D array
staging: r8188eu: make OFDM_24G_Diff a 1-D array
staging: r8188eu: BW40_24G_Diff is set but not used
staging: r8188eu: CCK_24G_Diff is set but not used
staging: r8188eu: make Index24G_BW40_Base a 1-D array
staging: r8188eu: make Index24G_CCK_Base a 1-D array
staging: r8188eu: rfPath is always 0
staging: r8188eu: remove unneeded parameter from rtl8188e_SetHalODMVar
staging: pi433: add comment to rx_lock mutex definition
staging: pi433: fix frequency deviation check
staging: vc04_services: rename BM2835 to BCM2835 in headers comments
staging: vc04_services: rename string literal containing bm2835_* to bcm2835*_
staging: vc04_services: rename variables containing bm2835_* to bcm2835_*
staging: vc04_services: rename functions containing bm2835_* to bcm2835_*
staging: vc04_services: rename structures bm2835_mmal_dev and bm2835_mmal_v4l2_ctrl
staging: greybus: audio: Check null pointer
staging: r8188eu: add spaces around P2P_AP_P2P_CH_SWITCH_PROCESS_WK
staging: r8188eu: turbo scan is always off for r8188eu
staging: r8188eu: cmd_issued_cnt is set but not used
...
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_module.c | 17 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 6 |
3 files changed, 17 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c6f8b772335c..c985e4ebc545 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1980,7 +1980,7 @@ void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn); void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee); void rtllib_start_ibss(struct rtllib_device *ieee); -void rtllib_softmac_init(struct rtllib_device *ieee); +int rtllib_softmac_init(struct rtllib_device *ieee); void rtllib_softmac_free(struct rtllib_device *ieee); void rtllib_disassociate(struct rtllib_device *ieee); void rtllib_stop_scan(struct rtllib_device *ieee); diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c index 64d9feee1f39..41697ef55dbd 100644 --- a/drivers/staging/rtl8192e/rtllib_module.c +++ b/drivers/staging/rtl8192e/rtllib_module.c @@ -88,7 +88,7 @@ struct net_device *alloc_rtllib(int sizeof_priv) err = rtllib_networks_allocate(ieee); if (err) { pr_err("Unable to allocate beacon storage: %d\n", err); - goto failed; + goto free_netdev; } rtllib_networks_initialize(ieee); @@ -121,11 +121,13 @@ struct net_device *alloc_rtllib(int sizeof_priv) ieee->hwsec_active = 0; memset(ieee->swcamtable, 0, sizeof(struct sw_cam_table) * 32); - rtllib_softmac_init(ieee); + err = rtllib_softmac_init(ieee); + if (err) + goto free_crypt_info; ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL); if (!ieee->pHTInfo) - return NULL; + goto free_softmac; HTUpdateDefaultSetting(ieee); HTInitializeHTInfo(ieee); @@ -141,8 +143,14 @@ struct net_device *alloc_rtllib(int sizeof_priv) return dev; - failed: +free_softmac: + rtllib_softmac_free(ieee); +free_crypt_info: + lib80211_crypt_info_free(&ieee->crypt_info); + rtllib_networks_free(ieee); +free_netdev: free_netdev(dev); + return NULL; } EXPORT_SYMBOL(alloc_rtllib); @@ -153,7 +161,6 @@ void free_rtllib(struct net_device *dev) netdev_priv_rsl(dev); kfree(ieee->pHTInfo); - ieee->pHTInfo = NULL; rtllib_softmac_free(ieee); lib80211_crypt_info_free(&ieee->crypt_info); diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index aabbea48223d..4b6c2295a3cf 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2952,7 +2952,7 @@ void rtllib_start_protocol(struct rtllib_device *ieee) } } -void rtllib_softmac_init(struct rtllib_device *ieee) +int rtllib_softmac_init(struct rtllib_device *ieee) { int i; @@ -2963,7 +2963,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee->seq_ctrl[i] = 0; ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC); if (!ieee->dot11d_info) - netdev_err(ieee->dev, "Can't alloc memory for DOT11D\n"); + return -ENOMEM; + ieee->LinkDetectInfo.SlotIndex = 0; ieee->LinkDetectInfo.SlotNum = 2; ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0; @@ -3029,6 +3030,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee) tasklet_setup(&ieee->ps_task, rtllib_sta_ps); + return 0; } void rtllib_softmac_free(struct rtllib_device *ieee) |