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

Commit 0973dd45 authored by Johannes Berg's avatar Johannes Berg
Browse files

Revert "mac80211: Add airtime account and scheduling to TXQs"



This reverts commit b0d52ad8.

We need to revert the TXQ scheduling API due to conflicts
with a new driver, and this depends on that API.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b0d52ad8
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -1188,8 +1188,6 @@ enum mac80211_rx_encoding {
 *	HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
 * @nss: number of streams (VHT and HE only)
 * @flag: %RX_FLAG_\*
 * @airtime: Duration of frame in usec. See @IEEE80211_HW_AIRTIME_ACCOUNTING for
 *       how to use this.
 * @encoding: &enum mac80211_rx_encoding
 * @bw: &enum rate_info_bw
 * @enc_flags: uses bits from &enum mac80211_rx_encoding_flags
@@ -1204,7 +1202,6 @@ struct ieee80211_rx_status {
	u32 device_timestamp;
	u32 ampdu_reference;
	u32 flag;
	u16 airtime;
	u16 freq;
	u8 enc_flags;
	u8 encoding:2, bw:3;
@@ -2069,26 +2066,6 @@ struct ieee80211_txq {
 * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
 *	TDLS links.
 *
 * @IEEE80211_HW_AIRTIME_ACCOUNTING: Hardware supports accounting the airtime
 *      usage of other stations and reports it in the @tx_time and/or @airtime
 *      fields of the TX/RX status structs.
 *      When setting this flag, the driver should ensure that the respective
 *      fields in the TX and RX status structs are always either zero or
 *      contains a valid duration for the frame in usec. The driver can choose
 *      to report either or both of TX and RX airtime, but it is recommended to
 *      report both.
 *      The reported airtime should as a minimum include all time that is spent
 *      transmitting to the remote station, including overhead and padding, but
 *      not including time spent waiting for a TXOP. If the time is not reported
 *      by the hardware it can in some cases be calculated from the rate and
 *      known frame composition. When possible, the time should include any
 *      failed transmission attempts.
 *      For aggregated frames, there are two possible strategies to report the
 *      airtime: Either include the airtime of the entire aggregate in the first
 *      (or last) frame and leave the others at zero. Alternatively, include the
 *      overhead of the full aggregate in the first or last frame and report the
 *      time of each frame + padding not including the full aggregate overhead.
 *
 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
 */
enum ieee80211_hw_flags {
@@ -2132,7 +2109,6 @@ enum ieee80211_hw_flags {
	IEEE80211_HW_REPORTS_LOW_ACK,
	IEEE80211_HW_SUPPORTS_TX_FRAG,
	IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
	IEEE80211_HW_AIRTIME_ACCOUNTING,

	/* keep last, obviously */
	NUM_IEEE80211_HW_FLAGS
+0 −1
Original line number Diff line number Diff line
@@ -212,7 +212,6 @@ static const char *hw_flag_names[] = {
	FLAG(REPORTS_LOW_ACK),
	FLAG(SUPPORTS_TX_FRAG),
	FLAG(SUPPORTS_TDLS_BUFFER_STA),
	FLAG(AIRTIME_ACCOUNTING),
#undef FLAG
};

+0 −29
Original line number Diff line number Diff line
@@ -188,32 +188,6 @@ static ssize_t sta_aqm_read(struct file *file, char __user *userbuf,
}
STA_OPS(aqm);

static ssize_t sta_airtime_read(struct file *file, char __user *userbuf,
				size_t count, loff_t *ppos)
{
	struct sta_info *sta = file->private_data;
	size_t bufsz = 200;
	char *buf = kzalloc(bufsz, GFP_KERNEL), *p = buf;
	ssize_t rv;

	if (!buf)
		return -ENOMEM;

	spin_lock_bh(&sta->lock);

	p += scnprintf(p, bufsz + buf - p,
		"RX: %llu us\nTX: %llu us\nDeficit: %lld us\n",
		sta->airtime_stats.rx_airtime,
		sta->airtime_stats.tx_airtime,
		sta->airtime_deficit);

	spin_unlock_bh(&sta->lock);
	rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
	kfree(buf);
	return rv;
}
STA_OPS(airtime);

static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
					size_t count, loff_t *ppos)
{
@@ -568,9 +542,6 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
	if (local->ops->wake_tx_queue)
		DEBUGFS_ADD(aqm);

	if (ieee80211_hw_check(&local->hw, AIRTIME_ACCOUNTING))
		DEBUGFS_ADD(airtime);

	if (sizeof(sta->driver_buffered_tids) == sizeof(u32))
		debugfs_create_x32("driver_buffered_tids", 0400,
				   sta->debugfs_dir,
+2 −6
Original line number Diff line number Diff line
@@ -90,9 +90,6 @@ extern const u8 ieee80211_ac_to_qos_mask[IEEE80211_NUM_ACS];

#define IEEE80211_MAX_NAN_INSTANCE_ID 255

/* How much to increase airtime deficit on each scheduling round */
#define IEEE80211_AIRTIME_QUANTUM        1000 /* usec */

struct ieee80211_fragment_entry {
	struct sk_buff_head skb_list;
	unsigned long first_frag_time;
@@ -1126,10 +1123,9 @@ struct ieee80211_local {
	struct codel_vars *cvars;
	struct codel_params cparams;

	/* protects active_txqs_{new,old} and txqi->schedule_order */
	/* protects active_txqs and txqi->schedule_order */
	spinlock_t active_txq_lock;
	struct list_head active_txqs_new;
	struct list_head active_txqs_old;
	struct list_head active_txqs;

	const struct ieee80211_ops *ops;

+1 −2
Original line number Diff line number Diff line
@@ -619,8 +619,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
	spin_lock_init(&local->rx_path_lock);
	spin_lock_init(&local->queue_stop_reason_lock);

	INIT_LIST_HEAD(&local->active_txqs_new);
	INIT_LIST_HEAD(&local->active_txqs_old);
	INIT_LIST_HEAD(&local->active_txqs);
	spin_lock_init(&local->active_txq_lock);

	INIT_LIST_HEAD(&local->chanctx_list);
Loading