Skip to content

Commit 1b89452

Browse files
ilanpeer2jmberg-intel
authored andcommitted
mac80211: handle HW ROC expired properly
In case of HW ROC, when the driver reports that the ROC expired, it is not sufficient to purge the ROCs based on the remaining time, as it possible that the device finished the ROC session before the actual requested duration. To handle such cases, in case of ROC expired notification from the driver, complete all the ROCs which are marked with hw_begun, regardless of the remaining duration. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 641cf2a commit 1b89452

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

net/mac80211/offchannel.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ static unsigned long ieee80211_end_finished_rocs(struct ieee80211_local *local,
224224
msecs_to_jiffies(roc->duration) -
225225
now;
226226

227-
if (roc->abort || remaining <= 0)
227+
/* In case of HW ROC, it is possible that the HW finished the
228+
* ROC session before the actual requested time. In such a case
229+
* end the ROC session (disregarding the remaining time).
230+
*/
231+
if (roc->abort || roc->hw_begun || remaining <= 0)
228232
ieee80211_roc_notify_destroy(roc);
229233
else
230234
remaining_dur_min = min(remaining_dur_min, remaining);

0 commit comments

Comments
 (0)