Commit 4e8a008e authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: remove WL_SCAN() macro

Get rid of WL_SCAN(...) macro in favor of brcmf_dbg(SCAN,...)
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d96b801f
...@@ -539,19 +539,20 @@ static void brcmf_escan_prep(struct brcmf_scan_params_le *params_le, ...@@ -539,19 +539,20 @@ static void brcmf_escan_prep(struct brcmf_scan_params_le *params_le,
n_ssids = request->n_ssids; n_ssids = request->n_ssids;
n_channels = request->n_channels; n_channels = request->n_channels;
/* Copy channel array if applicable */ /* Copy channel array if applicable */
WL_SCAN("### List of channelspecs to scan ### %d\n", n_channels); brcmf_dbg(SCAN, "### List of channelspecs to scan ### %d\n",
n_channels);
if (n_channels > 0) { if (n_channels > 0) {
for (i = 0; i < n_channels; i++) { for (i = 0; i < n_channels; i++) {
chanspec = channel_to_chanspec(request->channels[i]); chanspec = channel_to_chanspec(request->channels[i]);
WL_SCAN("Chan : %d, Channel spec: %x\n", brcmf_dbg(SCAN, "Chan : %d, Channel spec: %x\n",
request->channels[i]->hw_value, chanspec); request->channels[i]->hw_value, chanspec);
params_le->channel_list[i] = cpu_to_le16(chanspec); params_le->channel_list[i] = cpu_to_le16(chanspec);
} }
} else { } else {
WL_SCAN("Scanning all channels\n"); brcmf_dbg(SCAN, "Scanning all channels\n");
} }
/* Copy ssid array if applicable */ /* Copy ssid array if applicable */
WL_SCAN("### List of SSIDs to scan ### %d\n", n_ssids); brcmf_dbg(SCAN, "### List of SSIDs to scan ### %d\n", n_ssids);
if (n_ssids > 0) { if (n_ssids > 0) {
offset = offsetof(struct brcmf_scan_params_le, channel_list) + offset = offsetof(struct brcmf_scan_params_le, channel_list) +
n_channels * sizeof(u16); n_channels * sizeof(u16);
...@@ -564,17 +565,18 @@ static void brcmf_escan_prep(struct brcmf_scan_params_le *params_le, ...@@ -564,17 +565,18 @@ static void brcmf_escan_prep(struct brcmf_scan_params_le *params_le,
memcpy(ssid_le.SSID, request->ssids[i].ssid, memcpy(ssid_le.SSID, request->ssids[i].ssid,
request->ssids[i].ssid_len); request->ssids[i].ssid_len);
if (!ssid_le.SSID_len) if (!ssid_le.SSID_len)
WL_SCAN("%d: Broadcast scan\n", i); brcmf_dbg(SCAN, "%d: Broadcast scan\n", i);
else else
WL_SCAN("%d: scan for %s size =%d\n", i, brcmf_dbg(SCAN, "%d: scan for %s size =%d\n",
ssid_le.SSID, ssid_le.SSID_len); i, ssid_le.SSID, ssid_le.SSID_len);
memcpy(ptr, &ssid_le, sizeof(ssid_le)); memcpy(ptr, &ssid_le, sizeof(ssid_le));
ptr += sizeof(ssid_le); ptr += sizeof(ssid_le);
} }
} else { } else {
WL_SCAN("Broadcast scan %p\n", request->ssids); brcmf_dbg(SCAN, "Broadcast scan %p\n", request->ssids);
if ((request->ssids) && request->ssids->ssid_len) { if ((request->ssids) && request->ssids->ssid_len) {
WL_SCAN("SSID %s len=%d\n", params_le->ssid_le.SSID, brcmf_dbg(SCAN, "SSID %s len=%d\n",
params_le->ssid_le.SSID,
request->ssids->ssid_len); request->ssids->ssid_len);
params_le->ssid_le.SSID_len = params_le->ssid_le.SSID_len =
cpu_to_le32(request->ssids->ssid_len); cpu_to_le32(request->ssids->ssid_len);
...@@ -597,7 +599,7 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, ...@@ -597,7 +599,7 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
struct cfg80211_scan_request *scan_request; struct cfg80211_scan_request *scan_request;
s32 err = 0; s32 err = 0;
WL_SCAN("Enter\n"); brcmf_dbg(SCAN, "Enter\n");
/* clear scan request, because the FW abort can cause a second call */ /* clear scan request, because the FW abort can cause a second call */
/* to this functon and might cause a double cfg80211_scan_done */ /* to this functon and might cause a double cfg80211_scan_done */
...@@ -609,7 +611,7 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, ...@@ -609,7 +611,7 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
if (fw_abort) { if (fw_abort) {
/* Do a scan abort to stop the driver's scan engine */ /* Do a scan abort to stop the driver's scan engine */
WL_SCAN("ABORT scan in firmware\n"); brcmf_dbg(SCAN, "ABORT scan in firmware\n");
memset(&params_le, 0, sizeof(params_le)); memset(&params_le, 0, sizeof(params_le));
memset(params_le.bssid, 0xFF, ETH_ALEN); memset(params_le.bssid, 0xFF, ETH_ALEN);
params_le.bss_type = DOT11_BSSTYPE_ANY; params_le.bss_type = DOT11_BSSTYPE_ANY;
...@@ -632,13 +634,13 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, ...@@ -632,13 +634,13 @@ brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
* which takes precedence. * which takes precedence.
*/ */
if (cfg->sched_escan) { if (cfg->sched_escan) {
WL_SCAN("scheduled scan completed\n"); brcmf_dbg(SCAN, "scheduled scan completed\n");
cfg->sched_escan = false; cfg->sched_escan = false;
if (!aborted) if (!aborted)
cfg80211_sched_scan_results(cfg_to_wiphy(cfg)); cfg80211_sched_scan_results(cfg_to_wiphy(cfg));
brcmf_set_mpc(ndev, 1); brcmf_set_mpc(ndev, 1);
} else if (scan_request) { } else if (scan_request) {
WL_SCAN("ESCAN Completed scan: %s\n", brcmf_dbg(SCAN, "ESCAN Completed scan: %s\n",
aborted ? "Aborted" : "Done"); aborted ? "Aborted" : "Done");
cfg80211_scan_done(scan_request, aborted); cfg80211_scan_done(scan_request, aborted);
brcmf_set_mpc(ndev, 1); brcmf_set_mpc(ndev, 1);
...@@ -660,7 +662,7 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct net_device *ndev, ...@@ -660,7 +662,7 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct net_device *ndev,
struct brcmf_escan_params_le *params; struct brcmf_escan_params_le *params;
s32 err = 0; s32 err = 0;
WL_SCAN("E-SCAN START\n"); brcmf_dbg(SCAN, "E-SCAN START\n");
if (request != NULL) { if (request != NULL) {
/* Allocate space for populating ssids in struct */ /* Allocate space for populating ssids in struct */
...@@ -703,7 +705,7 @@ brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy, ...@@ -703,7 +705,7 @@ brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy,
u32 passive_scan; u32 passive_scan;
struct brcmf_scan_results *results; struct brcmf_scan_results *results;
WL_SCAN("Enter\n"); brcmf_dbg(SCAN, "Enter\n");
cfg->escan_info.ndev = ndev; cfg->escan_info.ndev = ndev;
cfg->escan_info.wiphy = wiphy; cfg->escan_info.wiphy = wiphy;
cfg->escan_info.escan_state = WL_ESCAN_STATE_SCANNING; cfg->escan_info.escan_state = WL_ESCAN_STATE_SCANNING;
...@@ -741,7 +743,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -741,7 +743,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev,
s32 err; s32 err;
u32 SSID_len; u32 SSID_len;
WL_SCAN("START ESCAN\n"); brcmf_dbg(SCAN, "START ESCAN\n");
if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) { if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status); brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status);
...@@ -779,7 +781,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -779,7 +781,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev,
if (err) if (err)
goto scan_out; goto scan_out;
} else { } else {
WL_SCAN("ssid \"%s\", ssid_len (%d)\n", brcmf_dbg(SCAN, "ssid \"%s\", ssid_len (%d)\n",
ssids->ssid, ssids->ssid_len); ssids->ssid, ssids->ssid_len);
memset(&sr->ssid_le, 0, sizeof(sr->ssid_le)); memset(&sr->ssid_le, 0, sizeof(sr->ssid_le));
SSID_len = min_t(u8, sizeof(sr->ssid_le.SSID), ssids->ssid_len); SSID_len = min_t(u8, sizeof(sr->ssid_le.SSID), ssids->ssid_len);
...@@ -790,7 +792,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -790,7 +792,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev,
sr->ssid_le.SSID_len = cpu_to_le32(SSID_len); sr->ssid_le.SSID_len = cpu_to_le32(SSID_len);
spec_scan = true; spec_scan = true;
} else } else
WL_SCAN("Broadcast scan\n"); brcmf_dbg(SCAN, "Broadcast scan\n");
passive_scan = cfg->active_scan ? 0 : 1; passive_scan = cfg->active_scan ? 0 : 1;
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PASSIVE_SCAN, err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PASSIVE_SCAN,
...@@ -2150,7 +2152,7 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg) ...@@ -2150,7 +2152,7 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
bss_list->version); bss_list->version);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
WL_SCAN("scanned AP count (%d)\n", bss_list->count); brcmf_dbg(SCAN, "scanned AP count (%d)\n", bss_list->count);
for (i = 0; i < bss_list->count; i++) { for (i = 0; i < bss_list->count; i++) {
bi = next_bss_le(bss_list, bi); bi = next_bss_le(bss_list, bi);
err = brcmf_inform_single_bss(cfg, bi); err = brcmf_inform_single_bss(cfg, bi);
...@@ -2462,14 +2464,14 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, ...@@ -2462,14 +2464,14 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
} }
if (status == BRCMF_E_STATUS_PARTIAL) { if (status == BRCMF_E_STATUS_PARTIAL) {
WL_SCAN("ESCAN Partial result\n"); brcmf_dbg(SCAN, "ESCAN Partial result\n");
escan_result_le = (struct brcmf_escan_result_le *) data; escan_result_le = (struct brcmf_escan_result_le *) data;
if (!escan_result_le) { if (!escan_result_le) {
brcmf_err("Invalid escan result (NULL pointer)\n"); brcmf_err("Invalid escan result (NULL pointer)\n");
goto exit; goto exit;
} }
if (!cfg->scan_request) { if (!cfg->scan_request) {
WL_SCAN("result without cfg80211 request\n"); brcmf_dbg(SCAN, "result without cfg80211 request\n");
goto exit; goto exit;
} }
...@@ -2770,10 +2772,10 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, ...@@ -2770,10 +2772,10 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
u32 result_count; u32 result_count;
u32 status; u32 status;
WL_SCAN("Enter\n"); brcmf_dbg(SCAN, "Enter\n");
if (e->event_code == BRCMF_E_PFN_NET_LOST) { if (e->event_code == BRCMF_E_PFN_NET_LOST) {
WL_SCAN("PFN NET LOST event. Do Nothing\n"); brcmf_dbg(SCAN, "PFN NET LOST event. Do Nothing\n");
return 0; return 0;
} }
...@@ -2786,7 +2788,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, ...@@ -2786,7 +2788,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
* multiple NET_FOUND events. For now place a warning here. * multiple NET_FOUND events. For now place a warning here.
*/ */
WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE); WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
WL_SCAN("PFN NET FOUND event. count: %d\n", result_count); brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
if (result_count > 0) { if (result_count > 0) {
int i; int i;
...@@ -2811,7 +2813,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, ...@@ -2811,7 +2813,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
goto out_err; goto out_err;
} }
WL_SCAN("SSID:%s Channel:%d\n", brcmf_dbg(SCAN, "SSID:%s Channel:%d\n",
netinfo->SSID, netinfo->channel); netinfo->SSID, netinfo->channel);
memcpy(ssid[i].ssid, netinfo->SSID, netinfo->SSID_len); memcpy(ssid[i].ssid, netinfo->SSID, netinfo->SSID_len);
ssid[i].ssid_len = netinfo->SSID_len; ssid[i].ssid_len = netinfo->SSID_len;
...@@ -2913,7 +2915,7 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy, ...@@ -2913,7 +2915,7 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
int i; int i;
int ret = 0; int ret = 0;
WL_SCAN("Enter n_match_sets:%d n_ssids:%d\n", brcmf_dbg(SCAN, "Enter n_match_sets:%d n_ssids:%d\n",
request->n_match_sets, request->n_ssids); request->n_match_sets, request->n_ssids);
if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) { if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status); brcmf_err("Scanning already: status (%lu)\n", cfg->scan_status);
...@@ -2929,7 +2931,7 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy, ...@@ -2929,7 +2931,7 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
if (request->n_ssids > 0) { if (request->n_ssids > 0) {
for (i = 0; i < request->n_ssids; i++) { for (i = 0; i < request->n_ssids; i++) {
/* Active scan req for ssids */ /* Active scan req for ssids */
WL_SCAN(">>> Active scan req for ssid (%s)\n", brcmf_dbg(SCAN, ">>> Active scan req for ssid (%s)\n",
request->ssids[i].ssid); request->ssids[i].ssid);
/* /*
...@@ -2975,9 +2977,8 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy, ...@@ -2975,9 +2977,8 @@ brcmf_cfg80211_sched_scan_start(struct wiphy *wiphy,
memcpy(pfn.ssid.SSID, ssid->ssid, ssid_len); memcpy(pfn.ssid.SSID, ssid->ssid, ssid_len);
ret = brcmf_fil_iovar_data_set(ifp, "pfn_add", &pfn, ret = brcmf_fil_iovar_data_set(ifp, "pfn_add", &pfn,
sizeof(pfn)); sizeof(pfn));
WL_SCAN(">>> PNO filter %s for ssid (%s)\n", brcmf_dbg(SCAN, ">>> PNO filter %s for ssid (%s)\n",
ret == 0 ? "set" : "failed", ret == 0 ? "set" : "failed", ssid->ssid);
ssid->ssid);
} }
/* Enable the PNO */ /* Enable the PNO */
if (brcmf_fil_iovar_int_set(ifp, "pfn", 1) < 0) { if (brcmf_fil_iovar_int_set(ifp, "pfn", 1) < 0) {
...@@ -2996,7 +2997,7 @@ static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy, ...@@ -2996,7 +2997,7 @@ static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy,
{ {
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
WL_SCAN("enter\n"); brcmf_dbg(SCAN, "enter\n");
brcmf_dev_pno_clean(ndev); brcmf_dev_pno_clean(ndev);
if (cfg->sched_escan) if (cfg->sched_escan)
brcmf_notify_escan_complete(cfg, ndev, true, true); brcmf_notify_escan_complete(cfg, ndev, true, true);
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "dhd_dbg.h" #include "dhd_dbg.h"
#define WL_SCAN(fmt, ...) brcmf_dbg(SCAN, fmt, ##__VA_ARGS__)
#define WL_CONN(fmt, ...) brcmf_dbg(CONN, fmt, ##__VA_ARGS__) #define WL_CONN(fmt, ...) brcmf_dbg(CONN, fmt, ##__VA_ARGS__)
#define WL_NUM_SCAN_MAX 10 #define WL_NUM_SCAN_MAX 10
......
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