linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels
@ 2008-06-05 13:07 Luis R. Rodriguez
  2008-06-05 13:16 ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2008-06-05 13:07 UTC (permalink / raw)
  To: linville; +Cc: Ivo van Doorn, Johannes Berg, Ron Rindjunsky, linux-wireless


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 <mcgrof@gmail.com>
---
 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


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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels
  2008-06-05 13:07 [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels Luis R. Rodriguez
@ 2008-06-05 13:16 ` Johannes Berg
  2008-06-05 13:26   ` Luis R. Rodriguez
  2008-06-06 10:39   ` [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert " Rindjunsky, Ron
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2008-06-05 13:16 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, Ivo van Doorn, Ron Rindjunsky, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

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 <mcgrof@gmail.com>

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels
  2008-06-05 13:16 ` Johannes Berg
@ 2008-06-05 13:26   ` Luis R. Rodriguez
  2008-06-05 15:57     ` Ivo van Doorn
  2008-06-06 10:39   ` [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert " Rindjunsky, Ron
  1 sibling, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2008-06-05 13:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, Ivo van Doorn, Ron Rindjunsky, linux-wireless

On Thu, Jun 5, 2008 at 6:16 AM, Johannes Berg <johannes@sipsolutions.net> 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 <mcgrof@gmail.com>
>
> 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

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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels
  2008-06-05 13:26   ` Luis R. Rodriguez
@ 2008-06-05 15:57     ` Ivo van Doorn
  0 siblings, 0 replies; 8+ messages in thread
From: Ivo van Doorn @ 2008-06-05 15:57 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Johannes Berg, linville, Ron Rindjunsky, linux-wireless

On Thursday 05 June 2008, Luis R. Rodriguez wrote:
> On Thu, Jun 5, 2008 at 6:16 AM, Johannes Berg <johannes@sipsolutions.net> 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 <mcgrof@gmail.com>
> >
> > 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

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

* RE: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels
  2008-06-05 13:16 ` Johannes Berg
  2008-06-05 13:26   ` Luis R. Rodriguez
@ 2008-06-06 10:39   ` Rindjunsky, Ron
  2008-06-06 11:48     ` Luis R. Rodriguez
  1 sibling, 1 reply; 8+ messages in thread
From: Rindjunsky, Ron @ 2008-06-06 10:39 UTC (permalink / raw)
  To: Johannes Berg, Luis R. Rodriguez; +Cc: linville, Ivo van Doorn, linux-wireless

>> 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 <mcgrof@gmail.com>

> 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.


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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels
  2008-06-06 10:39   ` [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert " Rindjunsky, Ron
@ 2008-06-06 11:48     ` Luis R. Rodriguez
  2008-06-06 12:07       ` Tomas Winkler
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2008-06-06 11:48 UTC (permalink / raw)
  To: Rindjunsky, Ron; +Cc: Johannes Berg, linville, Ivo van Doorn, linux-wireless

On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
<ron.rindjunsky@intel.com> 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 <mcgrof@gmail.com>
>
>> 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

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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels
  2008-06-06 11:48     ` Luis R. Rodriguez
@ 2008-06-06 12:07       ` Tomas Winkler
  2008-06-08 16:32         ` Tomas Winkler
  0 siblings, 1 reply; 8+ messages in thread
From: Tomas Winkler @ 2008-06-06 12:07 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Rindjunsky, Ron, Johannes Berg, linville, Ivo van Doorn,
	linux-wireless

On Fri, Jun 6, 2008 at 2:48 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
> <ron.rindjunsky@intel.com> 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 <mcgrof@gmail.com>
>>
>>> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert MQ support for older kernels
  2008-06-06 12:07       ` Tomas Winkler
@ 2008-06-08 16:32         ` Tomas Winkler
  0 siblings, 0 replies; 8+ messages in thread
From: Tomas Winkler @ 2008-06-08 16:32 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Rindjunsky, Ron, Johannes Berg, linville, Ivo van Doorn,
	linux-wireless

On Fri, Jun 6, 2008 at 3:07 PM, Tomas Winkler <tomasw@gmail.com> wrote:
> On Fri, Jun 6, 2008 at 2:48 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> On Fri, Jun 6, 2008 at 3:39 AM, Rindjunsky, Ron
>> <ron.rindjunsky@intel.com> 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 <mcgrof@gmail.com>
>>>
>>>> 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

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

end of thread, other threads:[~2008-06-08 16:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 13:07 [PATCH] rt2x00: Rename tx_info to info to help compat-wireless revert MQ support for older kernels Luis R. Rodriguez
2008-06-05 13:16 ` Johannes Berg
2008-06-05 13:26   ` Luis R. Rodriguez
2008-06-05 15:57     ` Ivo van Doorn
2008-06-06 10:39   ` [PATCH] rt2x00: Rename tx_info to info to help compat-wirelessrevert " Rindjunsky, Ron
2008-06-06 11:48     ` Luis R. Rodriguez
2008-06-06 12:07       ` Tomas Winkler
2008-06-08 16:32         ` Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).