diff mbox

[PATCH-v2,1/2] mac80211: Take bitrates into account when building IEs.

Message ID 575B0A58.8070408@candelatech.com (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Ben Greear June 10, 2016, 6:43 p.m. UTC
On 03/15/2016 01:20 PM, Johannes Berg wrote:
> On Tue, 2016-03-15 at 09:10 -0700, Ben Greear wrote:
>>
>> The logic I wrote is basically exactly this.  It uses the configured
>> rates to specify which of the hardware's rates are allowed and
>> disabled.
>>
>
> I understand that. I just take issue with the fact that we have to
> sprinkle "magic pixie dust" (in form of the override function calls)
> everywhere throughout the code.
>
> johannes
>

So, I never could think up a way to make this more acceptable and meet
my own goals.

Any chance I could get just the netlink enum in place, even if it is
called something like 'api_placeholder_x'?

Otherwise, it is about impossible for me to keep any sane forward/back
compatibility with my hostap patches....



Or, is there some other way to handle out-of-tree netlink stuff better?

Thanks,
Ben

Comments

Johannes Berg June 21, 2016, 9:40 a.m. UTC | #1
On Fri, 2016-06-10 at 11:43 -0700, Ben Greear wrote:
> On 03/15/2016 01:20 PM, Johannes Berg wrote:
> > On Tue, 2016-03-15 at 09:10 -0700, Ben Greear wrote:
> > > 
> > > The logic I wrote is basically exactly this.  It uses the
> > > configured
> > > rates to specify which of the hardware's rates are allowed and
> > > disabled.
> > > 
> > 
> > I understand that. I just take issue with the fact that we have to
> > sprinkle "magic pixie dust" (in form of the override function
> > calls)
> > everywhere throughout the code.
> > 
> > johannes
> > 
> 
> So, I never could think up a way to make this more acceptable and
> meet my own goals.
> 
> Any chance I could get just the netlink enum in place, even if it is
> called something like 'api_placeholder_x'?
> 

No, I don't think I want to do that.

But if you're not too worried about space consumption, you could pick a
higher number:

	/* add attributes here, update the policy in nl80211.c */

	NL80211_ATTR_TX_ADVERT_RATEMASK = 300,

	__NL80211_ATTR_AFTER_LAST,

We currently use about 230 attributes, so that'll give you lots of
breathing room.

johannes
--
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
Ben Greear June 21, 2016, 2:19 p.m. UTC | #2
On 06/21/2016 02:40 AM, Johannes Berg wrote:
> On Fri, 2016-06-10 at 11:43 -0700, Ben Greear wrote:
>> On 03/15/2016 01:20 PM, Johannes Berg wrote:
>>> On Tue, 2016-03-15 at 09:10 -0700, Ben Greear wrote:
>>>>
>>>> The logic I wrote is basically exactly this.  It uses the
>>>> configured
>>>> rates to specify which of the hardware's rates are allowed and
>>>> disabled.
>>>>
>>>
>>> I understand that. I just take issue with the fact that we have to
>>> sprinkle "magic pixie dust" (in form of the override function
>>> calls)
>>> everywhere throughout the code.
>>>
>>> johannes
>>>
>>
>> So, I never could think up a way to make this more acceptable and
>> meet my own goals.
>>
>> Any chance I could get just the netlink enum in place, even if it is
>> called something like 'api_placeholder_x'?
>>
>
> No, I don't think I want to do that.
>
> But if you're not too worried about space consumption, you could pick a
> higher number:
>
> 	/* add attributes here, update the policy in nl80211.c */
>
> 	NL80211_ATTR_TX_ADVERT_RATEMASK = 300,
>
> 	__NL80211_ATTR_AFTER_LAST,
>
> We currently use about 230 attributes, so that'll give you lots of
> breathing room.

 From a pure hack point of view, maybe re-purposing some already existing
attribute that has nothing to do with scanning is the way to go.

Thanks,
Ben
diff mbox

Patch

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index c0ab6b0..4573f87 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2130,6 +2130,8 @@  enum nl80211_attrs {

  	NL80211_ATTR_REG_INDOOR,

+	NL80211_ATTR_TX_ADVERT_RATEMASK,
+
  	/* add attributes here, update the policy in nl80211.c */

  	__NL80211_ATTR_AFTER_LAST,