Search Linux Wireless

RE: [PATCH] iwlwifi: dvm: Implement sta_rc_update() mac80211 callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Perform rate scaling properly when operating in an IBSS. Prior to this, the
> 5300 and 6205 devices (at least) would only transmit at
> 1 Mbps to other stations in an IBSS. This now allows transmission at HT rates.
> 
> Signed-off-by: David Ward <david.ward@xxxxxxxxxx>
> ---
>  drivers/net/wireless/iwlwifi/dvm/mac80211.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> index 47e64e8..742218d 100644
> --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
> @@ -940,6 +940,22 @@ static int iwlagn_mac_sta_state(struct
> ieee80211_hw *hw,
>  	return ret;
>  }
> 
> +static void iwlagn_mac_sta_rc_update(struct ieee80211_hw *hw,
> +				     struct ieee80211_vif *vif,
> +				     struct ieee80211_sta *sta, u32 changed) {
> +	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
> +
> +	if (!(changed & IEEE80211_RC_SUPP_RATES_CHANGED))
> +		return;
> +
> +	/* Update rate scaling */
> +	IWL_DEBUG_INFO(priv,
> +		       "Updating rate scaling for station %pM\n",
> +		       sta->addr);
> +	iwl_rs_rate_init(priv, sta, iwl_sta_id(sta)); }
> +
>  static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
>  				      struct ieee80211_vif *vif,
>  				      struct ieee80211_channel_switch
> *ch_switch) @@ -1610,6 +1626,7 @@ const struct ieee80211_ops
> iwlagn_hw_ops = {
>  	.hw_scan = iwlagn_mac_hw_scan,
>  	.sta_notify = iwlagn_mac_sta_notify,
>  	.sta_state = iwlagn_mac_sta_state,
> +	.sta_rc_update = iwlagn_mac_sta_rc_update,

Well - this would be called in other flows as well. For example, when we receive a beacon that changes the bandwidth or alike. I am not sure we want to re-init the rate scale data in this case, and more importantly, I am not sure it will not race with the tx / tx_status path that updates / uses the rate scale data.

>  	.channel_switch = iwlagn_mac_channel_switch,
>  	.flush = iwlagn_mac_flush,
>  	.tx_last_beacon = iwlagn_mac_tx_last_beacon,
> --
> 1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux