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

Commit 471b3efd authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

mac80211: add unified BSS configuration



This patch (based on Ron Rindjunsky's) creates a framework for
a unified way to pass BSS configuration to drivers that require
the information, e.g. for implementing power save mode.

This patch introduces new ieee80211_bss_conf structure that is
passed to the driver via the new bss_info_changed() callback
when the BSS configuration changes.

This new BSS configuration infrastructure adds the following
new features:
 * drivers are notified of their association AID
 * drivers are notified of association status

and replaces the erp_ie_changed() callback. The patch also does
the relevant driver updates for the latter change.

Signed-off-by: default avatarRon Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2bc454b0
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -520,10 +520,8 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
			break;
			break;


			/*
			/*
			 * TODO: There is no callback function from upper
			 * TODO: Use the new callback function from
			 * stack to inform us when associated status. this
			 * mac80211 instead of sniffing these packets.
			 * work around to sniff assoc_resp management frame
			 * and finish the association process.
			 */
			 */
		case IEEE80211_STYPE_ASSOC_RESP:
		case IEEE80211_STYPE_ASSOC_RESP:
		case IEEE80211_STYPE_REASSOC_RESP:{
		case IEEE80211_STYPE_REASSOC_RESP:{
+2 −4
Original line number Original line Diff line number Diff line
@@ -4095,10 +4095,8 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
			break;
			break;


			/*
			/*
			 * TODO: There is no callback function from upper
			 * TODO: Use the new callback function from
			 * stack to inform us when associated status. this
			 * mac80211 instead of sniffing these packets.
			 * work around to sniff assoc_resp management frame
			 * and finish the association process.
			 */
			 */
		case IEEE80211_STYPE_ASSOC_RESP:
		case IEEE80211_STYPE_ASSOC_RESP:
		case IEEE80211_STYPE_REASSOC_RESP:
		case IEEE80211_STYPE_REASSOC_RESP:
+17 −7
Original line number Original line Diff line number Diff line
@@ -7764,25 +7764,35 @@ static void iwl4965_mac_remove_interface(struct ieee80211_hw *hw,
	IWL_DEBUG_MAC80211("leave\n");
	IWL_DEBUG_MAC80211("leave\n");


}
}
static void iwl4965_mac_erp_ie_changed(struct ieee80211_hw *hw,

		u8 changes, int cts_protection, int preamble)
static void iwl4965_bss_info_changed(struct ieee80211_hw *hw,
				     struct ieee80211_vif *vif,
				     struct ieee80211_bss_conf *bss_conf,
				     u32 changes)
{
{
	struct iwl4965_priv *priv = hw->priv;
	struct iwl4965_priv *priv = hw->priv;


	if (changes & IEEE80211_ERP_CHANGE_PREAMBLE) {
	if (changes & BSS_CHANGED_ERP_PREAMBLE) {
		if (preamble == WLAN_ERP_PREAMBLE_SHORT)
		if (bss_conf->use_short_preamble)
			priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
			priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
		else
		else
			priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
			priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
	}
	}


	if (changes & IEEE80211_ERP_CHANGE_PROTECTION) {
	if (changes & BSS_CHANGED_ERP_CTS_PROT) {
		if (cts_protection && (priv->phymode != MODE_IEEE80211A))
		if (bss_conf->use_cts_prot && (priv->phymode != MODE_IEEE80211A))
			priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
			priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
		else
		else
			priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
			priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
	}
	}


	if (changes & BSS_CHANGED_ASSOC) {
		/*
		 * TODO:
		 * do stuff instead of sniffing assoc resp
		 */
	}

	if (iwl4965_is_associated(priv))
	if (iwl4965_is_associated(priv))
		iwl4965_send_rxon_assoc(priv);
		iwl4965_send_rxon_assoc(priv);
}
}
@@ -8952,7 +8962,7 @@ static struct ieee80211_ops iwl4965_hw_ops = {
	.get_tsf = iwl4965_mac_get_tsf,
	.get_tsf = iwl4965_mac_get_tsf,
	.reset_tsf = iwl4965_mac_reset_tsf,
	.reset_tsf = iwl4965_mac_reset_tsf,
	.beacon_update = iwl4965_mac_beacon_update,
	.beacon_update = iwl4965_mac_beacon_update,
	.erp_ie_changed = iwl4965_mac_erp_ie_changed,
	.bss_info_changed = iwl4965_bss_info_changed,
#ifdef CONFIG_IWL4965_HT
#ifdef CONFIG_IWL4965_HT
	.conf_ht = iwl4965_mac_conf_ht,
	.conf_ht = iwl4965_mac_conf_ht,
	.ampdu_action = iwl4965_mac_ampdu_action,
	.ampdu_action = iwl4965_mac_ampdu_action,
+1 −1
Original line number Original line Diff line number Diff line
@@ -1524,7 +1524,7 @@ static const struct ieee80211_ops rt2400pci_mac80211_ops = {
	.configure_filter	= rt2400pci_configure_filter,
	.configure_filter	= rt2400pci_configure_filter,
	.get_stats		= rt2x00mac_get_stats,
	.get_stats		= rt2x00mac_get_stats,
	.set_retry_limit	= rt2400pci_set_retry_limit,
	.set_retry_limit	= rt2400pci_set_retry_limit,
	.erp_ie_changed		= rt2x00mac_erp_ie_changed,
	.bss_info_changed	= rt2x00mac_bss_info_changed,
	.conf_tx		= rt2400pci_conf_tx,
	.conf_tx		= rt2400pci_conf_tx,
	.get_tx_stats		= rt2x00mac_get_tx_stats,
	.get_tx_stats		= rt2x00mac_get_tx_stats,
	.get_tsf		= rt2400pci_get_tsf,
	.get_tsf		= rt2400pci_get_tsf,
+1 −1
Original line number Original line Diff line number Diff line
@@ -1835,7 +1835,7 @@ static const struct ieee80211_ops rt2500pci_mac80211_ops = {
	.configure_filter	= rt2500pci_configure_filter,
	.configure_filter	= rt2500pci_configure_filter,
	.get_stats		= rt2x00mac_get_stats,
	.get_stats		= rt2x00mac_get_stats,
	.set_retry_limit	= rt2500pci_set_retry_limit,
	.set_retry_limit	= rt2500pci_set_retry_limit,
	.erp_ie_changed		= rt2x00mac_erp_ie_changed,
	.bss_info_changed	= rt2x00mac_bss_info_changed,
	.conf_tx		= rt2x00mac_conf_tx,
	.conf_tx		= rt2x00mac_conf_tx,
	.get_tx_stats		= rt2x00mac_get_tx_stats,
	.get_tx_stats		= rt2x00mac_get_tx_stats,
	.get_tsf		= rt2500pci_get_tsf,
	.get_tsf		= rt2500pci_get_tsf,
Loading