[LEDE-DEV] [PATCH] mac80211: Add patch to re-enable setting a single rate.
Ben Greear
greearb at candelatech.com
Thu Oct 12 14:25:22 PDT 2017
On 10/12/2017 12:36 PM, Hauke Mehrtens wrote:
> On 10/11/2017 12:18 AM, greearb at candelatech.com wrote:
>> From: Ben Greear <greearb at candelatech.com>
>>
>> This lets one use 'iw' to set individual rates on ath10k again.
>>
>> Signed-off-by: Ben Greear <greearb at candelatech.com>
>> ---
>> .../111-mac80211_allow_single_tx_rate_again.patch | 33 ++++++++++++++++++++++
>> 1 file changed, 33 insertions(+)
>> create mode 100644 package/kernel/mac80211/patches/111-mac80211_allow_single_tx_rate_again.patch
>>
>> diff --git a/package/kernel/mac80211/patches/111-mac80211_allow_single_tx_rate_again.patch b/package/kernel/mac80211/patches/111-mac80211_allow_single_tx_rate_again.patch
>> new file mode 100644
>> index 0000000..c88ab2b
>> --- /dev/null
>> +++ b/package/kernel/mac80211/patches/111-mac80211_allow_single_tx_rate_again.patch
>> @@ -0,0 +1,33 @@
>> +From f1f0375f67622c4f5c2faeb03c0275e4f7e8191a Mon Sep 17 00:00:00 2001
>> +From: Ben Greear <greearb at candelatech.com>
>> +Date: Tue, 10 Oct 2017 13:56:29 -0700
>> +Subject: [PATCH] mac80211: Revert some of e8e4f5, fixes setting single rate
>> + in ath10k.
>> +
>> +This lets us successfully set a single rate in ath10k again.
>> +
>> +Signed-off-by: Ben Greear <greearb at candelatech.com>
>> +---
>> + net/mac80211/cfg.c | 6 ++++--
>> + 1 file changed, 4 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> +index d4c2511..087d33a 100644
>> +--- a/net/mac80211/cfg.c
>> ++++ b/net/mac80211/cfg.c
>> +@@ -2756,8 +2756,10 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
>> + u32 basic_rates = sdata->vif.bss_conf.basic_rates;
>> + enum nl80211_band band = sdata->vif.bss_conf.chandef.chan->band;
>> +
>> +- if (!(mask->control[band].legacy & basic_rates))
>> +- return -EINVAL;
>> ++ if (!(mask->control[band].legacy & basic_rates)) {
>> ++ pr_err("%s: WARNING: no legacy rates for band[%d] in set-bitrate-mask.\n",
>> ++ sdata->dev->name, band);
>> ++ }
>> + }
>> +
>> + for (i = 0; i < NUM_NL80211_BANDS; i++) {
>> +--
>> +2.4.11
>> +
>>
>
> Will you also send this upstream or is this only a hack?
As written, this is a bit of a hack (probably should only pr_err once,
maybe not at all?)...I am discussing a fix for upstream.
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Lede-dev
mailing list