diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2023-04-09 18:26:43 -0700 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2023-04-09 18:26:43 -0700 |
commit | af855face2584e1695d4c9e2d42f8ccb7d1cc724 (patch) | |
tree | 6a13d726a3a983cb0ac55c465c3516a3bef2c07e | |
parent | 2103b5afedd5b047a61a3625fdb6b312d97d0819 (diff) | |
parent | 0beaa9090d4ffbd9b6ed2bcef02167076bd110b3 (diff) | |
download | uwb-af855face2584e1695d4c9e2d42f8ccb7d1cc724.tar.gz |
Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udcandroid-u-beta-2_r0.4android-u-beta-2_r0.3android-u-beta-2_r0.2
SBMerger: 516612970
Change-Id: Ifb36642f6c384204717b5f8fda30eeb4dbeaf828
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | mac/ops.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -24,10 +24,13 @@ #include <linux/module.h> #include <linux/errno.h> #include <net/rtnetlink.h> +#include <linux/jiffies.h> #include "mcps802154_i.h" #include "llhw-ops.h" +#define DW3000_MAX_STOP_WAIT 10000 + static int mcps802154_start(struct ieee802154_hw *hw) { struct mcps802154_local *local = hw->priv; @@ -55,6 +58,7 @@ static int mcps802154_start(struct ieee802154_hw *hw) static void mcps802154_stop(struct ieee802154_hw *hw) { struct mcps802154_local *local = hw->priv; + int rc; ASSERT_RTNL(); WARN_ON(!local->started); @@ -63,7 +67,9 @@ static void mcps802154_stop(struct ieee802154_hw *hw) mcps802154_ca_stop(local); mutex_unlock(&local->fsm_lock); - wait_event(local->wq, !local->started); + rc = wait_event_timeout(local->wq, !local->started, msecs_to_jiffies(DW3000_MAX_STOP_WAIT)); + if (!rc) + pr_err("%s timeout elapsed, event !local->started = false\n", __func__); } static int mcps802154_xmit_async(struct ieee802154_hw *hw, struct sk_buff *skb) |