Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf3b2e7c authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by Ian Maund
Browse files

wil6210: print more information when connecting



when connecting, print some info about BSS

Change-Id: I9fe358ba598c4493cebc0f325bf4f8dac049a75e
Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Git-commit: 8ca26163e58bb05d5c1b74778dd21fcee6738f89
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git


Signed-off-by: default avatarHamad Kadmany <hkadmany@codeaurora.org>
parent be6dcde6
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -319,6 +319,22 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
	return rc;
}

static void wil_print_connect_params(struct wil6210_priv *wil,
				     struct cfg80211_connect_params *sme)
{
	wil_info(wil, "Connecting to:\n");
	if (sme->channel) {
		wil_info(wil, "  Channel: %d freq %d\n",
			 sme->channel->hw_value, sme->channel->center_freq);
	}
	if (sme->bssid)
		wil_info(wil, "  BSSID: %pM\n", sme->bssid);
	if (sme->ssid)
		print_hex_dump(KERN_INFO, "  SSID: ", DUMP_PREFIX_OFFSET,
			       16, 1, sme->ssid, sme->ssid_len, true);
	wil_info(wil, "  Privacy: %s\n", sme->privacy ? "secure" : "open");
}

static int wil_cfg80211_connect(struct wiphy *wiphy,
				struct net_device *ndev,
				struct cfg80211_connect_params *sme)
@@ -335,6 +351,8 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
	    test_bit(wil_status_fwconnected, &wil->status))
		return -EALREADY;

	wil_print_connect_params(wil, sme);

	bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
			       sme->ssid, sme->ssid_len,
			       WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);