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

Commit 05c5e9ff authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mac80211-for-davem-2018-09-27' of...

Merge tag 'mac80211-for-davem-2018-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

====================
More patches than I'd like perhaps, but each seems reasonable:
 * two new spectre-v1 mitigations in nl80211
 * TX status fix in general, and mesh in particular
 * powersave vs. offchannel fix
 * regulatory initialization fix
 * fix for a queue hang due to a bad return value
 * allocate TXQs for active monitor interfaces, fixing my
   earlier patch to avoid unnecessary allocations where I
   missed this case needed them
 * fix TDLS data frames priority assignment
 * fix scan results processing to take into account duplicate
   channel numbers (over different operating classes, but we
   don't necessarily know the operating class)
 * various hwsim fixes for radio destruction and new radio
   announcement messages
 * remove an extraneous kernel-doc line
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5f672090 1222a160
Loading
Loading
Loading
Loading
+17 −19
Original line number Diff line number Diff line
@@ -520,7 +520,6 @@ struct mac80211_hwsim_data {
	int channels, idx;
	bool use_chanctx;
	bool destroy_on_close;
	struct work_struct destroy_work;
	u32 portid;
	char alpha2[2];
	const struct ieee80211_regdomain *regd;
@@ -2935,7 +2934,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
	hwsim_radios_generation++;
	spin_unlock_bh(&hwsim_radio_lock);

	if (idx > 0)
	hwsim_mcast_new_radio(idx, info, param);

	return idx;
@@ -3565,30 +3563,27 @@ static struct genl_family hwsim_genl_family __ro_after_init = {
	.n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
};

static void destroy_radio(struct work_struct *work)
{
	struct mac80211_hwsim_data *data =
		container_of(work, struct mac80211_hwsim_data, destroy_work);

	hwsim_radios_generation++;
	mac80211_hwsim_del_radio(data, wiphy_name(data->hw->wiphy), NULL);
}

static void remove_user_radios(u32 portid)
{
	struct mac80211_hwsim_data *entry, *tmp;
	LIST_HEAD(list);

	spin_lock_bh(&hwsim_radio_lock);
	list_for_each_entry_safe(entry, tmp, &hwsim_radios, list) {
		if (entry->destroy_on_close && entry->portid == portid) {
			list_del(&entry->list);
			list_move(&entry->list, &list);
			rhashtable_remove_fast(&hwsim_radios_rht, &entry->rht,
					       hwsim_rht_params);
			INIT_WORK(&entry->destroy_work, destroy_radio);
			queue_work(hwsim_wq, &entry->destroy_work);
			hwsim_radios_generation++;
		}
	}
	spin_unlock_bh(&hwsim_radio_lock);

	list_for_each_entry_safe(entry, tmp, &list, list) {
		list_del(&entry->list);
		mac80211_hwsim_del_radio(entry, wiphy_name(entry->hw->wiphy),
					 NULL);
	}
}

static int mac80211_hwsim_netlink_notify(struct notifier_block *nb,
@@ -3646,6 +3641,7 @@ static __net_init int hwsim_init_net(struct net *net)
static void __net_exit hwsim_exit_net(struct net *net)
{
	struct mac80211_hwsim_data *data, *tmp;
	LIST_HEAD(list);

	spin_lock_bh(&hwsim_radio_lock);
	list_for_each_entry_safe(data, tmp, &hwsim_radios, list) {
@@ -3656,17 +3652,19 @@ static void __net_exit hwsim_exit_net(struct net *net)
		if (data->netgroup == hwsim_net_get_netgroup(&init_net))
			continue;

		list_del(&data->list);
		list_move(&data->list, &list);
		rhashtable_remove_fast(&hwsim_radios_rht, &data->rht,
				       hwsim_rht_params);
		hwsim_radios_generation++;
	}
	spin_unlock_bh(&hwsim_radio_lock);

	list_for_each_entry_safe(data, tmp, &list, list) {
		list_del(&data->list);
		mac80211_hwsim_del_radio(data,
					 wiphy_name(data->hw->wiphy),
					 NULL);
		spin_lock_bh(&hwsim_radio_lock);
	}
	spin_unlock_bh(&hwsim_radio_lock);

	ida_simple_remove(&hwsim_netgroup_ida, hwsim_net_get_netgroup(net));
}
+0 −2
Original line number Diff line number Diff line
@@ -4852,8 +4852,6 @@ const char *reg_initiator_name(enum nl80211_reg_initiator initiator);
 *
 * @alpha2: the ISO/IEC 3166 alpha2 wmm rule to be queried.
 * @freq: the freqency(in MHz) to be queried.
 * @ptr: pointer where the regdb wmm data is to be stored (or %NULL if
 *	irrelevant). This can be used later for deduplication.
 * @rule: pointer to store the wmm rule from the regulatory db.
 *
 * Self-managed wireless drivers can use this function to  query
+2 −1
Original line number Diff line number Diff line
@@ -1756,7 +1756,8 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,

		if (local->ops->wake_tx_queue &&
		    type != NL80211_IFTYPE_AP_VLAN &&
		    type != NL80211_IFTYPE_MONITOR)
		    (type != NL80211_IFTYPE_MONITOR ||
		     (params->flags & MONITOR_FLAG_ACTIVE)))
			txq_size += sizeof(struct txq_info) +
				    local->hw.txq_data_size;

+2 −1
Original line number Diff line number Diff line
@@ -217,7 +217,8 @@ void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
void ieee80211s_init(void);
void ieee80211s_update_metric(struct ieee80211_local *local,
			      struct sta_info *sta, struct sk_buff *skb);
			      struct sta_info *sta,
			      struct ieee80211_tx_status *st);
void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
void ieee80211_mesh_teardown_sdata(struct ieee80211_sub_if_data *sdata);
int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
+3 −6
Original line number Diff line number Diff line
@@ -295,15 +295,12 @@ int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata,
}

void ieee80211s_update_metric(struct ieee80211_local *local,
		struct sta_info *sta, struct sk_buff *skb)
			      struct sta_info *sta,
			      struct ieee80211_tx_status *st)
{
	struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb);
	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
	struct ieee80211_tx_info *txinfo = st->info;
	int failed;

	if (!ieee80211_is_data(hdr->frame_control))
		return;

	failed = !(txinfo->flags & IEEE80211_TX_STAT_ACK);

	/* moving average, scaled to 100.
Loading