mwifiex: don't print SSID to logs
authorBrian Norris <briannorris@chromium.org>
Thu, 25 Feb 2021 02:44:54 +0000 (18:44 -0800)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 17 Apr 2021 17:46:43 +0000 (20:46 +0300)
There are a few reasons not to dump SSIDs as-is in kernel logs:

1) they're not guaranteed to be any particular text encoding (UTF-8,
   ASCII, ...) in general
2) it's somewhat redundant; the BSSID should be enough to uniquely
   identify the AP/STA to which we're connecting
3) BSSIDs have an easily-recognized format, whereas SSIDs do not (they
   are free-form)
4) other common drivers (e.g., everything based on mac80211) get along
   just fine by only including BSSIDs when logging state transitions

Additional notes on reason #3: this is important for the
privacy-conscious, especially when providing tools that convey
kernel logs on behalf of a user -- e.g., when reporting bugs. So for
example, it's easy to automatically filter logs for MAC addresses, but
it's much harder to filter SSIDs out of unstructured text.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210225024454.4106485-1-briannorris@chromium.org
drivers/net/wireless/marvell/mwifiex/cfg80211.c

index a2ed268..0961f4a 100644 (file)
@@ -2300,8 +2300,7 @@ done:
                        is_scanning_required = 1;
                } else {
                        mwifiex_dbg(priv->adapter, MSG,
-                                   "info: trying to associate to '%.*s' bssid %pM\n",
-                                   req_ssid.ssid_len, (char *)req_ssid.ssid,
+                                   "info: trying to associate to bssid %pM\n",
                                    bss->bssid);
                        memcpy(&priv->cfg_bssid, bss->bssid, ETH_ALEN);
                        break;
@@ -2378,8 +2377,7 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
        }
 
        mwifiex_dbg(adapter, INFO,
-                   "info: Trying to associate to %.*s and bssid %pM\n",
-                   (int)sme->ssid_len, (char *)sme->ssid, sme->bssid);
+                   "info: Trying to associate to bssid %pM\n", sme->bssid);
 
        if (!mwifiex_stop_bg_scan(priv))
                cfg80211_sched_scan_stopped_locked(priv->wdev.wiphy, 0);
@@ -2512,9 +2510,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
                goto done;
        }
 
-       mwifiex_dbg(priv->adapter, MSG,
-                   "info: trying to join to %.*s and bssid %pM\n",
-                   params->ssid_len, (char *)params->ssid, params->bssid);
+       mwifiex_dbg(priv->adapter, MSG, "info: trying to join to bssid %pM\n",
+                   params->bssid);
 
        mwifiex_set_ibss_params(priv, params);