On Thu, 2020-05-14 at 16:54 +0800, Liangwei Dong wrote: > Start Autonomous p2p GO on DFS channel and then trigger remote > p2p peer to connect to p2p GO. P2P remote device will send > P2P provision discovery request action frame to P2P GO on GO's > home channel - DFS. But when P2P GO sends Provision discovery > response action frame to P2P remote, Kernel rejects the mgmt > frame sending since Kernel doesn't allow "offchan" tx mgmt when > AP interface is active on DFS channel. > > Fix by allow "offchan" tx mgmt if the requested channel is same > or compatible with AP's home channel. Maybe we should just fix that in userland? > wdev_lock(wdev); > - if (params.offchan && !cfg80211_off_channel_oper_allowed(wdev)) { > - wdev_unlock(wdev); > - return -EBUSY; > + if (params.offchan && > + !cfg80211_off_channel_oper_allowed(wdev) && > + !cfg80211_chandef_identical(&wdev->chandef, &chandef)) { > + compat_chandef = cfg80211_chandef_compatible(&wdev->chandef, > + &chandef); > + if (compat_chandef != &chandef) { > + wdev_unlock(wdev); > + return -EBUSY; > + } We'll surely have a 20 MHz channel as "chandef", so there's not much point in checking the compat_chandef for == &chandef, but rather if compat_chandef is non-NULL we're fine? Also, chandef_compatible() already checks for identical, so no need to do that here before. johannes