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

Commit e0cfd52b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cfg80211: basic support for PBSS network type"

parents 60d40c19 019babb4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1095,7 +1095,8 @@ static void ath10k_peer_assoc_h_crypto(struct ath10k *ar,
	lockdep_assert_held(&ar->conf_mutex);

	bss = cfg80211_get_bss(ar->hw->wiphy, ar->hw->conf.chandef.chan,
			       info->bssid, NULL, 0, 0, 0);
			       info->bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY,
			       IEEE80211_PRIVACY_ANY);
	if (bss) {
		const struct cfg80211_bss_ies *ies;

+5 −4
Original line number Diff line number Diff line
@@ -686,20 +686,21 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif,
{
	struct ath6kl *ar = vif->ar;
	struct cfg80211_bss *bss;
	u16 cap_mask, cap_val;
	u16 cap_val;
	enum ieee80211_bss_type bss_type;
	u8 *ie;

	if (nw_type & ADHOC_NETWORK) {
		cap_mask = WLAN_CAPABILITY_IBSS;
		cap_val = WLAN_CAPABILITY_IBSS;
		bss_type = IEEE80211_BSS_TYPE_IBSS;
	} else {
		cap_mask = WLAN_CAPABILITY_ESS;
		cap_val = WLAN_CAPABILITY_ESS;
		bss_type = IEEE80211_BSS_TYPE_ESS;
	}

	bss = cfg80211_get_bss(ar->wiphy, chan, bssid,
			       vif->ssid, vif->ssid_len,
			       cap_mask, cap_val);
			       bss_type, IEEE80211_PRIVACY_ANY);
	if (bss == NULL) {
		/*
		 * Since cfg80211 may not yet know about the BSS,
+19 −3
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ int wil_cid_fill_sinfo(struct wil6210_priv *wil, int cid,
		.interval_usec = 0,
	};
	struct {
		struct wil6210_mbox_hdr_wmi wmi;
		struct wmi_cmd_hdr wmi;
		struct wmi_notify_req_done_event evt;
	} __packed reply;
	struct wil_net_stats *stats = &wil->sta[cid].stats;
@@ -319,6 +319,7 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
	mod_timer(&wil->scan_timer, jiffies + WIL6210_SCAN_TO);

	memset(&cmd, 0, sizeof(cmd));
	cmd.cmd.scan_type = WMI_ACTIVE_SCAN;
	cmd.cmd.num_channels = 0;
	n = min(request->n_channels, 4U);
	for (i = 0; i < n; i++) {
@@ -346,6 +347,11 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
	if (rc)
		goto out;

	if (wil->discovery_mode && cmd.cmd.scan_type == WMI_ACTIVE_SCAN) {
		cmd.cmd.discovery_mode = 1;
		wil_dbg_misc(wil, "active scan with discovery_mode=1\n");
	}

	rc = wmi_send(wil, WMI_START_SCAN_CMDID, &cmd, sizeof(cmd.cmd) +
			cmd.cmd.num_channels * sizeof(cmd.cmd.channel_list[0]));

@@ -428,9 +434,14 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
	if (sme->privacy && !rsn_eid)
		wil_info(wil, "WSC connection\n");

	if (sme->pbss) {
		wil_err(wil, "connect - PBSS not yet supported\n");
		return -EOPNOTSUPP;
	}

	bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid,
			       sme->ssid, sme->ssid_len,
			       WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
			       IEEE80211_BSS_TYPE_ESS, IEEE80211_PRIVACY_ANY);
	if (!bss) {
		wil_err(wil, "Unable to find BSS\n");
		return -ENOENT;
@@ -569,7 +580,7 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
	struct ieee80211_mgmt *mgmt_frame = (void *)buf;
	struct wmi_sw_tx_req_cmd *cmd;
	struct {
		struct wil6210_mbox_hdr_wmi wmi;
		struct wmi_cmd_hdr wmi;
		struct wmi_sw_tx_complete_event evt;
	} __packed evt;

@@ -1027,6 +1038,11 @@ static int wil_cfg80211_start_ap(struct wiphy *wiphy,
		return -EINVAL;
	}

	if (info->pbss) {
		wil_err(wil, "AP: PBSS not yet supported\n");
		return -EOPNOTSUPP;
	}

	switch (info->hidden_ssid) {
	case NL80211_HIDDEN_SSID_NOT_IN_USE:
		hidden_ssid = WMI_HIDDEN_SSID_DISABLED;
+10 −4
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ enum dbg_off_type {
	doff_x32 = 1,
	doff_ulong = 2,
	doff_io32 = 3,
	doff_u8 = 4
};

/* offset to "wil" */
@@ -351,6 +352,10 @@ static void wil6210_debugfs_init_offset(struct wil6210_priv *wil,
							 tbl[i].mode, dbg,
							 base + tbl[i].off);
			break;
		case doff_u8:
			f = debugfs_create_u8(tbl[i].name, tbl[i].mode, dbg,
					      base + tbl[i].off);
			break;
		default:
			f = ERR_PTR(-EINVAL);
		}
@@ -832,9 +837,9 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,
				  size_t len, loff_t *ppos)
{
	struct wil6210_priv *wil = file->private_data;
	struct wil6210_mbox_hdr_wmi *wmi;
	struct wmi_cmd_hdr *wmi;
	void *cmd;
	int cmdlen = len - sizeof(struct wil6210_mbox_hdr_wmi);
	int cmdlen = len - sizeof(struct wmi_cmd_hdr);
	u16 cmdid;
	int rc, rc1;

@@ -852,7 +857,7 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,
	}

	cmd = &wmi[1];
	cmdid = le16_to_cpu(wmi->id);
	cmdid = le16_to_cpu(wmi->command_id);

	rc1 = wmi_send(wil, cmdid, cmd, cmdlen);
	kfree(wmi);
@@ -1012,7 +1017,7 @@ static int wil_bf_debugfs_show(struct seq_file *s, void *data)
		.interval_usec = 0,
	};
	struct {
		struct wil6210_mbox_hdr_wmi wmi;
		struct wmi_cmd_hdr wmi;
		struct wmi_notify_req_done_event evt;
	} __packed reply;

@@ -1549,6 +1554,7 @@ static const struct dbg_off dbg_wil_off[] = {
	WIL_FIELD(hw_version,	S_IRUGO,		doff_x32),
	WIL_FIELD(recovery_count, S_IRUGO,		doff_u32),
	WIL_FIELD(ap_isolate,	S_IRUGO,		doff_u32),
	WIL_FIELD(discovery_mode, S_IRUGO | S_IWUSR,	doff_u8),
	{},
};

+10 −9
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013 Qualcomm Atheros, Inc.
 * Copyright (c) 2013-2016 Qualcomm Atheros, Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
@@ -37,39 +37,40 @@ static inline void trace_ ## name(proto) {}
#endif /* !CONFIG_WIL6210_TRACING || defined(__CHECKER__) */

DECLARE_EVENT_CLASS(wil6210_wmi,
	TP_PROTO(struct wil6210_mbox_hdr_wmi *wmi, void *buf, u16 buf_len),
	TP_PROTO(struct wmi_cmd_hdr *wmi, void *buf, u16 buf_len),

	TP_ARGS(wmi, buf, buf_len),

	TP_STRUCT__entry(
		__field(u8, mid)
		__field(u16, id)
		__field(u32, timestamp)
		__field(u16, command_id)
		__field(u32, fw_timestamp)
		__field(u16, buf_len)
		__dynamic_array(u8, buf, buf_len)
	),

	TP_fast_assign(
		__entry->mid = wmi->mid;
		__entry->id = le16_to_cpu(wmi->id);
		__entry->timestamp = le32_to_cpu(wmi->timestamp);
		__entry->command_id = le16_to_cpu(wmi->command_id);
		__entry->fw_timestamp = le32_to_cpu(wmi->fw_timestamp);
		__entry->buf_len = buf_len;
		memcpy(__get_dynamic_array(buf), buf, buf_len);
	),

	TP_printk(
		"MID %d id 0x%04x len %d timestamp %d",
		__entry->mid, __entry->id, __entry->buf_len, __entry->timestamp
		__entry->mid, __entry->command_id, __entry->buf_len,
		__entry->fw_timestamp
	)
);

DEFINE_EVENT(wil6210_wmi, wil6210_wmi_cmd,
	TP_PROTO(struct wil6210_mbox_hdr_wmi *wmi, void *buf, u16 buf_len),
	TP_PROTO(struct wmi_cmd_hdr *wmi, void *buf, u16 buf_len),
	TP_ARGS(wmi, buf, buf_len)
);

DEFINE_EVENT(wil6210_wmi, wil6210_wmi_event,
	TP_PROTO(struct wil6210_mbox_hdr_wmi *wmi, void *buf, u16 buf_len),
	TP_PROTO(struct wmi_cmd_hdr *wmi, void *buf, u16 buf_len),
	TP_ARGS(wmi, buf, buf_len)
);

Loading