Skip to content

Commit

Permalink
acx-mac80211: fix scan API error that could lead to a crash
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Feb 24, 2017
1 parent f1336d2 commit bf53a83
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions package/kernel/acx-mac80211/patches/300-api_sync.patch
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,32 @@

adev->channel = channel;

--- a/merge.c
+++ b/merge.c
@@ -2776,7 +2776,10 @@ void acx_irq_work(struct work_struct *wo
/* HOST_INT_SCAN_COMPLETE */
if (irqmasked & HOST_INT_SCAN_COMPLETE) {
if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
- ieee80211_scan_completed(adev->hw, false);
+ struct cfg80211_scan_info info = {
+ .aborted = false
+ };
+ ieee80211_scan_completed(adev->hw, &info);
log(L_INIT, "scan completed\n");
clear_bit(ACX_FLAG_SCANNING, &adev->flags);
}
@@ -3138,10 +3141,13 @@ int acx_op_start(struct ieee80211_hw *hw

void acx_stop(acx_device_t *adev)
{
+ struct cfg80211_scan_info info = {
+ .aborted = true
+ };
acxmem_lock_flags;

if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
- ieee80211_scan_completed(adev->hw, true);
+ ieee80211_scan_completed(adev->hw, &info);
acx_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
clear_bit(ACX_FLAG_SCANNING, &adev->flags);
}

0 comments on commit bf53a83

Please sign in to comment.