Commit fe57beb0 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v6.12

This is once again a fairly light pull request since ath12k is still
working on MLO-related changes, and the other drivers are mostly in
maintenance mode.

ath12k

* Fix a frame-larger-than warning seen with debug builds
* Fix flex-array-member-not-at-end warnings

ath11k

* Fix flex-array-member-not-at-end warnings

ath9k

* Fix a syzbot-reported issue on USB-based devices
parents abbd838c 02f454f9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -407,11 +407,17 @@ struct ath11k_vif {
	bool wpaie_present;
	bool bcca_zero_sent;
	bool do_not_send_tmpl;
	struct ieee80211_chanctx_conf chanctx;
	struct ath11k_arp_ns_offload arp_ns_offload;
	struct ath11k_rekey_data rekey_data;

	struct ath11k_reg_tpc_power_info reg_tpc_info;

	/* Must be last - ends in a flexible-array member.
	 *
	 * FIXME: Driver should not copy struct ieee80211_chanctx_conf,
	 * especially because it has a flexible array. Find a better way.
	 */
	struct ieee80211_chanctx_conf chanctx;
};

struct ath11k_vif_iter {
+0 −23
Original line number Diff line number Diff line
@@ -1305,18 +1305,6 @@ struct htt_ppdu_stats_user_rate {
#define HTT_TX_INFO_PEERID(_flags) \
			FIELD_GET(HTT_PPDU_STATS_TX_INFO_FLAGS_PEERID_M, _flags)

struct htt_tx_ppdu_stats_info {
	struct htt_tlv tlv_hdr;
	u32 tx_success_bytes;
	u32 tx_retry_bytes;
	u32 tx_failed_bytes;
	u32 flags; /* %HTT_PPDU_STATS_TX_INFO_FLAGS_ */
	u16 tx_success_msdus;
	u16 tx_retry_msdus;
	u16 tx_failed_msdus;
	u16 tx_duration; /* united in us */
} __packed;

enum  htt_ppdu_stats_usr_compln_status {
	HTT_PPDU_STATS_USER_STATUS_OK,
	HTT_PPDU_STATS_USER_STATUS_FILTERED,
@@ -1364,17 +1352,6 @@ struct htt_ppdu_stats_usr_cmpltn_ack_ba_status {
	u32 success_bytes;
} __packed;

struct htt_ppdu_stats_usr_cmn_array {
	struct htt_tlv tlv_hdr;
	u32 num_ppdu_stats;
	/* tx_ppdu_stats_info is filled by multiple struct htt_tx_ppdu_stats_info
	 * elements.
	 * tx_ppdu_stats_info is variable length, with length =
	 *     number_of_ppdu_stats * sizeof (struct htt_tx_ppdu_stats_info)
	 */
	struct htt_tx_ppdu_stats_info tx_ppdu_info[];
} __packed;

struct htt_ppdu_user_stats {
	u16 peer_id;
	u32 tlv_flags;
+7 −1
Original line number Diff line number Diff line
@@ -287,7 +287,6 @@ struct ath12k_vif {
	int txpower;
	bool rsnie_present;
	bool wpaie_present;
	struct ieee80211_chanctx_conf chanctx;
	u32 key_cipher;
	u8 tx_encap_type;
	u8 vdev_stats_id;
@@ -295,6 +294,13 @@ struct ath12k_vif {
	bool ps;
	struct ath12k_vif_cache *cache;
	struct ath12k_rekey_data rekey_data;

	/* Must be last - ends in a flexible-array member.
	 *
	 * FIXME: Driver should not copy struct ieee80211_chanctx_conf,
	 * especially because it has a flexible array. Find a better way.
	 */
	struct ieee80211_chanctx_conf chanctx;
};

struct ath12k_vif_iter {
+0 −12
Original line number Diff line number Diff line
@@ -1495,18 +1495,6 @@ struct htt_ppdu_stats_user_rate {
#define HTT_TX_INFO_PEERID(_flags) \
			u32_get_bits(_flags, HTT_PPDU_STATS_TX_INFO_FLAGS_PEERID_M)

struct htt_tx_ppdu_stats_info {
	struct htt_tlv tlv_hdr;
	__le32 tx_success_bytes;
	__le32 tx_retry_bytes;
	__le32 tx_failed_bytes;
	__le32 flags; /* %HTT_PPDU_STATS_TX_INFO_FLAGS_ */
	__le16 tx_success_msdus;
	__le16 tx_retry_msdus;
	__le16 tx_failed_msdus;
	__le16 tx_duration; /* united in us */
} __packed;

enum  htt_ppdu_stats_usr_compln_status {
	HTT_PPDU_STATS_USER_STATUS_OK,
	HTT_PPDU_STATS_USER_STATUS_FILTERED,
+30 −24
Original line number Diff line number Diff line
@@ -3663,7 +3663,7 @@ static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
	struct ath12k *ar, *prev_ar;
	struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
	struct cfg80211_scan_request *req = &hw_req->req;
	struct ath12k_wmi_scan_req_arg arg = {};
	struct ath12k_wmi_scan_req_arg *arg = NULL;
	int ret;
	int i;
	bool create = true;
@@ -3745,42 +3745,47 @@ static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
	if (ret)
		goto exit;

	ath12k_wmi_start_scan_init(ar, &arg);
	arg.vdev_id = arvif->vdev_id;
	arg.scan_id = ATH12K_SCAN_ID;
	arg = kzalloc(sizeof(*arg), GFP_KERNEL);
	if (!arg) {
		ret = -ENOMEM;
		goto exit;
	}

	ath12k_wmi_start_scan_init(ar, arg);
	arg->vdev_id = arvif->vdev_id;
	arg->scan_id = ATH12K_SCAN_ID;

	if (req->ie_len) {
		arg.extraie.ptr = kmemdup(req->ie, req->ie_len, GFP_KERNEL);
		if (!arg.extraie.ptr) {
		arg->extraie.ptr = kmemdup(req->ie, req->ie_len, GFP_KERNEL);
		if (!arg->extraie.ptr) {
			ret = -ENOMEM;
			goto exit;
		}
		arg.extraie.len = req->ie_len;
		arg->extraie.len = req->ie_len;
	}

	if (req->n_ssids) {
		arg.num_ssids = req->n_ssids;
		for (i = 0; i < arg.num_ssids; i++)
			arg.ssid[i] = req->ssids[i];
		arg->num_ssids = req->n_ssids;
		for (i = 0; i < arg->num_ssids; i++)
			arg->ssid[i] = req->ssids[i];
	} else {
		arg.scan_f_passive = 1;
		arg->scan_f_passive = 1;
	}

	if (req->n_channels) {
		arg.num_chan = req->n_channels;
		arg.chan_list = kcalloc(arg.num_chan, sizeof(*arg.chan_list),
		arg->num_chan = req->n_channels;
		arg->chan_list = kcalloc(arg->num_chan, sizeof(*arg->chan_list),
					 GFP_KERNEL);

		if (!arg.chan_list) {
		if (!arg->chan_list) {
			ret = -ENOMEM;
			goto exit;
		}

		for (i = 0; i < arg.num_chan; i++)
			arg.chan_list[i] = req->channels[i]->center_freq;
		for (i = 0; i < arg->num_chan; i++)
			arg->chan_list[i] = req->channels[i]->center_freq;
	}

	ret = ath12k_start_scan(ar, &arg);
	ret = ath12k_start_scan(ar, arg);
	if (ret) {
		ath12k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
		spin_lock_bh(&ar->data_lock);
@@ -3790,14 +3795,15 @@ static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,

	/* Add a margin to account for event/command processing */
	ieee80211_queue_delayed_work(ath12k_ar_to_hw(ar), &ar->scan.timeout,
				     msecs_to_jiffies(arg.max_scan_time +
				     msecs_to_jiffies(arg->max_scan_time +
						      ATH12K_MAC_SCAN_TIMEOUT_MSECS));

exit:
	kfree(arg.chan_list);

	if (req->ie_len)
		kfree(arg.extraie.ptr);
	if (arg) {
		kfree(arg->chan_list);
		kfree(arg->extraie.ptr);
		kfree(arg);
	}

	mutex_unlock(&ar->conf_mutex);

Loading