.tx                     = wfx_tx,
        .conf_tx                = wfx_conf_tx,
        .hw_scan                = wfx_hw_scan,
+       .cancel_hw_scan         = wfx_cancel_hw_scan,
        .sta_add                = wfx_sta_add,
        .sta_remove             = wfx_sta_remove,
        .sta_notify             = wfx_sta_notify,
 
                        break;
        }
        wfx_tx_lock_flush(wvif->wdev);
+       wvif->scan_abort = false;
        reinit_completion(&wvif->scan_complete);
        ret = hif_scan(wvif, req, start_idx, i - start_idx);
        if (ret < 0)
                hif_stop_scan(wvif);
                return -ETIMEDOUT;
        }
+       if (wvif->scan_abort) {
+               dev_notice(wvif->wdev->dev, "scan abort\n");
+               return -ECONNABORTED;
+       }
        return i - start_idx;
 }
 
        return 0;
 }
 
+void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+{
+       struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
+
+       wvif->scan_abort = true;
+       hif_stop_scan(wvif);
+}
+
 void wfx_scan_complete(struct wfx_vif *wvif,
                       const struct hif_ind_scan_cmpl *arg)
 {
 
 void wfx_hw_scan_work(struct work_struct *work);
 int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                struct ieee80211_scan_request *req);
+void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 void wfx_scan_complete(struct wfx_vif *wvif,
                       const struct hif_ind_scan_cmpl *ind);
 
 
        struct mutex            scan_lock;
        struct work_struct      scan_work;
        struct completion       scan_complete;
+       bool                    scan_abort;
        struct ieee80211_scan_request *scan_req;
 
        struct completion       set_pm_mode_complete;