From: "Ron Rindjunsky" <ron.rindjunsky@intel.com>
To: "Johannes Berg" <johannes@sipsolutions.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
flamingice@sourmilk.net, tomas.winkler@intel.com,
yi.zhu@intel.com
Subject: Re: [PATCH 3/8] mac80211: A-MPDU Rx adding basic functionality
Date: Tue, 18 Dec 2007 15:42:45 +0200 [thread overview]
Message-ID: <c85cb4470712180542k7b59cd4fs2dafef3da54ee666@mail.gmail.com> (raw)
In-Reply-To: <1197914801.4885.74.camel@johannes.berg>
> > +/* BACK parties */
>
> Please write out "block-ack" or "BACK (block-ack)" :)
will do
>
> > +#define IEEE80211_MIN_AMPDU_BUF 0x8
> > +#define IEEE80211_MAX_AMPDU_BUF 0x40
>
> Any comments on what these represent? Should they be tunable?
>
no, they are not tuneable, but were determined in the 802.11n spec. I
will add comments here.
> > + if (tid_agg_rx->state != HT_AGG_STATE_IDLE) {
> > +#ifdef CONFIG_MAC80211_HT_DEBUG
> > + if (net_ratelimit())
> > + printk(KERN_DEBUG "unexpected Block Ack Req from "
> > + "%s on tid %u\n",
> > + print_mac(mac, mgmt->sa), tid);
> > +#endif /* CONFIG_MAC80211_HT_DEBUG */
> > + goto end;
> > + }
> > +
> > + /* prepare reordering buffer */
> > + tid_agg_rx->reorder_buf =
> > + kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
> > + if (!tid_agg_rx->reorder_buf) {
> > + printk(KERN_ERR "can not allocate reordering buffer "
> > + "to tid %d\n", tid);
> > + tid_agg_rx->state = HT_AGG_STATE_IDLE;
>
> That's unnecessary, you can't get here w/ state != IDLE afaict.
right, thanks.
> > +#ifdef CONFIG_MAC80211_HT_DEBUG
> > + if (net_ratelimit())
> > + printk(KERN_DEBUG "A-MPDU on tid %d result: %s", tid,
> > + (ret == -EOPNOTSUPP)? "Not Supported": "Driver Error");
>
> I'm not sure we need to ratelimit debug messages, and I think we should
> print out the error code. People who are writing a driver will need to
> decipher the number but it's an error they return so I think we should
> give them a chance to see which error path was hit.
agree, will change.
>
> > +void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
> > + u16 initiator, u16 reason_code)
> > + if (!skb) {
> > + printk(KERN_ERR "%s: failed to allocate buffer "
> > + "for delba frame\n", dev->name);
>
> Do we send this as a reply to anything, ie. should it be rate-limited
> too?
no, this Tx is due to internal events only, so it will occur at most
once per session.
>
> > + /* check if the TID is in opertional state */
>
> small typo
thanks, will change
>
> > + /* stop HW Rx aggregation */
> > + if (local->ops->ampdu_action) {
>
> Can we get into that path with ops->ampdu_action == NULL? I'd think not
> because state is required to be active... I'd rather stick in a
> BUG_ON(!local->ops->ampdu_action)
> because it seems to me that'd be a mac80211 bug.
i agree, will do.
>
> > + * After receiving Block Ack Request (BAR) we activated a
> > + * timer after each frame arrives from the originator.
> > + * if this timer expires ieee80211_sta_stop_rx_BA_session will be executed.
> > + */
> > +void sta_rx_agg_session_timer_expired(unsigned long data)
> > +{
> > + /* not an elegant detour, but there is no choice as the timer passes
> > + * only one argument, and ieee80211_local is needed here */
> > + int *ptid = (int *)data;
> > + int *timer_to_id = ptid - *ptid;
> > + struct sta_info *temp_sta = container_of(timer_to_id, struct sta_info,
> > + timer_to_tid[0]);
>
> I think this needs more comments. I can, after a while, see what it
> does, but I'm not even sure it's correct. The whole timer_to_id thing is
> only for this code?
i will add comments.
currently we use it only here, but as Tx will suffer from the same
problem (MLME there requires to limit the time for addBA response per
TID) it will be soon used elsewhere.
> > + u16 tid = (u16)*ptid;
> > + sta = sta_info_get(local, temp_sta->addr);
>
> Missing newline.
>
certainly, thanks
> > + if (!sta)
> > + return;
>
> Why do you even do a sta_info_get() on the temp_sta's addr? Either you
> already have a good pointer or the whole thing will access invalid
> memory.
>
excellent and many thanks.
I forgot to add my del_timer_sync in sta_info_release to prevent this
problem, will add it now.
next prev parent reply other threads:[~2007-12-18 13:42 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 15:57 [PATCH 0/8] mac80211/iwlwifi: integrate IEEE802.11n A-MPDU Rx MLME Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 1/8] mac80211: A-MPDU Rx add low level driver API Ron Rindjunsky
2007-12-17 17:54 ` Johannes Berg
2007-12-17 22:38 ` Johannes Berg
2007-12-18 13:41 ` Ron Rindjunsky
2007-12-18 14:01 ` Johannes Berg
2007-12-17 15:57 ` [PATCH 2/8] mac80211: A-MPDU Rx add MLME structures Ron Rindjunsky
2007-12-17 18:08 ` Johannes Berg
2007-12-18 13:41 ` Ron Rindjunsky
2007-12-18 13:59 ` Johannes Berg
2007-12-18 21:18 ` Johannes Berg
2007-12-19 18:59 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 3/8] mac80211: A-MPDU Rx adding basic functionality Ron Rindjunsky
2007-12-17 18:06 ` Johannes Berg
2007-12-18 13:42 ` Ron Rindjunsky [this message]
2007-12-17 15:57 ` [PATCH 4/8] mac80211: A-MPDU Rx MLME data initialization Ron Rindjunsky
2007-12-17 18:09 ` Johannes Berg
2007-12-18 13:43 ` Ron Rindjunsky
2007-12-17 15:57 ` [PATCH 5/8] mac80211: A-MPDU Rx handling aggregation reordering Ron Rindjunsky
2007-12-17 18:18 ` Johannes Berg
2007-12-18 13:44 ` Ron Rindjunsky
2007-12-18 13:57 ` Johannes Berg
2007-12-19 10:57 ` Rindjunsky, Ron
2007-12-19 15:47 ` Johannes Berg
2007-12-19 16:29 ` Winkler, Tomas
2007-12-19 16:36 ` Johannes Berg
2007-12-20 10:14 ` Johannes Berg
2007-12-20 12:32 ` Ron Rindjunsky
2007-12-20 12:41 ` Johannes Berg
2007-12-20 14:15 ` Ron Rindjunsky
2007-12-23 16:15 ` Ron Rindjunsky
2007-12-23 17:28 ` Johannes Berg
2007-12-23 17:38 ` Ron Rindjunsky
2007-12-23 18:15 ` Johannes Berg
2007-12-17 15:57 ` [PATCH 6/8] mac80211: A-MPDU Rx adding BAR handling capability Ron Rindjunsky
2007-12-17 18:24 ` Johannes Berg
2007-12-18 13:45 ` Ron Rindjunsky
2007-12-18 13:53 ` Johannes Berg
2007-12-19 13:25 ` Rindjunsky, Ron
2007-12-19 15:45 ` Johannes Berg
2007-12-19 18:59 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 7/8] mac80211: A-MPDU Rx handling DELBA requests Ron Rindjunsky
2007-12-17 18:26 ` Johannes Berg
2007-12-18 13:46 ` Ron Rindjunsky
2007-12-18 13:51 ` Johannes Berg
2007-12-19 13:22 ` Rindjunsky, Ron
2007-12-17 15:57 ` [PATCH 8/8] iwlwifi: A-MPDU Rx flow enabled Ron Rindjunsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c85cb4470712180542k7b59cd4fs2dafef3da54ee666@mail.gmail.com \
--to=ron.rindjunsky@intel.com \
--cc=flamingice@sourmilk.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.com \
--cc=yi.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox