diff options
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/fw.c')
| -rw-r--r-- | drivers/net/wireless/ath/carl9170/fw.c | 43 | 
1 files changed, 30 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index aaebecd19e5..47d5c2e910a 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c @@ -215,6 +215,24 @@ static int carl9170_fw_tx_sequence(struct ar9170 *ar)  	return 0;  } +static void carl9170_fw_set_if_combinations(struct ar9170 *ar, +					    u16 if_comb_types) +{ +	if (ar->fw.vif_num < 2) +		return; + +	ar->if_comb_limits[0].max = ar->fw.vif_num; +	ar->if_comb_limits[0].types = if_comb_types; + +	ar->if_combs[0].num_different_channels = 1; +	ar->if_combs[0].max_interfaces = ar->fw.vif_num; +	ar->if_combs[0].limits = ar->if_comb_limits; +	ar->if_combs[0].n_limits = ARRAY_SIZE(ar->if_comb_limits); + +	ar->hw->wiphy->iface_combinations = ar->if_combs; +	ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ar->if_combs); +} +  static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)  {  	const struct carl9170fw_otus_desc *otus_desc; @@ -264,7 +282,7 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)  	if (!SUPP(CARL9170FW_COMMAND_CAM)) {  		dev_info(&ar->udev->dev, "crypto offloading is disabled "  			 "by firmware.\n"); -		ar->disable_offload = true; +		ar->fw.disable_offload_fw = true;  	}  	if (SUPP(CARL9170FW_PSM) && SUPP(CARL9170FW_FIXED_5GHZ_PSM)) @@ -336,25 +354,24 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)  		if (SUPP(CARL9170FW_WLANTX_CAB)) {  			if_comb_types |=  				BIT(NL80211_IFTYPE_AP) | -				BIT(NL80211_IFTYPE_MESH_POINT) |  				BIT(NL80211_IFTYPE_P2P_GO); + +#ifdef CONFIG_MAC80211_MESH +			if_comb_types |= +				BIT(NL80211_IFTYPE_MESH_POINT); +#endif /* CONFIG_MAC80211_MESH */  		}  	} -	ar->if_comb_limits[0].max = ar->fw.vif_num; -	ar->if_comb_limits[0].types = if_comb_types; - -	ar->if_combs[0].num_different_channels = 1; -	ar->if_combs[0].max_interfaces = ar->fw.vif_num; -	ar->if_combs[0].limits = ar->if_comb_limits; -	ar->if_combs[0].n_limits = ARRAY_SIZE(ar->if_comb_limits); - -	ar->hw->wiphy->iface_combinations = ar->if_combs; -	ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ar->if_combs); +	carl9170_fw_set_if_combinations(ar, if_comb_types);  	ar->hw->wiphy->interface_modes |= if_comb_types; -	ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; +	ar->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; + +	/* As IBSS Encryption is software-based, IBSS RSN is supported. */ +	ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | +		 WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_SUPPORTS_TDLS;  #undef SUPPORTED  	return carl9170_fw_tx_sequence(ar);  |