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

Commit 4b074b07 authored by John W. Linville's avatar John W. Linville
Browse files
parents 7d68849f ddcc347b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -159,10 +159,10 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
		REG_RULE(2412-20, 2484+20, 40, 6, 20, 0),
		REG_RULE(2412-20, 2484+20, 40, 6, 20, 0),
		/* IEEE 802.11a, channels 34..48 */
		/* IEEE 802.11a, channels 34..48 */
		REG_RULE(5170-20, 5240+20, 40, 6, 20,
		REG_RULE(5170-20, 5240+20, 40, 6, 20,
			NL80211_RRF_PASSIVE_SCAN),
			NL80211_RRF_NO_IR),
		/* IEEE 802.11a, channels 52..64 */
		/* IEEE 802.11a, channels 52..64 */
		REG_RULE(5260-20, 5320+20, 40, 6, 20,
		REG_RULE(5260-20, 5320+20, 40, 6, 20,
			NL80211_RRF_NO_IBSS |
			NL80211_RRF_NO_IR|
			NL80211_RRF_DFS),
			NL80211_RRF_DFS),
	}
	}
};
};
+2 −2
Original line number Original line Diff line number Diff line
@@ -1351,12 +1351,12 @@ static int ath10k_update_channel_list(struct ath10k *ar)
			ch->allow_vht = true;
			ch->allow_vht = true;


			ch->allow_ibss =
			ch->allow_ibss =
				!(channel->flags & IEEE80211_CHAN_NO_IBSS);
				!(channel->flags & IEEE80211_CHAN_NO_IR);


			ch->ht40plus =
			ch->ht40plus =
				!(channel->flags & IEEE80211_CHAN_NO_HT40PLUS);
				!(channel->flags & IEEE80211_CHAN_NO_HT40PLUS);


			passive = channel->flags & IEEE80211_CHAN_PASSIVE_SCAN;
			passive = channel->flags & IEEE80211_CHAN_NO_IR;
			ch->passive = passive;
			ch->passive = passive;


			ch->freq = channel->center_freq;
			ch->freq = channel->center_freq;
+8 −3
Original line number Original line Diff line number Diff line
@@ -1109,7 +1109,9 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
				(mode == WMI_11G_HT20) ?
				(mode == WMI_11G_HT20) ?
					NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
					NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);


	mutex_lock(&vif->wdev.mtx);
	cfg80211_ch_switch_notify(vif->ndev, &chandef);
	cfg80211_ch_switch_notify(vif->ndev, &chandef);
	mutex_unlock(&vif->wdev.mtx);
}
}


static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
@@ -3169,12 +3171,15 @@ static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
}
}


static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
			  struct ieee80211_channel *chan, bool offchan,
			  struct cfg80211_mgmt_tx_params *params, u64 *cookie)
			  unsigned int wait, const u8 *buf, size_t len,
			  bool no_cck, bool dont_wait_for_ack, u64 *cookie)
{
{
	struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
	struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
	struct ath6kl *ar = ath6kl_priv(vif->ndev);
	struct ath6kl *ar = ath6kl_priv(vif->ndev);
	struct ieee80211_channel *chan = params->chan;
	const u8 *buf = params->buf;
	size_t len = params->len;
	unsigned int wait = params->wait;
	bool no_cck = params->no_cck;
	u32 id, freq;
	u32 id, freq;
	const struct ieee80211_mgmt *mgmt;
	const struct ieee80211_mgmt *mgmt;
	bool more_data, queued;
	bool more_data, queued;
+23 −29
Original line number Original line Diff line number Diff line
@@ -37,17 +37,18 @@ static int __ath_regd_init(struct ath_regulatory *reg);


/* We enable active scan on these a case by case basis by regulatory domain */
/* We enable active scan on these a case by case basis by regulatory domain */
#define ATH9K_2GHZ_CH12_13	REG_RULE(2467-10, 2472+10, 40, 0, 20,\
#define ATH9K_2GHZ_CH12_13	REG_RULE(2467-10, 2472+10, 40, 0, 20,\
					NL80211_RRF_PASSIVE_SCAN)
					 NL80211_RRF_NO_IR)
#define ATH9K_2GHZ_CH14		REG_RULE(2484-10, 2484+10, 40, 0, 20,\
#define ATH9K_2GHZ_CH14		REG_RULE(2484-10, 2484+10, 40, 0, 20,\
				NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)
					 NL80211_RRF_NO_IR | \
					 NL80211_RRF_NO_OFDM)


/* We allow IBSS on these on a case by case basis by regulatory domain */
/* We allow IBSS on these on a case by case basis by regulatory domain */
#define ATH9K_5GHZ_5150_5350	REG_RULE(5150-10, 5350+10, 80, 0, 30,\
#define ATH9K_5GHZ_5150_5350	REG_RULE(5150-10, 5350+10, 80, 0, 30,\
				NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
					 NL80211_RRF_NO_IR)
#define ATH9K_5GHZ_5470_5850	REG_RULE(5470-10, 5850+10, 80, 0, 30,\
#define ATH9K_5GHZ_5470_5850	REG_RULE(5470-10, 5850+10, 80, 0, 30,\
				NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
					 NL80211_RRF_NO_IR)
#define ATH9K_5GHZ_5725_5850	REG_RULE(5725-10, 5850+10, 80, 0, 30,\
#define ATH9K_5GHZ_5725_5850	REG_RULE(5725-10, 5850+10, 80, 0, 30,\
				NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
					 NL80211_RRF_NO_IR)


#define ATH9K_2GHZ_ALL		ATH9K_2GHZ_CH01_11, \
#define ATH9K_2GHZ_ALL		ATH9K_2GHZ_CH01_11, \
				ATH9K_2GHZ_CH12_13, \
				ATH9K_2GHZ_CH12_13, \
@@ -223,18 +224,11 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
				 * default during init, prior to calling our
				 * default during init, prior to calling our
				 * regulatory_hint().
				 * regulatory_hint().
				 */
				 */
				if (!(reg_rule->flags &
				if (!(reg_rule->flags & NL80211_RRF_NO_IR))
				    NL80211_RRF_NO_IBSS))
					ch->flags &= ~IEEE80211_CHAN_NO_IR;
					ch->flags &=
					  ~IEEE80211_CHAN_NO_IBSS;
				if (!(reg_rule->flags &
				    NL80211_RRF_PASSIVE_SCAN))
					ch->flags &=
					  ~IEEE80211_CHAN_PASSIVE_SCAN;
			} else {
			} else {
				if (ch->beacon_found)
				if (ch->beacon_found)
					ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
					ch->flags &= ~IEEE80211_CHAN_NO_IR;
					  IEEE80211_CHAN_PASSIVE_SCAN);
			}
			}
		}
		}
	}
	}
@@ -260,11 +254,11 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
	 */
	 */
	if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
	if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
		ch = &sband->channels[11]; /* CH 12 */
		ch = &sband->channels[11]; /* CH 12 */
		if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
		if (ch->flags & IEEE80211_CHAN_NO_IR)
			ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
			ch->flags &= ~IEEE80211_CHAN_NO_IR;
		ch = &sband->channels[12]; /* CH 13 */
		ch = &sband->channels[12]; /* CH 13 */
		if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
		if (ch->flags & IEEE80211_CHAN_NO_IR)
			ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
			ch->flags &= ~IEEE80211_CHAN_NO_IR;
		return;
		return;
	}
	}


@@ -278,17 +272,17 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
	ch = &sband->channels[11]; /* CH 12 */
	ch = &sband->channels[11]; /* CH 12 */
	reg_rule = freq_reg_info(wiphy, ch->center_freq);
	reg_rule = freq_reg_info(wiphy, ch->center_freq);
	if (!IS_ERR(reg_rule)) {
	if (!IS_ERR(reg_rule)) {
		if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
		if (!(reg_rule->flags & NL80211_RRF_NO_IR))
			if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
			if (ch->flags & IEEE80211_CHAN_NO_IR)
				ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
				ch->flags &= ~IEEE80211_CHAN_NO_IR;
	}
	}


	ch = &sband->channels[12]; /* CH 13 */
	ch = &sband->channels[12]; /* CH 13 */
	reg_rule = freq_reg_info(wiphy, ch->center_freq);
	reg_rule = freq_reg_info(wiphy, ch->center_freq);
	if (!IS_ERR(reg_rule)) {
	if (!IS_ERR(reg_rule)) {
		if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
		if (!(reg_rule->flags & NL80211_RRF_NO_IR))
			if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
			if (ch->flags & IEEE80211_CHAN_NO_IR)
				ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
				ch->flags &= ~IEEE80211_CHAN_NO_IR;
	}
	}
}
}


@@ -320,8 +314,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy)
		 */
		 */
		if (!(ch->flags & IEEE80211_CHAN_DISABLED))
		if (!(ch->flags & IEEE80211_CHAN_DISABLED))
			ch->flags |= IEEE80211_CHAN_RADAR |
			ch->flags |= IEEE80211_CHAN_RADAR |
				     IEEE80211_CHAN_NO_IBSS |
				     IEEE80211_CHAN_NO_IR;
				     IEEE80211_CHAN_PASSIVE_SCAN;
	}
	}
}
}


@@ -609,7 +602,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
	const struct ieee80211_regdomain *regd;
	const struct ieee80211_regdomain *regd;


	wiphy->reg_notifier = reg_notifier;
	wiphy->reg_notifier = reg_notifier;
	wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
	wiphy->regulatory_flags |= REGULATORY_STRICT_REG;


	if (ath_is_world_regd(reg)) {
	if (ath_is_world_regd(reg)) {
		/*
		/*
@@ -617,7 +610,8 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
		 * saved on the wiphy orig_* parameters
		 * saved on the wiphy orig_* parameters
		 */
		 */
		regd = ath_world_regdomain(reg);
		regd = ath_world_regdomain(reg);
		wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
		wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG |
					   REGULATORY_COUNTRY_IE_FOLLOW_POWER;
	} else {
	} else {
		/*
		/*
		 * This gets applied in the case of the absence of CRDA,
		 * This gets applied in the case of the absence of CRDA,
+1 −1
Original line number Original line Diff line number Diff line
@@ -812,7 +812,7 @@ static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg,
			struct ieee80211_channel *chan = request->channels[i];
			struct ieee80211_channel *chan = request->channels[i];


			if (chan->flags & (IEEE80211_CHAN_RADAR |
			if (chan->flags & (IEEE80211_CHAN_RADAR |
					   IEEE80211_CHAN_PASSIVE_SCAN))
					   IEEE80211_CHAN_NO_IR))
				continue;
				continue;


			chanspecs[i] = channel_to_chanspec(&p2p->cfg->d11inf,
			chanspecs[i] = channel_to_chanspec(&p2p->cfg->d11inf,
Loading