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

Commit ba37a3d0 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

iwlwifi: use new mac80211 SMPS



Instead of hard-coding the SM PS mode per hardware,
this makes iwlwifi support the new mac80211 API for
controlling the SM PS mode.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 11466f13
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -174,7 +174,6 @@ struct iwl_cfg iwl1000_bgn_cfg = {
	.use_rts_for_ht = true, /* use rts/cts protection */
	.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
	.support_ct_kill_exit = true,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl1000_bg_cfg = {
+0 −1
Original line number Diff line number Diff line
@@ -2239,7 +2239,6 @@ struct iwl_cfg iwl4965_agn_cfg = {
	.broken_powersave = true,
	.led_compensation = 61,
	.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

/* Module firmware */
+0 −4
Original line number Diff line number Diff line
@@ -1600,7 +1600,6 @@ struct iwl_cfg iwl5300_agn_cfg = {
	.ht_greenfield_support = true,
	.led_compensation = 51,
	.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl5100_bgn_cfg = {
@@ -1669,7 +1668,6 @@ struct iwl_cfg iwl5100_agn_cfg = {
	.ht_greenfield_support = true,
	.led_compensation = 51,
	.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl5350_agn_cfg = {
@@ -1693,7 +1691,6 @@ struct iwl_cfg iwl5350_agn_cfg = {
	.ht_greenfield_support = true,
	.led_compensation = 51,
	.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl5150_agn_cfg = {
@@ -1717,7 +1714,6 @@ struct iwl_cfg iwl5150_agn_cfg = {
	.ht_greenfield_support = true,
	.led_compensation = 51,
	.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl5150_abg_cfg = {
+0 −3
Original line number Diff line number Diff line
@@ -307,7 +307,6 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
	.supports_idle = true,
	.adv_thermal_throttle = true,
	.support_ct_kill_exit = true,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

struct iwl_cfg iwl6000i_2abg_cfg = {
@@ -396,7 +395,6 @@ struct iwl_cfg iwl6050_2agn_cfg = {
	.supports_idle = true,
	.adv_thermal_throttle = true,
	.support_ct_kill_exit = true,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DYNAMIC,
};

struct iwl_cfg iwl6050_2abg_cfg = {
@@ -456,7 +454,6 @@ struct iwl_cfg iwl6000_3agn_cfg = {
	.supports_idle = true,
	.adv_thermal_throttle = true,
	.support_ct_kill_exit = true,
	.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
};

MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
+5 −0
Original line number Diff line number Diff line
@@ -2623,6 +2623,10 @@ static int iwl_setup_mac(struct iwl_priv *priv)
		hw->flags |= IEEE80211_HW_SUPPORTS_PS |
			     IEEE80211_HW_SUPPORTS_DYNAMIC_PS;

	if (priv->cfg->sku & IWL_SKU_N)
		hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
			     IEEE80211_HW_SUPPORTS_STATIC_SMPS;

	hw->sta_data_size = sizeof(struct iwl_station_priv);
	hw->wiphy->interface_modes =
		BIT(NL80211_IFTYPE_STATION) |
@@ -3361,6 +3365,7 @@ static int iwl_init_drv(struct iwl_priv *priv)
	priv->band = IEEE80211_BAND_2GHZ;

	priv->iw_mode = NL80211_IFTYPE_STATION;
	priv->current_ht_config.smps = IEEE80211_SMPS_STATIC;

	/* Choose which receivers/antennas to use */
	if (priv->cfg->ops->hcmd->set_rxon_chain)
Loading