2008-06-05 13:28:45

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels


Rename tx_info to info as used by other drivers. This will help
with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
to the old info->queue.

An alternative is to maintain a large compat.diff which replaces all
skb_get_queue_mapping(skb) calls back to info->queue but since this
is the only driver which requires name change it seems worth it
to help with maintenance.

Compat-wireless shouldn't be a reason to accept patches in but if
the changes are just cosmetic it seems worth the benefit.

Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/net/wireless/rt2x00/rt2x00mac.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index b02dbc8..ff8b476 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -33,13 +33,13 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
struct data_queue *queue,
struct sk_buff *frag_skb)
{
- struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(frag_skb);
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(frag_skb);
struct skb_frame_desc *skbdesc;
struct ieee80211_tx_info *rts_info;
struct sk_buff *skb;
int size;

- if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
+ if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
size = sizeof(struct ieee80211_cts);
else
size = sizeof(struct ieee80211_rts);
@@ -68,18 +68,18 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
rts_info->flags &= ~IEEE80211_TX_CTL_USE_CTS_PROTECT;
rts_info->flags &= ~IEEE80211_TX_CTL_REQ_TX_STATUS;

- if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
+ if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
rts_info->flags |= IEEE80211_TX_CTL_NO_ACK;
else
rts_info->flags &= ~IEEE80211_TX_CTL_NO_ACK;

- if (tx_info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
- ieee80211_ctstoself_get(rt2x00dev->hw, tx_info->control.vif,
- frag_skb->data, size, tx_info,
+ if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)
+ ieee80211_ctstoself_get(rt2x00dev->hw, info->control.vif,
+ frag_skb->data, size, info,
(struct ieee80211_cts *)(skb->data));
else
- ieee80211_rts_get(rt2x00dev->hw, tx_info->control.vif,
- frag_skb->data, size, tx_info,
+ ieee80211_rts_get(rt2x00dev->hw, info->control.vif,
+ frag_skb->data, size, info,
(struct ieee80211_rts *)(skb->data));

/*
@@ -100,7 +100,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
- struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data;
enum data_queue_qid qid = skb_get_queue_mapping(skb);
struct data_queue *queue;
@@ -121,7 +121,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
/*
* Determine which queue to put packet on.
*/
- if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM &&
+ if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM &&
test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM);
else
@@ -146,7 +146,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
*/
frame_control = le16_to_cpu(ieee80211hdr->frame_control);
if (!is_rts_frame(frame_control) && !is_cts_frame(frame_control) &&
- (tx_info->flags & (IEEE80211_TX_CTL_USE_RTS_CTS |
+ (info->flags & (IEEE80211_TX_CTL_USE_RTS_CTS |
IEEE80211_TX_CTL_USE_CTS_PROTECT)) &&
!rt2x00dev->ops->hw->set_rts_threshold) {
if (rt2x00queue_available(queue) <= 1) {
--
1.5.4.3



2008-06-08 16:32:27

by Tomas Winkler

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels

On Fri, Jun 6, 2008 at 3:07 PM, Tomas Winkler <[email protected]> wrote:
> On Fri, Jun 6, 2008 at 2:48 PM, Luis R. Rodriguez <[email protected]> wrote:
>> On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
>> <[email protected]> wrote:
>>>>> Rename tx_info to info as used by other drivers. This will help
>>>>> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
>>>>> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
>>>>> to the old info->queue.
>>>>>
>>>>> An alternative is to maintain a large compat.diff which replaces all
>>>>> skb_get_queue_mapping(skb) calls back to info->queue but since this
>>>>> is the only driver which requires name change it seems worth it
>>>>> to help with maintenance.
>>>>>
>>>>> Compat-wireless shouldn't be a reason to accept patches in but if
>>>>> the changes are just cosmetic it seems worth the benefit.
>>>>>
>>>>> Signed-off-by: Luis R. Rodriguez <[email protected]>
>>>
>>>> That's just asking for trouble. If you really _must_ do magic in
>>>> skb_get_queue_mapping, do it directly:
>>>
>>>> int q = IEEE80211_SKB_CB(skb)->queue;
>>>
>>> Aren't we heading into to troubles here? In kernels < 2.6.23 there is no
>>> skb->queue_mapping. queue was once passed in the cb, but now that queue
>>> was removed from info and info takes cb we are going to have a compat
>>> problem.
>>
>> This is only going to be done for <= 2.6.22.
>>
>> Luis
>
> First we have to find out why this tx_info to cb patch broke iwlwifi

This one was solved, the patch will follow in regular driver update from Yi

Tomas

2008-06-05 15:48:34

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels

On Thursday 05 June 2008, Luis R. Rodriguez wrote:
> On Thu, Jun 5, 2008 at 6:16 AM, Johannes Berg <[email protected]> wrote:
> > On Thu, 2008-06-05 at 09:07 -0400, Luis R. Rodriguez wrote:
> >> Rename tx_info to info as used by other drivers. This will help
> >> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
> >> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
> >> to the old info->queue.
> >>
> >> An alternative is to maintain a large compat.diff which replaces all
> >> skb_get_queue_mapping(skb) calls back to info->queue but since this
> >> is the only driver which requires name change it seems worth it
> >> to help with maintenance.
> >>
> >> Compat-wireless shouldn't be a reason to accept patches in but if
> >> the changes are just cosmetic it seems worth the benefit.
> >>
> >> Signed-off-by: Luis R. Rodriguez <[email protected]>
> >
> > That's just asking for trouble. If you really _must_ do magic in
> > skb_get_queue_mapping, do it directly:
> >
> > int q = IEEE80211_SKB_CB(skb)->queue;
>
> Works for me, thanks. Please ignore patch, or not if you want drivers
> for some strange reason to be consistent. I just don't need it now.

Thanks, I'll drop the patch. ;)

Ivo

2008-06-06 11:48:36

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels

On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
<[email protected]> wrote:
>>> Rename tx_info to info as used by other drivers. This will help
>>> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
>>> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
>>> to the old info->queue.
>>>
>>> An alternative is to maintain a large compat.diff which replaces all
>>> skb_get_queue_mapping(skb) calls back to info->queue but since this
>>> is the only driver which requires name change it seems worth it
>>> to help with maintenance.
>>>
>>> Compat-wireless shouldn't be a reason to accept patches in but if
>>> the changes are just cosmetic it seems worth the benefit.
>>>
>>> Signed-off-by: Luis R. Rodriguez <[email protected]>
>
>> That's just asking for trouble. If you really _must_ do magic in
>> skb_get_queue_mapping, do it directly:
>
>> int q = IEEE80211_SKB_CB(skb)->queue;
>
> Aren't we heading into to troubles here? In kernels < 2.6.23 there is no
> skb->queue_mapping. queue was once passed in the cb, but now that queue
> was removed from info and info takes cb we are going to have a compat
> problem.

This is only going to be done for <= 2.6.22.

Luis

2008-06-06 10:39:18

by Ron Rindjunsky

[permalink] [raw]
Subject: RE: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels

>> Rename tx_info to info as used by other drivers. This will help
>> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
>> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
>> to the old info->queue.
>>
>> An alternative is to maintain a large compat.diff which replaces all
>> skb_get_queue_mapping(skb) calls back to info->queue but since this
>> is the only driver which requires name change it seems worth it
>> to help with maintenance.
>>
>> Compat-wireless shouldn't be a reason to accept patches in but if
>> the changes are just cosmetic it seems worth the benefit.
>>
>> Signed-off-by: Luis R. Rodriguez <[email protected]>

> That's just asking for trouble. If you really _must_ do magic in
> skb_get_queue_mapping, do it directly:

> int q = IEEE80211_SKB_CB(skb)->queue;

Aren't we heading into to troubles here? In kernels < 2.6.23 there is no
skb->queue_mapping. queue was once passed in the cb, but now that queue
was removed from info and info takes cb we are going to have a compat
problem.

Ron

> johannes
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


2008-06-05 13:26:30

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels

On Thu, Jun 5, 2008 at 6:16 AM, Johannes Berg <[email protected]> wrote:
> On Thu, 2008-06-05 at 09:07 -0400, Luis R. Rodriguez wrote:
>> Rename tx_info to info as used by other drivers. This will help
>> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
>> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
>> to the old info->queue.
>>
>> An alternative is to maintain a large compat.diff which replaces all
>> skb_get_queue_mapping(skb) calls back to info->queue but since this
>> is the only driver which requires name change it seems worth it
>> to help with maintenance.
>>
>> Compat-wireless shouldn't be a reason to accept patches in but if
>> the changes are just cosmetic it seems worth the benefit.
>>
>> Signed-off-by: Luis R. Rodriguez <[email protected]>
>
> That's just asking for trouble. If you really _must_ do magic in
> skb_get_queue_mapping, do it directly:
>
> int q = IEEE80211_SKB_CB(skb)->queue;

Works for me, thanks. Please ignore patch, or not if you want drivers
for some strange reason to be consistent. I just don't need it now.

Luis

2008-06-05 13:17:07

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels

On Thu, 2008-06-05 at 09:07 -0400, Luis R. Rodriguez wrote:
> Rename tx_info to info as used by other drivers. This will help
> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
> to the old info->queue.
>
> An alternative is to maintain a large compat.diff which replaces all
> skb_get_queue_mapping(skb) calls back to info->queue but since this
> is the only driver which requires name change it seems worth it
> to help with maintenance.
>
> Compat-wireless shouldn't be a reason to accept patches in but if
> the changes are just cosmetic it seems worth the benefit.
>
> Signed-off-by: Luis R. Rodriguez <[email protected]>

That's just asking for trouble. If you really _must_ do magic in
skb_get_queue_mapping, do it directly:

int q = IEEE80211_SKB_CB(skb)->queue;

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2008-06-06 12:07:31

by Tomas Winkler

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels

On Fri, Jun 6, 2008 at 2:48 PM, Luis R. Rodriguez <[email protected]> wrote:
> On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
> <[email protected]> wrote:
>>>> Rename tx_info to info as used by other drivers. This will help
>>>> with CONFIG_NETDEVICES_MULTIQUEUE requirement for HT support support
>>>> in compat-wireless by allowing us to map skb_get_queue_mapping(skb)
>>>> to the old info->queue.
>>>>
>>>> An alternative is to maintain a large compat.diff which replaces all
>>>> skb_get_queue_mapping(skb) calls back to info->queue but since this
>>>> is the only driver which requires name change it seems worth it
>>>> to help with maintenance.
>>>>
>>>> Compat-wireless shouldn't be a reason to accept patches in but if
>>>> the changes are just cosmetic it seems worth the benefit.
>>>>
>>>> Signed-off-by: Luis R. Rodriguez <[email protected]>
>>
>>> That's just asking for trouble. If you really _must_ do magic in
>>> skb_get_queue_mapping, do it directly:
>>
>>> int q = IEEE80211_SKB_CB(skb)->queue;
>>
>> Aren't we heading into to troubles here? In kernels < 2.6.23 there is no
>> skb->queue_mapping. queue was once passed in the cb, but now that queue
>> was removed from info and info takes cb we are going to have a compat
>> problem.
>
> This is only going to be done for <= 2.6.22.
>
> Luis

First we have to find out why this tx_info to cb patch broke iwlwifi
Tomas

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