Commit 3b9ccd3b authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info()

Fix 'line over 80 character' issues found by checkpatch.pl script by
use of temporary variable and avoided leading tab.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 87ae3a5b
...@@ -1267,51 +1267,51 @@ static s32 handle_rcvd_ntwrk_info(struct wilc_vif *vif, ...@@ -1267,51 +1267,51 @@ static s32 handle_rcvd_ntwrk_info(struct wilc_vif *vif,
struct network_info *info = NULL; struct network_info *info = NULL;
void *params = NULL; void *params = NULL;
struct host_if_drv *hif_drv = vif->hif_drv; struct host_if_drv *hif_drv = vif->hif_drv;
struct user_scan_req *scan_req = &hif_drv->usr_scan_req;
found = true; found = true;
if (hif_drv->usr_scan_req.scan_result) { if (!scan_req->scan_result)
wilc_parse_network_info(rcvd_info->buffer, &info); goto done;
if (!info || !hif_drv->usr_scan_req.scan_result) {
netdev_err(vif->ndev, "driver is null\n");
result = -EINVAL;
goto done;
}
for (i = 0; i < hif_drv->usr_scan_req.rcvd_ch_cnt; i++) { wilc_parse_network_info(rcvd_info->buffer, &info);
if (memcmp(hif_drv->usr_scan_req.net_info[i].bssid, if (!info || !scan_req->scan_result) {
info->bssid, 6) == 0) { netdev_err(vif->ndev, "driver is null\n");
if (info->rssi <= hif_drv->usr_scan_req.net_info[i].rssi) { result = -EINVAL;
goto done; goto done;
} else { }
hif_drv->usr_scan_req.net_info[i].rssi = info->rssi;
found = false; for (i = 0; i < scan_req->rcvd_ch_cnt; i++) {
break; if (memcmp(scan_req->net_info[i].bssid, info->bssid, 6) == 0) {
} if (info->rssi <= scan_req->net_info[i].rssi) {
goto done;
} else {
scan_req->net_info[i].rssi = info->rssi;
found = false;
break;
} }
} }
}
if (found) { if (found) {
if (hif_drv->usr_scan_req.rcvd_ch_cnt < MAX_NUM_SCANNED_NETWORKS) { if (scan_req->rcvd_ch_cnt < MAX_NUM_SCANNED_NETWORKS) {
hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].rssi = info->rssi; scan_req->net_info[scan_req->rcvd_ch_cnt].rssi = info->rssi;
memcpy(hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].bssid, memcpy(scan_req->net_info[scan_req->rcvd_ch_cnt].bssid,
info->bssid, 6); info->bssid, 6);
hif_drv->usr_scan_req.rcvd_ch_cnt++; scan_req->rcvd_ch_cnt++;
info->new_network = true; info->new_network = true;
params = host_int_parse_join_bss_param(info); params = host_int_parse_join_bss_param(info);
hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, info, scan_req->scan_result(SCAN_EVENT_NETWORK_FOUND, info,
hif_drv->usr_scan_req.arg, scan_req->arg, params);
params);
}
} else {
info->new_network = false;
hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, info,
hif_drv->usr_scan_req.arg, NULL);
} }
} else {
info->new_network = false;
scan_req->scan_result(SCAN_EVENT_NETWORK_FOUND, info,
scan_req->arg, NULL);
} }
done: done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment