drv_can_neg_ttlm() returns enum ieee80211_neg_ttlm_res and initializes res to NEG_TTLM_RES_REJECT, but returns -EIO if !check_sdata_in_driver(sdata). In ieee80211_process_neg_ttlm_req(), any return value other than NEG_TTLM_RES_ACCEPT is passed to ieee80211_send_neg_ttlm_res(), where an out-of-range -EIO value hits 'default: WARN_ON(1); return;'. Return NEG_TTLM_RES_REJECT instead of -EIO when sdata is not in the driver. Found via Clang -Wimplicit-int-enum-cast on an x86_64 allyesconfig build. Verified by building net/mac80211/mlme.o with LLVM=1 W=1 (-Werror) and -Wimplicit-int-enum-cast; not runtime-tested on MLO hardware. Fixes: 8f500fbc6c65 ("wifi: mac80211: process and save negotiated TID to Link mapping request") Signed-off-by: Ian Rogers --- net/mac80211/driver-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 9aefa55cbdfd..0558ba58f3fc 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1740,7 +1740,7 @@ drv_can_neg_ttlm(struct ieee80211_local *local, might_sleep(); if (!check_sdata_in_driver(sdata)) - return -EIO; + return NEG_TTLM_RES_REJECT; trace_drv_can_neg_ttlm(local, sdata, neg_ttlm); if (local->ops->can_neg_ttlm) -- 2.56.1.708.g77570a6a1d-goog