[bug report] wcn36xx: Add hardware scan offload support
Dan Carpenter
dan.carpenter at oracle.com
Thu Apr 5 03:53:44 PDT 2018
Hello Loic Poulain,
The patch 2f3bef4b247e: "wcn36xx: Add hardware scan offload support"
from Dec 8, 2017, leads to the following static checker warning:
drivers/net/wireless/ath/wcn36xx/smd.c:2144 wcn36xx_smd_hw_scan_ind()
warn: missing break? reassigning 'scan_info.aborted'
drivers/net/wireless/ath/wcn36xx/smd.c
2125 static int wcn36xx_smd_hw_scan_ind(struct wcn36xx *wcn, void *buf, size_t len)
2126 {
2127 struct wcn36xx_hal_scan_offload_ind *rsp = buf;
2128 struct cfg80211_scan_info scan_info = {};
2129
2130 if (len != sizeof(*rsp)) {
2131 wcn36xx_warn("Corrupted delete scan indication\n");
2132 return -EIO;
2133 }
2134
2135 wcn36xx_dbg(WCN36XX_DBG_HAL, "scan indication (type %x)", rsp->type);
2136
2137 switch (rsp->type) {
2138 case WCN36XX_HAL_SCAN_IND_FAILED:
2139 scan_info.aborted = true;
This is a Smatch warning, but I think the latest GCC will complain about
this as well and say we need a /* fall through */ comment here. I'm not
positive the exact format.
2140 case WCN36XX_HAL_SCAN_IND_COMPLETED:
2141 mutex_lock(&wcn->scan_lock);
2142 wcn->scan_req = NULL;
2143 if (wcn->scan_aborted)
2144 scan_info.aborted = true;
2145 mutex_unlock(&wcn->scan_lock);
2146 ieee80211_scan_completed(wcn->hw, &scan_info);
2147 break;
2148 case WCN36XX_HAL_SCAN_IND_STARTED:
2149 case WCN36XX_HAL_SCAN_IND_FOREIGN_CHANNEL:
2150 case WCN36XX_HAL_SCAN_IND_DEQUEUED:
2151 case WCN36XX_HAL_SCAN_IND_PREEMPTED:
2152 case WCN36XX_HAL_SCAN_IND_RESTARTED:
2153 break;
2154 default:
2155 wcn36xx_warn("Unknown scan indication type %x\n", rsp->type);
2156 }
2157
2158 return 0;
2159 }
regards,
dan carpenter
More information about the wcn36xx
mailing list