All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-03-08 17:40 ` M. A.
  0 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-03-08 17:40 UTC (permalink / raw)
  To: ath9k-devel

Hi all,

My question is how can I modify Minstrel HT rate control to be able to
override it (by a boolean or otherwise) to select an MCS or specific
rate index from user space (such that once set it driver will only try
sending at that rate until unset then driver will resort back to
Minstrel RC).

I have been able to change other kernel parameters at runtime(echo
/sys/kernel/debug/ieee80211/...) by passing them through (fops) to
DebugFs. however I am unsure of what parameters to pass through in the
case of MCS rate fixing and what modifications to the code are
required to achieve this.


Also I have been told that these sections of code facilitate the
masking of rates;

=========================================================================
include/net/cfg80211.h: cfg80211_bitrate_mask
-------------------------------------------------------------------------------------------------------
/*
 * cfg80211_bitrate_mask - masks for bitrate control
 */
struct cfg80211_bitrate_mask {
	struct {
		u32 legacy;
		/* TODO: add support for masking MCS rates; e.g.: */
		/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
	} control[IEEE80211_NUM_BANDS];
};
-------------------------------------------------------------------------------------------------------
net/mac80211/cfg.c ieee80211_set_bitrate_mask
-------------------------------------------------------------------------------------------------------
static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
				      struct net_device *dev,
				      const u8 *addr,
				      const struct cfg80211_bitrate_mask *mask)
{
	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
	int i;

	/*
	 * This _could_ be supported by providing a hook for
	 * drivers for this function, but at this point it
	 * doesn't seem worth bothering.
	 */
	if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
		return -EOPNOTSUPP;


	for (i = 0; i < IEEE80211_NUM_BANDS; i++)
		sdata->rc_rateidx_mask[i] = mask->control[i].legacy;

	return 0;
}
-------------------------------------------------------------------------------------------------------
net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
-------------------------------------------------------------------------------------------------------
static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
				       struct genl_info *info)
{
	struct nlattr *tb[NL80211_TXRATE_MAX + 1];
	struct cfg80211_registered_device *rdev = info->user_ptr[0];
	struct cfg80211_bitrate_mask mask;
	int rem, i;
	struct net_device *dev = info->user_ptr[1];
	struct nlattr *tx_rates;
	struct ieee80211_supported_band *sband;

	if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
		return -EINVAL;

	if (!rdev->ops->set_bitrate_mask)
		return -EOPNOTSUPP;

	memset(&mask, 0, sizeof(mask));
	/* Default to all rates enabled */
	for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
		sband = rdev->wiphy.bands[i];
		mask.control[i].legacy =
			sband ? (1 << sband->n_bitrates) - 1 : 0;
	}

	/*
	 * The nested attribute uses enum nl80211_band as the index. This maps
	 * directly to the enum ieee80211_band values used in cfg80211.
	 */
	nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
	{
		enum ieee80211_band band = nla_type(tx_rates);
		if (band < 0 || band >= IEEE80211_NUM_BANDS)
			return -EINVAL;
		sband = rdev->wiphy.bands[band];
		if (sband == NULL)
			return -EINVAL;
		nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
			  nla_len(tx_rates), nl80211_txattr_policy);
		if (tb[NL80211_TXRATE_LEGACY]) {
			mask.control[band].legacy = rateset_to_mask(
				sband,
				nla_data(tb[NL80211_TXRATE_LEGACY]),
				nla_len(tb[NL80211_TXRATE_LEGACY]));
			if (mask.control[band].legacy == 0)
				return -EINVAL;
		}
	}

	return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
}
====================================================================================================================


Any help is much appreciated!

Thank you all very much

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-03-08 17:40 ` M. A.
  0 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-03-08 17:40 UTC (permalink / raw)
  To: ath9k-devel, linux-wireless

Hi all,

My question is how can I modify Minstrel HT rate control to be able to
override it (by a boolean or otherwise) to select an MCS or specific
rate index from user space (such that once set it driver will only try
sending at that rate until unset then driver will resort back to
Minstrel RC).

I have been able to change other kernel parameters at runtime(echo
/sys/kernel/debug/ieee80211/...) by passing them through (fops) to
DebugFs. however I am unsure of what parameters to pass through in the
case of MCS rate fixing and what modifications to the code are
required to achieve this.


Also I have been told that these sections of code facilitate the
masking of rates;

=========================================================================
include/net/cfg80211.h: cfg80211_bitrate_mask
-------------------------------------------------------------------------------------------------------
/*
 * cfg80211_bitrate_mask - masks for bitrate control
 */
struct cfg80211_bitrate_mask {
	struct {
		u32 legacy;
		/* TODO: add support for masking MCS rates; e.g.: */
		/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
	} control[IEEE80211_NUM_BANDS];
};
-------------------------------------------------------------------------------------------------------
net/mac80211/cfg.c ieee80211_set_bitrate_mask
-------------------------------------------------------------------------------------------------------
static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
				      struct net_device *dev,
				      const u8 *addr,
				      const struct cfg80211_bitrate_mask *mask)
{
	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
	int i;

	/*
	 * This _could_ be supported by providing a hook for
	 * drivers for this function, but at this point it
	 * doesn't seem worth bothering.
	 */
	if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
		return -EOPNOTSUPP;


	for (i = 0; i < IEEE80211_NUM_BANDS; i++)
		sdata->rc_rateidx_mask[i] = mask->control[i].legacy;

	return 0;
}
-------------------------------------------------------------------------------------------------------
net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
-------------------------------------------------------------------------------------------------------
static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
				       struct genl_info *info)
{
	struct nlattr *tb[NL80211_TXRATE_MAX + 1];
	struct cfg80211_registered_device *rdev = info->user_ptr[0];
	struct cfg80211_bitrate_mask mask;
	int rem, i;
	struct net_device *dev = info->user_ptr[1];
	struct nlattr *tx_rates;
	struct ieee80211_supported_band *sband;

	if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
		return -EINVAL;

	if (!rdev->ops->set_bitrate_mask)
		return -EOPNOTSUPP;

	memset(&mask, 0, sizeof(mask));
	/* Default to all rates enabled */
	for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
		sband = rdev->wiphy.bands[i];
		mask.control[i].legacy =
			sband ? (1 << sband->n_bitrates) - 1 : 0;
	}

	/*
	 * The nested attribute uses enum nl80211_band as the index. This maps
	 * directly to the enum ieee80211_band values used in cfg80211.
	 */
	nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
	{
		enum ieee80211_band band = nla_type(tx_rates);
		if (band < 0 || band >= IEEE80211_NUM_BANDS)
			return -EINVAL;
		sband = rdev->wiphy.bands[band];
		if (sband == NULL)
			return -EINVAL;
		nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
			  nla_len(tx_rates), nl80211_txattr_policy);
		if (tb[NL80211_TXRATE_LEGACY]) {
			mask.control[band].legacy = rateset_to_mask(
				sband,
				nla_data(tb[NL80211_TXRATE_LEGACY]),
				nla_len(tb[NL80211_TXRATE_LEGACY]));
			if (mask.control[band].legacy == 0)
				return -EINVAL;
		}
	}

	return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
}
====================================================================================================================


Any help is much appreciated!

Thank you all very much

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-03-08 17:40 ` M. A.
@ 2011-03-14 17:11   ` M. A.
  -1 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-03-14 17:11 UTC (permalink / raw)
  To: ath9k-devel

Dear all,
I would appreciate if anyone can help me with my previous query as
soon as possible.

Thanks

On Tue, Mar 8, 2011 at 5:40 PM, M. A. <jdiq123@googlemail.com> wrote:
> Hi all,
>
> My question is how can I modify Minstrel HT rate control to be able to
> override it (by a boolean or otherwise) to select an MCS or specific
> rate index from user space (such that once set it driver will only try
> sending at that rate until unset then driver will resort back to
> Minstrel RC).
>
> I have been able to change other kernel parameters at runtime(echo
> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
> DebugFs. however I am unsure of what parameters to pass through in the
> case of MCS rate fixing and what modifications to the code are
> required to achieve this.
>
>
> Also I have been told that these sections of code facilitate the
> masking of rates;
>
> =========================================================================
> include/net/cfg80211.h: cfg80211_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> /*
> ?* cfg80211_bitrate_mask - masks for bitrate control
> ?*/
> struct cfg80211_bitrate_mask {
> ? ? ? ?struct {
> ? ? ? ? ? ? ? ?u32 legacy;
> ? ? ? ? ? ? ? ?/* TODO: add support for masking MCS rates; e.g.: */
> ? ? ? ? ? ? ? ?/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
> ? ? ? ?} control[IEEE80211_NUM_BANDS];
> };
> -------------------------------------------------------------------------------------------------------
> net/mac80211/cfg.c ieee80211_set_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct net_device *dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const u8 *addr,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const struct cfg80211_bitrate_mask *mask)
> {
> ? ? ? ?struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> ? ? ? ?struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> ? ? ? ?int i;
>
> ? ? ? ?/*
> ? ? ? ? * This _could_ be supported by providing a hook for
> ? ? ? ? * drivers for this function, but at this point it
> ? ? ? ? * doesn't seem worth bothering.
> ? ? ? ? */
> ? ? ? ?if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>
>
> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++)
> ? ? ? ? ? ? ? ?sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>
> ? ? ? ?return 0;
> }
> -------------------------------------------------------------------------------------------------------
> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct genl_info *info)
> {
> ? ? ? ?struct nlattr *tb[NL80211_TXRATE_MAX + 1];
> ? ? ? ?struct cfg80211_registered_device *rdev = info->user_ptr[0];
> ? ? ? ?struct cfg80211_bitrate_mask mask;
> ? ? ? ?int rem, i;
> ? ? ? ?struct net_device *dev = info->user_ptr[1];
> ? ? ? ?struct nlattr *tx_rates;
> ? ? ? ?struct ieee80211_supported_band *sband;
>
> ? ? ? ?if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
> ? ? ? ? ? ? ? ?return -EINVAL;
>
> ? ? ? ?if (!rdev->ops->set_bitrate_mask)
> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>
> ? ? ? ?memset(&mask, 0, sizeof(mask));
> ? ? ? ?/* Default to all rates enabled */
> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[i];
> ? ? ? ? ? ? ? ?mask.control[i].legacy =
> ? ? ? ? ? ? ? ? ? ? ? ?sband ? (1 << sband->n_bitrates) - 1 : 0;
> ? ? ? ?}
>
> ? ? ? ?/*
> ? ? ? ? * The nested attribute uses enum nl80211_band as the index. This maps
> ? ? ? ? * directly to the enum ieee80211_band values used in cfg80211.
> ? ? ? ? */
> ? ? ? ?nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
> ? ? ? ?{
> ? ? ? ? ? ? ? ?enum ieee80211_band band = nla_type(tx_rates);
> ? ? ? ? ? ? ? ?if (band < 0 || band >= IEEE80211_NUM_BANDS)
> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[band];
> ? ? ? ? ? ? ? ?if (sband == NULL)
> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
> ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tx_rates), nl80211_txattr_policy);
> ? ? ? ? ? ? ? ?if (tb[NL80211_TXRATE_LEGACY]) {
> ? ? ? ? ? ? ? ? ? ? ? ?mask.control[band].legacy = rateset_to_mask(
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_data(tb[NL80211_TXRATE_LEGACY]),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tb[NL80211_TXRATE_LEGACY]));
> ? ? ? ? ? ? ? ? ? ? ? ?if (mask.control[band].legacy == 0)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?}
> ? ? ? ?}
>
> ? ? ? ?return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
> }
> ====================================================================================================================
>
>
> Any help is much appreciated!
>
> Thank you all very much
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-03-14 17:11   ` M. A.
  0 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-03-14 17:11 UTC (permalink / raw)
  To: ath9k-devel, linux-wireless

Dear all,
I would appreciate if anyone can help me with my previous query as
soon as possible.

Thanks

On Tue, Mar 8, 2011 at 5:40 PM, M. A. <jdiq123@googlemail.com> wrote:
> Hi all,
>
> My question is how can I modify Minstrel HT rate control to be able to
> override it (by a boolean or otherwise) to select an MCS or specific
> rate index from user space (such that once set it driver will only try
> sending at that rate until unset then driver will resort back to
> Minstrel RC).
>
> I have been able to change other kernel parameters at runtime(echo
> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
> DebugFs. however I am unsure of what parameters to pass through in the
> case of MCS rate fixing and what modifications to the code are
> required to achieve this.
>
>
> Also I have been told that these sections of code facilitate the
> masking of rates;
>
> =========================================================================
> include/net/cfg80211.h: cfg80211_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> /*
>  * cfg80211_bitrate_mask - masks for bitrate control
>  */
> struct cfg80211_bitrate_mask {
>        struct {
>                u32 legacy;
>                /* TODO: add support for masking MCS rates; e.g.: */
>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>        } control[IEEE80211_NUM_BANDS];
> };
> -------------------------------------------------------------------------------------------------------
> net/mac80211/cfg.c ieee80211_set_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>                                      struct net_device *dev,
>                                      const u8 *addr,
>                                      const struct cfg80211_bitrate_mask *mask)
> {
>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>        int i;
>
>        /*
>         * This _could_ be supported by providing a hook for
>         * drivers for this function, but at this point it
>         * doesn't seem worth bothering.
>         */
>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>                return -EOPNOTSUPP;
>
>
>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>
>        return 0;
> }
> -------------------------------------------------------------------------------------------------------
> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>                                       struct genl_info *info)
> {
>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>        struct cfg80211_bitrate_mask mask;
>        int rem, i;
>        struct net_device *dev = info->user_ptr[1];
>        struct nlattr *tx_rates;
>        struct ieee80211_supported_band *sband;
>
>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>                return -EINVAL;
>
>        if (!rdev->ops->set_bitrate_mask)
>                return -EOPNOTSUPP;
>
>        memset(&mask, 0, sizeof(mask));
>        /* Default to all rates enabled */
>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>                sband = rdev->wiphy.bands[i];
>                mask.control[i].legacy =
>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>        }
>
>        /*
>         * The nested attribute uses enum nl80211_band as the index. This maps
>         * directly to the enum ieee80211_band values used in cfg80211.
>         */
>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>        {
>                enum ieee80211_band band = nla_type(tx_rates);
>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>                        return -EINVAL;
>                sband = rdev->wiphy.bands[band];
>                if (sband == NULL)
>                        return -EINVAL;
>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>                          nla_len(tx_rates), nl80211_txattr_policy);
>                if (tb[NL80211_TXRATE_LEGACY]) {
>                        mask.control[band].legacy = rateset_to_mask(
>                                sband,
>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>                        if (mask.control[band].legacy == 0)
>                                return -EINVAL;
>                }
>        }
>
>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
> }
> ====================================================================================================================
>
>
> Any help is much appreciated!
>
> Thank you all very much
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-03-08 17:40 ` M. A.
@ 2011-03-15  5:02   ` Mohammed Shafi
  -1 siblings, 0 replies; 15+ messages in thread
From: Mohammed Shafi @ 2011-03-15  5:02 UTC (permalink / raw)
  To: ath9k-devel

On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
> Hi all,
>
> My question is how can I modify Minstrel HT rate control to be able to
> override it (by a boolean or otherwise) to select an MCS or specific
> rate index from user space (such that once set it driver will only try
> sending at that rate until unset then driver will resort back to
> Minstrel RC).

I don't think we can fix the MCS rate index from user space, may be we
need a hack.
iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
and this is only for legacy rates.


>
> I have been able to change other kernel parameters at runtime(echo
> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
> DebugFs. however I am unsure of what parameters to pass through in the
> case of MCS rate fixing and what modifications to the code are
> required to achieve this.

don't know and I am not sure whether this can be easily done.

>
>
> Also I have been told that these sections of code facilitate the
> masking of rates;
>
> =========================================================================
> include/net/cfg80211.h: cfg80211_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> /*
> ?* cfg80211_bitrate_mask - masks for bitrate control
> ?*/
> struct cfg80211_bitrate_mask {
> ? ? ? ?struct {
> ? ? ? ? ? ? ? ?u32 legacy;
> ? ? ? ? ? ? ? ?/* TODO: add support for masking MCS rates; e.g.: */
> ? ? ? ? ? ? ? ?/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
> ? ? ? ?} control[IEEE80211_NUM_BANDS];
> };
> -------------------------------------------------------------------------------------------------------
> net/mac80211/cfg.c ieee80211_set_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct net_device *dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const u8 *addr,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const struct cfg80211_bitrate_mask *mask)
> {
> ? ? ? ?struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> ? ? ? ?struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> ? ? ? ?int i;
>
> ? ? ? ?/*
> ? ? ? ? * This _could_ be supported by providing a hook for
> ? ? ? ? * drivers for this function, but at this point it
> ? ? ? ? * doesn't seem worth bothering.
> ? ? ? ? */
> ? ? ? ?if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>
>
> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++)
> ? ? ? ? ? ? ? ?sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>
> ? ? ? ?return 0;
> }
> -------------------------------------------------------------------------------------------------------
> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct genl_info *info)
> {
> ? ? ? ?struct nlattr *tb[NL80211_TXRATE_MAX + 1];
> ? ? ? ?struct cfg80211_registered_device *rdev = info->user_ptr[0];
> ? ? ? ?struct cfg80211_bitrate_mask mask;
> ? ? ? ?int rem, i;
> ? ? ? ?struct net_device *dev = info->user_ptr[1];
> ? ? ? ?struct nlattr *tx_rates;
> ? ? ? ?struct ieee80211_supported_band *sband;
>
> ? ? ? ?if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
> ? ? ? ? ? ? ? ?return -EINVAL;
>
> ? ? ? ?if (!rdev->ops->set_bitrate_mask)
> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>
> ? ? ? ?memset(&mask, 0, sizeof(mask));
> ? ? ? ?/* Default to all rates enabled */
> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[i];
> ? ? ? ? ? ? ? ?mask.control[i].legacy =
> ? ? ? ? ? ? ? ? ? ? ? ?sband ? (1 << sband->n_bitrates) - 1 : 0;
> ? ? ? ?}
>
> ? ? ? ?/*
> ? ? ? ? * The nested attribute uses enum nl80211_band as the index. This maps
> ? ? ? ? * directly to the enum ieee80211_band values used in cfg80211.
> ? ? ? ? */
> ? ? ? ?nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
> ? ? ? ?{
> ? ? ? ? ? ? ? ?enum ieee80211_band band = nla_type(tx_rates);
> ? ? ? ? ? ? ? ?if (band < 0 || band >= IEEE80211_NUM_BANDS)
> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[band];
> ? ? ? ? ? ? ? ?if (sband == NULL)
> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
> ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tx_rates), nl80211_txattr_policy);
> ? ? ? ? ? ? ? ?if (tb[NL80211_TXRATE_LEGACY]) {
> ? ? ? ? ? ? ? ? ? ? ? ?mask.control[band].legacy = rateset_to_mask(
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_data(tb[NL80211_TXRATE_LEGACY]),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tb[NL80211_TXRATE_LEGACY]));
> ? ? ? ? ? ? ? ? ? ? ? ?if (mask.control[band].legacy == 0)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
> ? ? ? ? ? ? ? ?}
> ? ? ? ?}
>
> ? ? ? ?return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
> }

As you see everything is for legacy thing and for MCS it's a TODO section.

> ====================================================================================================================
>
>
> Any help is much appreciated!
>
> Thank you all very much
> _______________________________________________
> ath9k-devel mailing list
> ath9k-devel at lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-03-15  5:02   ` Mohammed Shafi
  0 siblings, 0 replies; 15+ messages in thread
From: Mohammed Shafi @ 2011-03-15  5:02 UTC (permalink / raw)
  To: M. A.; +Cc: ath9k-devel, linux-wireless

On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
> Hi all,
>
> My question is how can I modify Minstrel HT rate control to be able to
> override it (by a boolean or otherwise) to select an MCS or specific
> rate index from user space (such that once set it driver will only try
> sending at that rate until unset then driver will resort back to
> Minstrel RC).

I don't think we can fix the MCS rate index from user space, may be we
need a hack.
iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
and this is only for legacy rates.


>
> I have been able to change other kernel parameters at runtime(echo
> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
> DebugFs. however I am unsure of what parameters to pass through in the
> case of MCS rate fixing and what modifications to the code are
> required to achieve this.

don't know and I am not sure whether this can be easily done.

>
>
> Also I have been told that these sections of code facilitate the
> masking of rates;
>
> =========================================================================
> include/net/cfg80211.h: cfg80211_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> /*
>  * cfg80211_bitrate_mask - masks for bitrate control
>  */
> struct cfg80211_bitrate_mask {
>        struct {
>                u32 legacy;
>                /* TODO: add support for masking MCS rates; e.g.: */
>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>        } control[IEEE80211_NUM_BANDS];
> };
> -------------------------------------------------------------------------------------------------------
> net/mac80211/cfg.c ieee80211_set_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>                                      struct net_device *dev,
>                                      const u8 *addr,
>                                      const struct cfg80211_bitrate_mask *mask)
> {
>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>        int i;
>
>        /*
>         * This _could_ be supported by providing a hook for
>         * drivers for this function, but at this point it
>         * doesn't seem worth bothering.
>         */
>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>                return -EOPNOTSUPP;
>
>
>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>
>        return 0;
> }
> -------------------------------------------------------------------------------------------------------
> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
> -------------------------------------------------------------------------------------------------------
> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>                                       struct genl_info *info)
> {
>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>        struct cfg80211_bitrate_mask mask;
>        int rem, i;
>        struct net_device *dev = info->user_ptr[1];
>        struct nlattr *tx_rates;
>        struct ieee80211_supported_band *sband;
>
>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>                return -EINVAL;
>
>        if (!rdev->ops->set_bitrate_mask)
>                return -EOPNOTSUPP;
>
>        memset(&mask, 0, sizeof(mask));
>        /* Default to all rates enabled */
>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>                sband = rdev->wiphy.bands[i];
>                mask.control[i].legacy =
>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>        }
>
>        /*
>         * The nested attribute uses enum nl80211_band as the index. This maps
>         * directly to the enum ieee80211_band values used in cfg80211.
>         */
>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>        {
>                enum ieee80211_band band = nla_type(tx_rates);
>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>                        return -EINVAL;
>                sband = rdev->wiphy.bands[band];
>                if (sband == NULL)
>                        return -EINVAL;
>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>                          nla_len(tx_rates), nl80211_txattr_policy);
>                if (tb[NL80211_TXRATE_LEGACY]) {
>                        mask.control[band].legacy = rateset_to_mask(
>                                sband,
>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>                        if (mask.control[band].legacy == 0)
>                                return -EINVAL;
>                }
>        }
>
>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
> }

As you see everything is for legacy thing and for MCS it's a TODO section.

> ====================================================================================================================
>
>
> Any help is much appreciated!
>
> Thank you all very much
> _______________________________________________
> ath9k-devel mailing list
> ath9k-devel@lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-03-15  5:02   ` Mohammed Shafi
@ 2011-04-07 21:56     ` M. A.
  -1 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-04-07 21:56 UTC (permalink / raw)
  To: ath9k-devel

Dear all,
Can anyone help in fixing/ overriding MCS rates as described above,


Thank you all!

On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>> Hi all,
>>
>> My question is how can I modify Minstrel HT rate control to be able to
>> override it (by a boolean or otherwise) to select an MCS or specific
>> rate index from user space (such that once set it driver will only try
>> sending at that rate until unset then driver will resort back to
>> Minstrel RC).
>
> I don't think we can fix the MCS rate index from user space, may be we
> need a hack.
> iw ?dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
> and this is only for legacy rates.
>
>
>>
>> I have been able to change other kernel parameters at runtime(echo
>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>> DebugFs. however I am unsure of what parameters to pass through in the
>> case of MCS rate fixing and what modifications to the code are
>> required to achieve this.
>
> don't know and I am not sure whether this can be easily done.
>
>>
>>
>> Also I have been told that these sections of code facilitate the
>> masking of rates;
>>
>> =========================================================================
>> include/net/cfg80211.h: cfg80211_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> /*
>> ?* cfg80211_bitrate_mask - masks for bitrate control
>> ?*/
>> struct cfg80211_bitrate_mask {
>> ? ? ? ?struct {
>> ? ? ? ? ? ? ? ?u32 legacy;
>> ? ? ? ? ? ? ? ?/* TODO: add support for masking MCS rates; e.g.: */
>> ? ? ? ? ? ? ? ?/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>> ? ? ? ?} control[IEEE80211_NUM_BANDS];
>> };
>> -------------------------------------------------------------------------------------------------------
>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct net_device *dev,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const u8 *addr,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const struct cfg80211_bitrate_mask *mask)
>> {
>> ? ? ? ?struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>> ? ? ? ?struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>> ? ? ? ?int i;
>>
>> ? ? ? ?/*
>> ? ? ? ? * This _could_ be supported by providing a hook for
>> ? ? ? ? * drivers for this function, but at this point it
>> ? ? ? ? * doesn't seem worth bothering.
>> ? ? ? ? */
>> ? ? ? ?if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>
>>
>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>> ? ? ? ? ? ? ? ?sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>
>> ? ? ? ?return 0;
>> }
>> -------------------------------------------------------------------------------------------------------
>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct genl_info *info)
>> {
>> ? ? ? ?struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>> ? ? ? ?struct cfg80211_registered_device *rdev = info->user_ptr[0];
>> ? ? ? ?struct cfg80211_bitrate_mask mask;
>> ? ? ? ?int rem, i;
>> ? ? ? ?struct net_device *dev = info->user_ptr[1];
>> ? ? ? ?struct nlattr *tx_rates;
>> ? ? ? ?struct ieee80211_supported_band *sband;
>>
>> ? ? ? ?if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>> ? ? ? ? ? ? ? ?return -EINVAL;
>>
>> ? ? ? ?if (!rdev->ops->set_bitrate_mask)
>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>
>> ? ? ? ?memset(&mask, 0, sizeof(mask));
>> ? ? ? ?/* Default to all rates enabled */
>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[i];
>> ? ? ? ? ? ? ? ?mask.control[i].legacy =
>> ? ? ? ? ? ? ? ? ? ? ? ?sband ? (1 << sband->n_bitrates) - 1 : 0;
>> ? ? ? ?}
>>
>> ? ? ? ?/*
>> ? ? ? ? * The nested attribute uses enum nl80211_band as the index. This maps
>> ? ? ? ? * directly to the enum ieee80211_band values used in cfg80211.
>> ? ? ? ? */
>> ? ? ? ?nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>> ? ? ? ?{
>> ? ? ? ? ? ? ? ?enum ieee80211_band band = nla_type(tx_rates);
>> ? ? ? ? ? ? ? ?if (band < 0 || band >= IEEE80211_NUM_BANDS)
>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[band];
>> ? ? ? ? ? ? ? ?if (sband == NULL)
>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>> ? ? ? ? ? ? ? ?nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>> ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tx_rates), nl80211_txattr_policy);
>> ? ? ? ? ? ? ? ?if (tb[NL80211_TXRATE_LEGACY]) {
>> ? ? ? ? ? ? ? ? ? ? ? ?mask.control[band].legacy = rateset_to_mask(
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_data(tb[NL80211_TXRATE_LEGACY]),
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tb[NL80211_TXRATE_LEGACY]));
>> ? ? ? ? ? ? ? ? ? ? ? ?if (mask.control[band].legacy == 0)
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>> ? ? ? ? ? ? ? ?}
>> ? ? ? ?}
>>
>> ? ? ? ?return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>> }
>
> As you see everything is for legacy thing and for MCS it's a TODO section.
>
>> ====================================================================================================================
>>
>>
>> Any help is much appreciated!
>>
>> Thank you all very much
>> _______________________________________________
>> ath9k-devel mailing list
>> ath9k-devel at lists.ath9k.org
>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-04-07 21:56     ` M. A.
  0 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-04-07 21:56 UTC (permalink / raw)
  To: ath9k-devel, linux-wireless

Dear all,
Can anyone help in fixing/ overriding MCS rates as described above,


Thank you all!

On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>> Hi all,
>>
>> My question is how can I modify Minstrel HT rate control to be able to
>> override it (by a boolean or otherwise) to select an MCS or specific
>> rate index from user space (such that once set it driver will only try
>> sending at that rate until unset then driver will resort back to
>> Minstrel RC).
>
> I don't think we can fix the MCS rate index from user space, may be we
> need a hack.
> iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
> and this is only for legacy rates.
>
>
>>
>> I have been able to change other kernel parameters at runtime(echo
>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>> DebugFs. however I am unsure of what parameters to pass through in the
>> case of MCS rate fixing and what modifications to the code are
>> required to achieve this.
>
> don't know and I am not sure whether this can be easily done.
>
>>
>>
>> Also I have been told that these sections of code facilitate the
>> masking of rates;
>>
>> =========================================================================
>> include/net/cfg80211.h: cfg80211_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> /*
>>  * cfg80211_bitrate_mask - masks for bitrate control
>>  */
>> struct cfg80211_bitrate_mask {
>>        struct {
>>                u32 legacy;
>>                /* TODO: add support for masking MCS rates; e.g.: */
>>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>        } control[IEEE80211_NUM_BANDS];
>> };
>> -------------------------------------------------------------------------------------------------------
>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>                                      struct net_device *dev,
>>                                      const u8 *addr,
>>                                      const struct cfg80211_bitrate_mask *mask)
>> {
>>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>        int i;
>>
>>        /*
>>         * This _could_ be supported by providing a hook for
>>         * drivers for this function, but at this point it
>>         * doesn't seem worth bothering.
>>         */
>>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>                return -EOPNOTSUPP;
>>
>>
>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>
>>        return 0;
>> }
>> -------------------------------------------------------------------------------------------------------
>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>> -------------------------------------------------------------------------------------------------------
>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>                                       struct genl_info *info)
>> {
>>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>        struct cfg80211_bitrate_mask mask;
>>        int rem, i;
>>        struct net_device *dev = info->user_ptr[1];
>>        struct nlattr *tx_rates;
>>        struct ieee80211_supported_band *sband;
>>
>>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>                return -EINVAL;
>>
>>        if (!rdev->ops->set_bitrate_mask)
>>                return -EOPNOTSUPP;
>>
>>        memset(&mask, 0, sizeof(mask));
>>        /* Default to all rates enabled */
>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>                sband = rdev->wiphy.bands[i];
>>                mask.control[i].legacy =
>>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>>        }
>>
>>        /*
>>         * The nested attribute uses enum nl80211_band as the index. This maps
>>         * directly to the enum ieee80211_band values used in cfg80211.
>>         */
>>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>>        {
>>                enum ieee80211_band band = nla_type(tx_rates);
>>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>                        return -EINVAL;
>>                sband = rdev->wiphy.bands[band];
>>                if (sband == NULL)
>>                        return -EINVAL;
>>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>                          nla_len(tx_rates), nl80211_txattr_policy);
>>                if (tb[NL80211_TXRATE_LEGACY]) {
>>                        mask.control[band].legacy = rateset_to_mask(
>>                                sband,
>>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>>                        if (mask.control[band].legacy == 0)
>>                                return -EINVAL;
>>                }
>>        }
>>
>>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>> }
>
> As you see everything is for legacy thing and for MCS it's a TODO section.
>
>> ====================================================================================================================
>>
>>
>> Any help is much appreciated!
>>
>> Thank you all very much
>> _______________________________________________
>> ath9k-devel mailing list
>> ath9k-devel@lists.ath9k.org
>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-04-08 20:25 Eduard GV
  0 siblings, 0 replies; 15+ messages in thread
From: Eduard GV @ 2011-04-08 20:25 UTC (permalink / raw)
  To: ath9k-devel

Long time ago MCS could be set through debugfs file mcs-rate
[lrodriguez09], e.g.:

echo 15 >  /sys/kernel/debug/ath9k/phy0/mcs-rate

to set MCS 15. However, with latest versions, I'm not able to find a
similar way. Is there?

[lrodriguez09]:
https://lists.ath9k.org/pipermail/ath9k-devel/2009-September/002475.html

On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
> Hi all,
>
> My question is how can I modify Minstrel HT rate control to be able to
> override it (by a boolean or otherwise) to select an MCS or specific
> rate index from user space (such that once set it driver will only try
> sending at that rate until unset then driver will resort back to
> Minstrel RC).

I don't think we can fix the MCS rate index from user space, may be we
need a hack.
iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
and this is only for legacy rates.


>
> I have been able to change other kernel parameters at runtime(echo
> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
> DebugFs. however I am unsure of what parameters to pass through in the
> case of MCS rate fixing and what modifications to the code are
> required to achieve this.

don't know and I am not sure whether this can be easily done.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-04-07 21:56     ` M. A.
@ 2011-05-31 17:06       ` M. A.
  -1 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-05-31 17:06 UTC (permalink / raw)
  To: ath9k-devel

Hi all,

I would be grateful if anyone can advise on setting/masking a fixed
MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
rates..

If this is not yet implemented, can anyone please advise on how to
implement this as I am in urgent need of this functionality.

Thank you all in advance!


> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>> Hi all,
>>>
>>> My question is how can I modify Minstrel HT rate control to be able to
>>> override it (by a boolean or otherwise) to select an MCS or specific
>>> rate index from user space (such that once set it driver will only try
>>> sending at that rate until unset then driver will resort back to
>>> Minstrel RC).
>>
>> I don't think we can fix the MCS rate index from user space, may be we
>> need a hack.
>> iw ?dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>> and this is only for legacy rates.
>>
>>
>>>
>>> I have been able to change other kernel parameters at runtime(echo
>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>> DebugFs. however I am unsure of what parameters to pass through in the
>>> case of MCS rate fixing and what modifications to the code are
>>> required to achieve this.
>>
>> don't know and I am not sure whether this can be easily done.
>>
>>>
>>>
>>> Also I have been told that these sections of code facilitate the
>>> masking of rates;
>>>
>>> =========================================================================
>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> /*
>>> ?* cfg80211_bitrate_mask - masks for bitrate control
>>> ?*/
>>> struct cfg80211_bitrate_mask {
>>> ? ? ? ?struct {
>>> ? ? ? ? ? ? ? ?u32 legacy;
>>> ? ? ? ? ? ? ? ?/* TODO: add support for masking MCS rates; e.g.: */
>>> ? ? ? ? ? ? ? ?/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>> ? ? ? ?} control[IEEE80211_NUM_BANDS];
>>> };
>>> -------------------------------------------------------------------------------------------------------
>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct net_device *dev,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const u8 *addr,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const struct cfg80211_bitrate_mask *mask)
>>> {
>>> ? ? ? ?struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>>> ? ? ? ?struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>> ? ? ? ?int i;
>>>
>>> ? ? ? ?/*
>>> ? ? ? ? * This _could_ be supported by providing a hook for
>>> ? ? ? ? * drivers for this function, but at this point it
>>> ? ? ? ? * doesn't seem worth bothering.
>>> ? ? ? ? */
>>> ? ? ? ?if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>>
>>>
>>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>> ? ? ? ? ? ? ? ?sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>
>>> ? ? ? ?return 0;
>>> }
>>> -------------------------------------------------------------------------------------------------------
>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct genl_info *info)
>>> {
>>> ? ? ? ?struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>> ? ? ? ?struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>> ? ? ? ?struct cfg80211_bitrate_mask mask;
>>> ? ? ? ?int rem, i;
>>> ? ? ? ?struct net_device *dev = info->user_ptr[1];
>>> ? ? ? ?struct nlattr *tx_rates;
>>> ? ? ? ?struct ieee80211_supported_band *sband;
>>>
>>> ? ? ? ?if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>> ? ? ? ? ? ? ? ?return -EINVAL;
>>>
>>> ? ? ? ?if (!rdev->ops->set_bitrate_mask)
>>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>>
>>> ? ? ? ?memset(&mask, 0, sizeof(mask));
>>> ? ? ? ?/* Default to all rates enabled */
>>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[i];
>>> ? ? ? ? ? ? ? ?mask.control[i].legacy =
>>> ? ? ? ? ? ? ? ? ? ? ? ?sband ? (1 << sband->n_bitrates) - 1 : 0;
>>> ? ? ? ?}
>>>
>>> ? ? ? ?/*
>>> ? ? ? ? * The nested attribute uses enum nl80211_band as the index. This maps
>>> ? ? ? ? * directly to the enum ieee80211_band values used in cfg80211.
>>> ? ? ? ? */
>>> ? ? ? ?nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>>> ? ? ? ?{
>>> ? ? ? ? ? ? ? ?enum ieee80211_band band = nla_type(tx_rates);
>>> ? ? ? ? ? ? ? ?if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[band];
>>> ? ? ? ? ? ? ? ?if (sband == NULL)
>>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>> ? ? ? ? ? ? ? ?nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>> ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tx_rates), nl80211_txattr_policy);
>>> ? ? ? ? ? ? ? ?if (tb[NL80211_TXRATE_LEGACY]) {
>>> ? ? ? ? ? ? ? ? ? ? ? ?mask.control[band].legacy = rateset_to_mask(
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_data(tb[NL80211_TXRATE_LEGACY]),
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tb[NL80211_TXRATE_LEGACY]));
>>> ? ? ? ? ? ? ? ? ? ? ? ?if (mask.control[band].legacy == 0)
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>> ? ? ? ? ? ? ? ?}
>>> ? ? ? ?}
>>>
>>> ? ? ? ?return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>>> }
>>
>> As you see everything is for legacy thing and for MCS it's a TODO section.
>>
>>> ====================================================================================================================
>>>
>>>
>>> Any help is much appreciated!
>>>
>>> Thank you all very much
>>> _______________________________________________
>>> ath9k-devel mailing list
>>> ath9k-devel at lists.ath9k.org
>>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>>
>>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-05-31 17:06       ` M. A.
  0 siblings, 0 replies; 15+ messages in thread
From: M. A. @ 2011-05-31 17:06 UTC (permalink / raw)
  To: ath9k-devel, linux-wireless

Hi all,

I would be grateful if anyone can advise on setting/masking a fixed
MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
rates..

If this is not yet implemented, can anyone please advise on how to
implement this as I am in urgent need of this functionality.

Thank you all in advance!


> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>> Hi all,
>>>
>>> My question is how can I modify Minstrel HT rate control to be able to
>>> override it (by a boolean or otherwise) to select an MCS or specific
>>> rate index from user space (such that once set it driver will only try
>>> sending at that rate until unset then driver will resort back to
>>> Minstrel RC).
>>
>> I don't think we can fix the MCS rate index from user space, may be we
>> need a hack.
>> iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>> and this is only for legacy rates.
>>
>>
>>>
>>> I have been able to change other kernel parameters at runtime(echo
>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>> DebugFs. however I am unsure of what parameters to pass through in the
>>> case of MCS rate fixing and what modifications to the code are
>>> required to achieve this.
>>
>> don't know and I am not sure whether this can be easily done.
>>
>>>
>>>
>>> Also I have been told that these sections of code facilitate the
>>> masking of rates;
>>>
>>> =========================================================================
>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> /*
>>>  * cfg80211_bitrate_mask - masks for bitrate control
>>>  */
>>> struct cfg80211_bitrate_mask {
>>>        struct {
>>>                u32 legacy;
>>>                /* TODO: add support for masking MCS rates; e.g.: */
>>>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>>        } control[IEEE80211_NUM_BANDS];
>>> };
>>> -------------------------------------------------------------------------------------------------------
>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>>                                      struct net_device *dev,
>>>                                      const u8 *addr,
>>>                                      const struct cfg80211_bitrate_mask *mask)
>>> {
>>>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>>>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>>        int i;
>>>
>>>        /*
>>>         * This _could_ be supported by providing a hook for
>>>         * drivers for this function, but at this point it
>>>         * doesn't seem worth bothering.
>>>         */
>>>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>>                return -EOPNOTSUPP;
>>>
>>>
>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>
>>>        return 0;
>>> }
>>> -------------------------------------------------------------------------------------------------------
>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>> -------------------------------------------------------------------------------------------------------
>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>>                                       struct genl_info *info)
>>> {
>>>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>>        struct cfg80211_bitrate_mask mask;
>>>        int rem, i;
>>>        struct net_device *dev = info->user_ptr[1];
>>>        struct nlattr *tx_rates;
>>>        struct ieee80211_supported_band *sband;
>>>
>>>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>>                return -EINVAL;
>>>
>>>        if (!rdev->ops->set_bitrate_mask)
>>>                return -EOPNOTSUPP;
>>>
>>>        memset(&mask, 0, sizeof(mask));
>>>        /* Default to all rates enabled */
>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>>                sband = rdev->wiphy.bands[i];
>>>                mask.control[i].legacy =
>>>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>>>        }
>>>
>>>        /*
>>>         * The nested attribute uses enum nl80211_band as the index. This maps
>>>         * directly to the enum ieee80211_band values used in cfg80211.
>>>         */
>>>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>>>        {
>>>                enum ieee80211_band band = nla_type(tx_rates);
>>>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>>                        return -EINVAL;
>>>                sband = rdev->wiphy.bands[band];
>>>                if (sband == NULL)
>>>                        return -EINVAL;
>>>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>>                          nla_len(tx_rates), nl80211_txattr_policy);
>>>                if (tb[NL80211_TXRATE_LEGACY]) {
>>>                        mask.control[band].legacy = rateset_to_mask(
>>>                                sband,
>>>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>>>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>>>                        if (mask.control[band].legacy == 0)
>>>                                return -EINVAL;
>>>                }
>>>        }
>>>
>>>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>>> }
>>
>> As you see everything is for legacy thing and for MCS it's a TODO section.
>>
>>> ====================================================================================================================
>>>
>>>
>>> Any help is much appreciated!
>>>
>>> Thank you all very much
>>> _______________________________________________
>>> ath9k-devel mailing list
>>> ath9k-devel@lists.ath9k.org
>>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>>
>>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-05-31 17:06       ` M. A.
@ 2011-06-01  8:35         ` Zefir Kurtisi
  -1 siblings, 0 replies; 15+ messages in thread
From: Zefir Kurtisi @ 2011-06-01  8:35 UTC (permalink / raw)
  To: ath9k-devel

Hi M.A.,

I posted a related patch two weeks ago (see. [1]).

It was addressed also to you, since I remembered you were asking for
such a feature. Isn't it doing what it should?


Cheers


[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/70428/

On 05/31/2011 07:06 PM, M. A. wrote:
> Hi all,
> 
> I would be grateful if anyone can advise on setting/masking a fixed
> MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
> rates..
> 
> If this is not yet implemented, can anyone please advise on how to
> implement this as I am in urgent need of this functionality.
> 
> Thank you all in advance!
> 
> 
>> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
>>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>>> Hi all,
>>>>
>>>> My question is how can I modify Minstrel HT rate control to be able to
>>>> override it (by a boolean or otherwise) to select an MCS or specific
>>>> rate index from user space (such that once set it driver will only try
>>>> sending at that rate until unset then driver will resort back to
>>>> Minstrel RC).
>>>
>>> I don't think we can fix the MCS rate index from user space, may be we
>>> need a hack.
>>> iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>>> and this is only for legacy rates.
>>>
>>>
>>>>
>>>> I have been able to change other kernel parameters at runtime(echo
>>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>>> DebugFs. however I am unsure of what parameters to pass through in the
>>>> case of MCS rate fixing and what modifications to the code are
>>>> required to achieve this.
>>>
>>> don't know and I am not sure whether this can be easily done.
>>>
>>>>
>>>>
>>>> Also I have been told that these sections of code facilitate the
>>>> masking of rates;
>>>>
>>>> =========================================================================
>>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> /*
>>>>  * cfg80211_bitrate_mask - masks for bitrate control
>>>>  */
>>>> struct cfg80211_bitrate_mask {
>>>>        struct {
>>>>                u32 legacy;
>>>>                /* TODO: add support for masking MCS rates; e.g.: */
>>>>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>>>        } control[IEEE80211_NUM_BANDS];
>>>> };
>>>> -------------------------------------------------------------------------------------------------------
>>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>>>                                      struct net_device *dev,
>>>>                                      const u8 *addr,
>>>>                                      const struct cfg80211_bitrate_mask *mask)
>>>> {
>>>>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>>>>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>>>        int i;
>>>>
>>>>        /*
>>>>         * This _could_ be supported by providing a hook for
>>>>         * drivers for this function, but at this point it
>>>>         * doesn't seem worth bothering.
>>>>         */
>>>>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>>>                return -EOPNOTSUPP;
>>>>
>>>>
>>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>>>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>>
>>>>        return 0;
>>>> }
>>>> -------------------------------------------------------------------------------------------------------
>>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>>>                                       struct genl_info *info)
>>>> {
>>>>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>>>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>>>        struct cfg80211_bitrate_mask mask;
>>>>        int rem, i;
>>>>        struct net_device *dev = info->user_ptr[1];
>>>>        struct nlattr *tx_rates;
>>>>        struct ieee80211_supported_band *sband;
>>>>
>>>>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>>>                return -EINVAL;
>>>>
>>>>        if (!rdev->ops->set_bitrate_mask)
>>>>                return -EOPNOTSUPP;
>>>>
>>>>        memset(&mask, 0, sizeof(mask));
>>>>        /* Default to all rates enabled */
>>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>>>                sband = rdev->wiphy.bands[i];
>>>>                mask.control[i].legacy =
>>>>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>>>>        }
>>>>
>>>>        /*
>>>>         * The nested attribute uses enum nl80211_band as the index. This maps
>>>>         * directly to the enum ieee80211_band values used in cfg80211.
>>>>         */
>>>>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>>>>        {
>>>>                enum ieee80211_band band = nla_type(tx_rates);
>>>>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>>>                        return -EINVAL;
>>>>                sband = rdev->wiphy.bands[band];
>>>>                if (sband == NULL)
>>>>                        return -EINVAL;
>>>>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>>>                          nla_len(tx_rates), nl80211_txattr_policy);
>>>>                if (tb[NL80211_TXRATE_LEGACY]) {
>>>>                        mask.control[band].legacy = rateset_to_mask(
>>>>                                sband,
>>>>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>>>>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>>>>                        if (mask.control[band].legacy == 0)
>>>>                                return -EINVAL;
>>>>                }
>>>>        }
>>>>
>>>>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>>>> }
>>>
>>> As you see everything is for legacy thing and for MCS it's a TODO section.
>>>
>>>> ====================================================================================================================
>>>>
>>>>
>>>> Any help is much appreciated!
>>>>
>>>> Thank you all very much
>>>> _______________________________________________
>>>> ath9k-devel mailing list
>>>> ath9k-devel at lists.ath9k.org
>>>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>>>
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-06-01  8:35         ` Zefir Kurtisi
  0 siblings, 0 replies; 15+ messages in thread
From: Zefir Kurtisi @ 2011-06-01  8:35 UTC (permalink / raw)
  To: M. A.; +Cc: ath9k-devel, linux-wireless

Hi M.A.,

I posted a related patch two weeks ago (see. [1]).

It was addressed also to you, since I remembered you were asking for
such a feature. Isn't it doing what it should?


Cheers


[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/70428/

On 05/31/2011 07:06 PM, M. A. wrote:
> Hi all,
> 
> I would be grateful if anyone can advise on setting/masking a fixed
> MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
> rates..
> 
> If this is not yet implemented, can anyone please advise on how to
> implement this as I am in urgent need of this functionality.
> 
> Thank you all in advance!
> 
> 
>> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> wrote:
>>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>>> Hi all,
>>>>
>>>> My question is how can I modify Minstrel HT rate control to be able to
>>>> override it (by a boolean or otherwise) to select an MCS or specific
>>>> rate index from user space (such that once set it driver will only try
>>>> sending at that rate until unset then driver will resort back to
>>>> Minstrel RC).
>>>
>>> I don't think we can fix the MCS rate index from user space, may be we
>>> need a hack.
>>> iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>>> and this is only for legacy rates.
>>>
>>>
>>>>
>>>> I have been able to change other kernel parameters at runtime(echo
>>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>>> DebugFs. however I am unsure of what parameters to pass through in the
>>>> case of MCS rate fixing and what modifications to the code are
>>>> required to achieve this.
>>>
>>> don't know and I am not sure whether this can be easily done.
>>>
>>>>
>>>>
>>>> Also I have been told that these sections of code facilitate the
>>>> masking of rates;
>>>>
>>>> =========================================================================
>>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> /*
>>>>  * cfg80211_bitrate_mask - masks for bitrate control
>>>>  */
>>>> struct cfg80211_bitrate_mask {
>>>>        struct {
>>>>                u32 legacy;
>>>>                /* TODO: add support for masking MCS rates; e.g.: */
>>>>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>>>        } control[IEEE80211_NUM_BANDS];
>>>> };
>>>> -------------------------------------------------------------------------------------------------------
>>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>>>                                      struct net_device *dev,
>>>>                                      const u8 *addr,
>>>>                                      const struct cfg80211_bitrate_mask *mask)
>>>> {
>>>>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>>>>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>>>        int i;
>>>>
>>>>        /*
>>>>         * This _could_ be supported by providing a hook for
>>>>         * drivers for this function, but at this point it
>>>>         * doesn't seem worth bothering.
>>>>         */
>>>>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>>>                return -EOPNOTSUPP;
>>>>
>>>>
>>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>>>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>>
>>>>        return 0;
>>>> }
>>>> -------------------------------------------------------------------------------------------------------
>>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>>> -------------------------------------------------------------------------------------------------------
>>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>>>                                       struct genl_info *info)
>>>> {
>>>>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>>>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>>>        struct cfg80211_bitrate_mask mask;
>>>>        int rem, i;
>>>>        struct net_device *dev = info->user_ptr[1];
>>>>        struct nlattr *tx_rates;
>>>>        struct ieee80211_supported_band *sband;
>>>>
>>>>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>>>                return -EINVAL;
>>>>
>>>>        if (!rdev->ops->set_bitrate_mask)
>>>>                return -EOPNOTSUPP;
>>>>
>>>>        memset(&mask, 0, sizeof(mask));
>>>>        /* Default to all rates enabled */
>>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>>>                sband = rdev->wiphy.bands[i];
>>>>                mask.control[i].legacy =
>>>>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>>>>        }
>>>>
>>>>        /*
>>>>         * The nested attribute uses enum nl80211_band as the index. This maps
>>>>         * directly to the enum ieee80211_band values used in cfg80211.
>>>>         */
>>>>        nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem)
>>>>        {
>>>>                enum ieee80211_band band = nla_type(tx_rates);
>>>>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>>>                        return -EINVAL;
>>>>                sband = rdev->wiphy.bands[band];
>>>>                if (sband == NULL)
>>>>                        return -EINVAL;
>>>>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>>>                          nla_len(tx_rates), nl80211_txattr_policy);
>>>>                if (tb[NL80211_TXRATE_LEGACY]) {
>>>>                        mask.control[band].legacy = rateset_to_mask(
>>>>                                sband,
>>>>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>>>>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>>>>                        if (mask.control[band].legacy == 0)
>>>>                                return -EINVAL;
>>>>                }
>>>>        }
>>>>
>>>>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, &mask);
>>>> }
>>>
>>> As you see everything is for legacy thing and for MCS it's a TODO section.
>>>
>>>> ====================================================================================================================
>>>>
>>>>
>>>> Any help is much appreciated!
>>>>
>>>> Thank you all very much
>>>> _______________________________________________
>>>> ath9k-devel mailing list
>>>> ath9k-devel@lists.ath9k.org
>>>> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>>>>
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
@ 2011-06-01  9:55 kcilc.dragos at mamber.net
  2011-06-01  9:57 ` Adrian Chadd
  0 siblings, 1 reply; 15+ messages in thread
From: kcilc.dragos at mamber.net @ 2011-06-01  9:55 UTC (permalink / raw)
  To: ath9k-devel



Newbie here as well. I managed to fix the MCS, using an older message on 
this list, but when the signal gets weaker, it dips into legacy rates.

To fix the MCS, you can go to ath_buf_set_rate() in xmit.c:

                 if (!rates[i].count || (rates[i].idx < 0))
                         continue;
              	rix = rates[i].idx;

Use values rix = 0..15 to fix the MCS.

Now please tell me how to mask or disable the legacy rates altogether - I 
really want to measure@a known rate, and not have some algorithm 
interfere with my measurements. With 'iw wlan0 set bitrates legacy-2.4 54' 
for example you can limit the use of legacy to 54Mbps, but I want it 
disabled altogether and only use 11n MCS.

thanks,
-- 
D.




>Hi all,
>
>I would be grateful if anyone can advise on setting/masking a fixed
>MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
>rates..
>
>If this is not yet implemented, can anyone please advise on how to
>implement this as I am in urgent need of this functionality.
>
>Thank you all in advance!
>
>
> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com> 
wrote:
>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>> Hi all,
>>>
>>> My question is how can I modify Minstrel HT rate control to be able to
>>> override it (by a boolean or otherwise) to select an MCS or specific
>>> rate index from user space (such that once set it driver will only try
>>> sending at that rate until unset then driver will resort back to
>>> Minstrel RC).
>>
>> I don't think we can fix the MCS rate index from user space, may be we
>> need a hack.
>> iw  dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>> and this is only for legacy rates.
>>
>>
>>>
>>> I have been able to change other kernel parameters at runtime(echo
>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>> DebugFs. however I am unsure of what parameters to pass through in the
>>> case of MCS rate fixing and what modifications to the code are
>>> required to achieve this.
>>
>> don't know and I am not sure whether this can be easily done.
>>
>>>
>>>
>>> Also I have been told that these sections of code facilitate the
>>> masking of rates;
>>>
>>> 
=========================================================================
>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>> 
-------------------------------------------------------------------------------------------------------
>>> /*
>>>  * cfg80211_bitrate_mask - masks for bitrate control
>>>  */
>>> struct cfg80211_bitrate_mask {
>>>        struct {
>>>                u32 legacy;
>>>                /* TODO: add support for masking MCS rates; e.g.: */
>>>                /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>>        } control[IEEE80211_NUM_BANDS];
>>> };
>>> 
-------------------------------------------------------------------------------------------------------
>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>> 
-------------------------------------------------------------------------------------------------------
>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>>                                      struct net_device *dev,
>>>                                      const u8 *addr,
>>>                                      const struct 
cfg80211_bitrate_mask *mask)
>>> {
>>>        struct ieee80211_sub_if_data *sdata = 
IEEE80211_DEV_TO_SUB_IF(dev);
>>>        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>>        int i;
>>>
>>>        /*
>>>         * This _could_ be supported by providing a hook for
>>>         * drivers for this function, but at this point it
>>>         * doesn't seem worth bothering.
>>>         */
>>>        if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>>                return -EOPNOTSUPP;
>>>
>>>
>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>>                sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>
>>>        return 0;
>>> }
>>> 
-------------------------------------------------------------------------------------------------------
>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>> 
-------------------------------------------------------------------------------------------------------
>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>>                                       struct genl_info *info)
>>> {
>>>        struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>>        struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>>        struct cfg80211_bitrate_mask mask;
>>>        int rem, i;
>>>        struct net_device *dev = info->user_ptr[1];
>>>        struct nlattr *tx_rates;
>>>        struct ieee80211_supported_band *sband;
>>>
>>>        if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>>                return -EINVAL;
>>>
>>>        if (!rdev->ops->set_bitrate_mask)
>>>                return -EOPNOTSUPP;
>>>
>>>        memset(&mask, 0, sizeof(mask));
>>>        /* Default to all rates enabled */
>>>        for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>>                sband = rdev->wiphy.bands[i];
>>>                mask.control[i].legacy =
>>>                        sband ? (1 << sband->n_bitrates) - 1 : 0;
>>>        }
>>>
>>>        /*
>>>         * The nested attribute uses enum nl80211_band as the index. 
This maps
>>>         * directly to the enum ieee80211_band values used in cfg80211.
>>>         */
>>>        nla_for_each_nested(tx_rates, 
info->attrs[NL80211_ATTR_TX_RATES], rem)
>>>        {
>>>                enum ieee80211_band band = nla_type(tx_rates);
>>>                if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>>                        return -EINVAL;
>>>                sband = rdev->wiphy.bands[band];
>>>                if (sband == NULL)
>>>                        return -EINVAL;
>>>                nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>>                          nla_len(tx_rates), nl80211_txattr_policy);
>>>                if (tb[NL80211_TXRATE_LEGACY]) {
>>>                        mask.control[band].legacy = rateset_to_mask(
>>>                                sband,
>>>                                nla_data(tb[NL80211_TXRATE_LEGACY]),
>>>                                nla_len(tb[NL80211_TXRATE_LEGACY]));
>>>                        if (mask.control[band].legacy == 0)
>>>                                return -EINVAL;
>>>                }
>>>        }
>>>
>>>        return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL, 
&mask);
>>> }
>>
>> As you see everything is for legacy thing and for MCS it's a TODO 
section.
>>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask)
  2011-06-01  9:55 kcilc.dragos at mamber.net
@ 2011-06-01  9:57 ` Adrian Chadd
  0 siblings, 0 replies; 15+ messages in thread
From: Adrian Chadd @ 2011-06-01  9:57 UTC (permalink / raw)
  To: ath9k-devel

This begs the question - why not write your own rate control module
that lets you fix the TX rates?



Adrian

On 1 June 2011 17:55,  <kcilc.dragos@mamber.net> wrote:
>
>
> Newbie here as well. I managed to fix the MCS, using an older message on
> this list, but when the signal gets weaker, it dips into legacy rates.
>
> To fix the MCS, you can go to ath_buf_set_rate() in xmit.c:
>
> ? ? ? ? ? ? ? ? if (!rates[i].count || (rates[i].idx < 0))
> ? ? ? ? ? ? ? ? ? ? ? ? continue;
> ? ? ? ? ? ? ? ?rix = rates[i].idx;
>
> Use values rix = 0..15 to fix the MCS.
>
> Now please tell me how to mask or disable the legacy rates altogether - I
> really want to measure at a known rate, and not have some algorithm
> interfere with my measurements. With 'iw wlan0 set bitrates legacy-2.4 54'
> for example you can limit the use of legacy to 54Mbps, but I want it
> disabled altogether and only use 11n MCS.
>
> thanks,
> --
> D.
>
>
>
>
>>Hi all,
>>
>>I would be grateful if anyone can advise on setting/masking a fixed
>>MCS HT rate (ath9k) at runtime, as I am only able to mask legacy
>>rates..
>>
>>If this is not yet implemented, can anyone please advise on how to
>>implement this as I am in urgent need of this functionality.
>>
>>Thank you all in advance!
>>
>>
>> On Tue, Mar 15, 2011 at 5:02 AM, Mohammed Shafi <shafi.ath9k@gmail.com>
> wrote:
>>> On Tue, Mar 8, 2011 at 11:10 PM, M. A. <jdiq123@googlemail.com> wrote:
>>>> Hi all,
>>>>
>>>> My question is how can I modify Minstrel HT rate control to be able to
>>>> override it (by a boolean or otherwise) to select an MCS or specific
>>>> rate index from user space (such that once set it driver will only try
>>>> sending at that rate until unset then driver will resort back to
>>>> Minstrel RC).
>>>
>>> I don't think we can fix the MCS rate index from user space, may be we
>>> need a hack.
>>> iw ?dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*]
>>> and this is only for legacy rates.
>>>
>>>
>>>>
>>>> I have been able to change other kernel parameters at runtime(echo
>>>> /sys/kernel/debug/ieee80211/...) by passing them through (fops) to
>>>> DebugFs. however I am unsure of what parameters to pass through in the
>>>> case of MCS rate fixing and what modifications to the code are
>>>> required to achieve this.
>>>
>>> don't know and I am not sure whether this can be easily done.
>>>
>>>>
>>>>
>>>> Also I have been told that these sections of code facilitate the
>>>> masking of rates;
>>>>
>>>>
> =========================================================================
>>>> include/net/cfg80211.h: cfg80211_bitrate_mask
>>>>
> -------------------------------------------------------------------------------------------------------
>>>> /*
>>>> ?* cfg80211_bitrate_mask - masks for bitrate control
>>>> ?*/
>>>> struct cfg80211_bitrate_mask {
>>>> ? ? ? ?struct {
>>>> ? ? ? ? ? ? ? ?u32 legacy;
>>>> ? ? ? ? ? ? ? ?/* TODO: add support for masking MCS rates; e.g.: */
>>>> ? ? ? ? ? ? ? ?/* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
>>>> ? ? ? ?} control[IEEE80211_NUM_BANDS];
>>>> };
>>>>
> -------------------------------------------------------------------------------------------------------
>>>> net/mac80211/cfg.c ieee80211_set_bitrate_mask
>>>>
> -------------------------------------------------------------------------------------------------------
>>>> static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct net_device *dev,
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const u8 *addr,
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const struct
> cfg80211_bitrate_mask *mask)
>>>> {
>>>> ? ? ? ?struct ieee80211_sub_if_data *sdata =
> IEEE80211_DEV_TO_SUB_IF(dev);
>>>> ? ? ? ?struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>>>> ? ? ? ?int i;
>>>>
>>>> ? ? ? ?/*
>>>> ? ? ? ? * This _could_ be supported by providing a hook for
>>>> ? ? ? ? * drivers for this function, but at this point it
>>>> ? ? ? ? * doesn't seem worth bothering.
>>>> ? ? ? ? */
>>>> ? ? ? ?if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
>>>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>>>
>>>>
>>>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++)
>>>> ? ? ? ? ? ? ? ?sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>>>
>>>> ? ? ? ?return 0;
>>>> }
>>>>
> -------------------------------------------------------------------------------------------------------
>>>> net/wireless/nl80211.c: nl80211_set_tx_bitrate_mask
>>>>
> -------------------------------------------------------------------------------------------------------
>>>> static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct genl_info *info)
>>>> {
>>>> ? ? ? ?struct nlattr *tb[NL80211_TXRATE_MAX + 1];
>>>> ? ? ? ?struct cfg80211_registered_device *rdev = info->user_ptr[0];
>>>> ? ? ? ?struct cfg80211_bitrate_mask mask;
>>>> ? ? ? ?int rem, i;
>>>> ? ? ? ?struct net_device *dev = info->user_ptr[1];
>>>> ? ? ? ?struct nlattr *tx_rates;
>>>> ? ? ? ?struct ieee80211_supported_band *sband;
>>>>
>>>> ? ? ? ?if (info->attrs[NL80211_ATTR_TX_RATES] == NULL)
>>>> ? ? ? ? ? ? ? ?return -EINVAL;
>>>>
>>>> ? ? ? ?if (!rdev->ops->set_bitrate_mask)
>>>> ? ? ? ? ? ? ? ?return -EOPNOTSUPP;
>>>>
>>>> ? ? ? ?memset(&mask, 0, sizeof(mask));
>>>> ? ? ? ?/* Default to all rates enabled */
>>>> ? ? ? ?for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>>>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[i];
>>>> ? ? ? ? ? ? ? ?mask.control[i].legacy =
>>>> ? ? ? ? ? ? ? ? ? ? ? ?sband ? (1 << sband->n_bitrates) - 1 : 0;
>>>> ? ? ? ?}
>>>>
>>>> ? ? ? ?/*
>>>> ? ? ? ? * The nested attribute uses enum nl80211_band as the index.
> This maps
>>>> ? ? ? ? * directly to the enum ieee80211_band values used in cfg80211.
>>>> ? ? ? ? */
>>>> ? ? ? ?nla_for_each_nested(tx_rates,
> info->attrs[NL80211_ATTR_TX_RATES], rem)
>>>> ? ? ? ?{
>>>> ? ? ? ? ? ? ? ?enum ieee80211_band band = nla_type(tx_rates);
>>>> ? ? ? ? ? ? ? ?if (band < 0 || band >= IEEE80211_NUM_BANDS)
>>>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>>> ? ? ? ? ? ? ? ?sband = rdev->wiphy.bands[band];
>>>> ? ? ? ? ? ? ? ?if (sband == NULL)
>>>> ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>>> ? ? ? ? ? ? ? ?nla_parse(tb, NL80211_TXRATE_MAX, nla_data(tx_rates),
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tx_rates), nl80211_txattr_policy);
>>>> ? ? ? ? ? ? ? ?if (tb[NL80211_TXRATE_LEGACY]) {
>>>> ? ? ? ? ? ? ? ? ? ? ? ?mask.control[band].legacy = rateset_to_mask(
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband,
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_data(tb[NL80211_TXRATE_LEGACY]),
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?nla_len(tb[NL80211_TXRATE_LEGACY]));
>>>> ? ? ? ? ? ? ? ? ? ? ? ?if (mask.control[band].legacy == 0)
>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return -EINVAL;
>>>> ? ? ? ? ? ? ? ?}
>>>> ? ? ? ?}
>>>>
>>>> ? ? ? ?return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, NULL,
> &mask);
>>>> }
>>>
>>> As you see everything is for legacy thing and for MCS it's a TODO
> section.
>>>
>
> _______________________________________________
> ath9k-devel mailing list
> ath9k-devel at lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-06-01  9:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 17:40 [ath9k-devel] Override Minstrel HT RC to set an MCS bitrate (mask) M. A.
2011-03-08 17:40 ` M. A.
2011-03-14 17:11 ` [ath9k-devel] " M. A.
2011-03-14 17:11   ` M. A.
2011-03-15  5:02 ` [ath9k-devel] " Mohammed Shafi
2011-03-15  5:02   ` Mohammed Shafi
2011-04-07 21:56   ` M. A.
2011-04-07 21:56     ` M. A.
2011-05-31 17:06     ` M. A.
2011-05-31 17:06       ` M. A.
2011-06-01  8:35       ` Zefir Kurtisi
2011-06-01  8:35         ` Zefir Kurtisi
  -- strict thread matches above, loose matches on Subject: below --
2011-04-08 20:25 Eduard GV
2011-06-01  9:55 kcilc.dragos at mamber.net
2011-06-01  9:57 ` Adrian Chadd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.