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

Commit 9b4e9e75 authored by John W. Linville's avatar John W. Linville
Browse files
parents 7a5f799b 9385d04f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
			if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
				key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
			if (key->cipher == WLAN_CIPHER_SUITE_CCMP)
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
			ret = 0;
		}
		break;
+1 −1
Original line number Diff line number Diff line
@@ -1445,7 +1445,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
				key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
			if (priv->ah->sw_mgmt_crypto &&
			    key->cipher == WLAN_CIPHER_SUITE_CCMP)
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
			ret = 0;
		}
		break;
+1 −1
Original line number Diff line number Diff line
@@ -1406,7 +1406,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
				key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
			if (sc->sc_ah->sw_mgmt_crypto &&
			    key->cipher == WLAN_CIPHER_SUITE_CCMP)
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT;
				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
			ret = 0;
		}
		break;
+1 −4
Original line number Diff line number Diff line
@@ -2056,7 +2056,7 @@ static int __init init_mac80211_hwsim(void)
	mac80211_hwsim_free();
	return err;
}

module_init(init_mac80211_hwsim);

static void __exit exit_mac80211_hwsim(void)
{
@@ -2067,7 +2067,4 @@ static void __exit exit_mac80211_hwsim(void)
	mac80211_hwsim_free();
	unregister_netdev(hwsim_mon);
}


module_init(init_mac80211_hwsim);
module_exit(exit_mac80211_hwsim);
+0 −80
Original line number Diff line number Diff line
@@ -1934,36 +1934,6 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
	return mgmt->u.action.category == WLAN_CATEGORY_PUBLIC;
}

/**
 * ieee80211_fhss_chan_to_freq - get channel frequency
 * @channel: the FHSS channel
 *
 * Convert IEEE802.11 FHSS channel to frequency (MHz)
 * Ref IEEE 802.11-2007 section 14.6
 */
static inline int ieee80211_fhss_chan_to_freq(int channel)
{
	if ((channel > 1) && (channel < 96))
		return channel + 2400;
	else
		return -1;
}

/**
 * ieee80211_freq_to_fhss_chan - get channel
 * @freq: the channels frequency
 *
 * Convert frequency (MHz) to IEEE802.11 FHSS channel
 * Ref IEEE 802.11-2007 section 14.6
 */
static inline int ieee80211_freq_to_fhss_chan(int freq)
{
	if ((freq > 2401) && (freq < 2496))
		return freq - 2400;
	else
		return -1;
}

/**
 * ieee80211_dsss_chan_to_freq - get channel center frequency
 * @channel: the DSSS channel
@@ -2000,56 +1970,6 @@ static inline int ieee80211_freq_to_dsss_chan(int freq)
		return -1;
}

/* Convert IEEE802.11 HR DSSS channel to frequency (MHz) and back
 * Ref IEEE 802.11-2007 section 18.4.6.2
 *
 * The channels and frequencies are the same as those defined for DSSS
 */
#define ieee80211_hr_chan_to_freq(chan) ieee80211_dsss_chan_to_freq(chan)
#define ieee80211_freq_to_hr_chan(freq) ieee80211_freq_to_dsss_chan(freq)

/* Convert IEEE802.11 ERP channel to frequency (MHz) and back
 * Ref IEEE 802.11-2007 section 19.4.2
 */
#define ieee80211_erp_chan_to_freq(chan) ieee80211_hr_chan_to_freq(chan)
#define ieee80211_freq_to_erp_chan(freq) ieee80211_freq_to_hr_chan(freq)

/**
 * ieee80211_ofdm_chan_to_freq - get channel center frequency
 * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz
 * @channel: the OFDM channel
 *
 * Convert IEEE802.11 OFDM channel to center frequency (MHz)
 * Ref IEEE 802.11-2007 section 17.3.8.3.2
 */
static inline int ieee80211_ofdm_chan_to_freq(int s_freq, int channel)
{
	if ((channel > 0) && (channel <= 200) &&
	    (s_freq >= 4000))
		return s_freq + (channel * 5);
	else
		return -1;
}

/**
 * ieee80211_freq_to_ofdm_channel - get channel
 * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz
 * @freq: the frequency
 *
 * Convert frequency (MHz) to IEEE802.11 OFDM channel
 * Ref IEEE 802.11-2007 section 17.3.8.3.2
 *
 * This routine selects the channel with the closest center frequency.
 */
static inline int ieee80211_freq_to_ofdm_chan(int s_freq, int freq)
{
	if ((freq > (s_freq + 2)) && (freq <= (s_freq + 1202)) &&
	    (s_freq >= 4000))
		return (freq + 2 - s_freq) / 5;
	else
		return -1;
}

/**
 * ieee80211_tu_to_usec - convert time units (TU) to microseconds
 * @tu: the TUs
Loading