Search Linux Wireless

Re: [PATCH v2] mac80211: reject/clear user rate mask if not usable

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

 



On 2020-11-12 20:49, Arend Van Spriel wrote:
On 11/12/2020 11:55 AM, Wen Gong wrote:
On 2017-03-08 21:20, Johannes Berg wrote:
From: Johannes Berg <johannes.berg@xxxxxxxxx>


[...]

@@ -2685,6 +2686,21 @@ static int ieee80211_set_bitrate_mask(struct
wiphy *wiphy,
             return ret;
     }

+    /*
+     * If active validate the setting and reject it if it doesn't leave +     * at least one basic rate usable, since we really have to be able +     * to send something, and if we're an AP we have to be able to do
+     * so at a basic rate so that all clients can receive it.
+     */
+    if (rcu_access_pointer(sdata->vif.chanctx_conf) &&
+        sdata->vif.bss_conf.chandef.chan) {
+        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 user want to use “iw wlan0 set bitrates legacy-5 54” to set it to fixed in 54M and 54M is not basic rate in AP's becaon as example of below, then the iw command will fail.

Which was the intent of this change, wasn't it? You want to allow
anyway or you want a clear error message as to why it fails?
We need to set the tx rate to fixed at a single rate, e.g., 54M/48M/36M... for a test case. I do not want a clear error message, I want to the 54M rate pass/set success to lower wlan driver.
Then lower wlan driver can handle it.

Regards,
Arend



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

  Powered by Linux