* Question on tx field of struct ieee80211_ops
@ 2009-01-22 21:52 Gordon, Charles
2009-01-22 22:26 ` Gordon, Charles
2009-01-23 14:40 ` Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Gordon, Charles @ 2009-01-22 21:52 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
I'm writing a wireless driver that will use the mac80211 API. My hardware = allows me to send one packet at a time. The driver is suppose to set the t= x field (among others) in the struct ieee80211_ops argument passed to ieee8= 0211_alloc_hw(). The tx field should be loaded with a pointer to a low lev= el transmit routine. However, it's not clear from the documentation if thi= s routine should maintain a packet queue or not. Is it okay for the low le= vel transmit routine to only allow one packet to be transmitted at a time, = or should it maintain a queue of tx packets? It seems like the mac80211 AP= I is already maintaining a queue, so I'm not sure that the low level driver= should maintain a second one.
Thanks for any information you can provide.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Question on tx field of struct ieee80211_ops
2009-01-22 21:52 Question on tx field of struct ieee80211_ops Gordon, Charles
@ 2009-01-22 22:26 ` Gordon, Charles
2009-01-23 5:45 ` Larry Finger
2009-01-23 22:10 ` Johannes Berg
2009-01-23 14:40 ` Kalle Valo
1 sibling, 2 replies; 5+ messages in thread
From: Gordon, Charles @ 2009-01-22 22:26 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
A follow up question on this is if my transmit routine does not have its own queue and the H/W can only transmit 1 packet at a time, should the transmit routine call ieee80211_stop_queue() when it starts the transmit procedure, and then call ieee80211_wake_queue() when the hardware indicates it has finished transmitting the packet.
-----Original Message-----
From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-owner@vger.kernel.org] On Behalf Of Gordon, Charles
Sent: Thursday, January 22, 2009 4:53 PM
To: linux-wireless@vger.kernel.org
Subject: Question on tx field of struct ieee80211_ops
I'm writing a wireless driver that will use the mac80211 API. My hardware = allows me to send one packet at a time. The driver is suppose to set the t= x field (among others) in the struct ieee80211_ops argument passed to ieee8= 0211_alloc_hw(). The tx field should be loaded with a pointer to a low lev= el transmit routine. However, it's not clear from the documentation if thi= s routine should maintain a packet queue or not. Is it okay for the low le= vel transmit routine to only allow one packet to be transmitted at a time, = or should it maintain a queue of tx packets? It seems like the mac80211 AP= I is already maintaining a queue, so I'm not sure that the low level driver= should maintain a second one.
Thanks for any information you can provide.
--
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] 5+ messages in thread
* Re: Question on tx field of struct ieee80211_ops
2009-01-22 22:26 ` Gordon, Charles
@ 2009-01-23 5:45 ` Larry Finger
2009-01-23 22:10 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Larry Finger @ 2009-01-23 5:45 UTC (permalink / raw)
To: Gordon, Charles; +Cc: linux-wireless@vger.kernel.org
Gordon, Charles wrote:
> A follow up question on this is if my transmit routine does not have its own queue and the H/W can only transmit 1 packet at a time, should the transmit routine call ieee80211_stop_queue() when it starts the transmit procedure, and then call ieee80211_wake_queue() when the hardware indicates it has finished transmitting the packet.
I'm not an expert on mac80211, but if you look at the code in
drivers/net/wireless/rtl818x/rtl8187_dev.c, you will see that they TX
packets are not queued by the driver. When the tx ops routine is
called, the data is processed as required and the packet is sent on to
the hardware. In the callback routine, certain status information is
filled in and ieee80211_tx_status_irqsafe() is called to finish the
transaction. You only need to worry about protecting the private data
from concurrent access.
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Question on tx field of struct ieee80211_ops
2009-01-22 22:26 ` Gordon, Charles
2009-01-23 5:45 ` Larry Finger
@ 2009-01-23 22:10 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2009-01-23 22:10 UTC (permalink / raw)
To: Gordon, Charles; +Cc: linux-wireless@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
On Thu, 2009-01-22 at 16:26 -0600, Gordon, Charles wrote:
> A follow up question on this is if my transmit routine does not have
> its own queue and the H/W can only transmit 1 packet at a time, should
> the transmit routine call ieee80211_stop_queue() when it starts the
> transmit procedure, and then call ieee80211_wake_queue() when the
> hardware indicates it has finished transmitting the packet.
Yes, that's exactly the right way to do it. I think adm8211.c does that
too.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question on tx field of struct ieee80211_ops
2009-01-22 21:52 Question on tx field of struct ieee80211_ops Gordon, Charles
2009-01-22 22:26 ` Gordon, Charles
@ 2009-01-23 14:40 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2009-01-23 14:40 UTC (permalink / raw)
To: Gordon, Charles; +Cc: linux-wireless@vger.kernel.org
"Gordon, Charles" <Charles.Gordon@digi.com> writes:
> I'm writing a wireless driver that will use the mac80211 API. My
> hardware = allows me to send one packet at a time. The driver is
> suppose to set the t= x field (among others) in the struct
> ieee80211_ops argument passed to ieee8= 0211_alloc_hw(). The tx field
> should be loaded with a pointer to a low lev= el transmit routine.
> However, it's not clear from the documentation if thi= s routine
> should maintain a packet queue or not. Is it okay for the low le= vel
> transmit routine to only allow one packet to be transmitted at a time,
> = or should it maintain a queue of tx packets? It seems like the
> mac80211 AP= I is already maintaining a queue, so I'm not sure that
> the low level driver= should maintain a second one.
In my opinion, the driver should not have a second queue. Just stop
queue while transmitting the frame and wake the queue after it has
been transmitted.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-23 22:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 21:52 Question on tx field of struct ieee80211_ops Gordon, Charles
2009-01-22 22:26 ` Gordon, Charles
2009-01-23 5:45 ` Larry Finger
2009-01-23 22:10 ` Johannes Berg
2009-01-23 14:40 ` Kalle Valo
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).