linux_dsm_epyc7002/drivers/net/wireless
Daniel Wagner 78a9e17038 carl9170: Fix wrong completion usage
carl9170_usb_stop() is used from several places to flush and cleanup any
pending work. The normal pattern is to send a request and wait for the
irq handler to call complete(). The completion is not reinitialized
during normal operation and as the old comment indicates it is important
to keep calls to wait_for_completion_timeout() and complete() balanced.

Calling complete_all() brings this equilibirum out of balance and needs
to be fixed by a reinit_completion(). But that opens a small race
window. It is possible that the sequence of complete_all(),
reinit_completion() is faster than the wait_for_completion_timeout() can
do its work. The wake up is not lost but the done counter test is after
reinit_completion() has been executed. The only reason we don't see
carl9170_exec_cmd() hang forever is we use the timeout version of
wait_for_copletion().

Let's fix this by reinitializing the completion (that is just setting
done counter to 0) just before we send out an request. Now,
carl9170_usb_stop() can be sure a complete() call is enough to make
progess since there is only one waiter at max. This is a common pattern
also seen in various drivers which use completion.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-09-09 15:15:28 +03:00
..
admtek
ath carl9170: Fix wrong completion usage 2016-09-09 15:15:28 +03:00
atmel
broadcom net: wireless: broadcom: brcm80211: brcmfmac: usb: don't print error when allocating urb fails 2016-08-13 14:53:40 -07:00
cisco
intel * bump firmware version to load newer firmwares 2016-07-18 22:46:28 +03:00
intersil net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails 2016-08-13 14:53:41 -07:00
marvell net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails 2016-08-13 14:53:41 -07:00
mediatek
ralink
realtek net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails 2016-08-13 14:53:41 -07:00
rsi
st
ti mac80211: Add ieee80211_hw pointer to get_expected_throughput 2016-08-05 14:23:25 +02:00
zydas
Kconfig
mac80211_hwsim.c
mac80211_hwsim.h
Makefile
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
wl3501_cs.c
wl3501.h