linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shajakhan, Mohammed Shafi" <mohammed@qca.qualcomm.com>
To: "linville@tuxdriver.com" <linville@tuxdriver.com>,
	"Manoharan, Rajkumar" <rmanohar@qca.qualcomm.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Rodriguez, Luis" <rodrigue@qca.qualcomm.com>,
	"Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Subject: RE: [PATCH 1/2] ath9k: minor cleanup in tx_form_aggregation
Date: Tue, 28 Jun 2011 13:04:20 +0000	[thread overview]
Message-ID: <D106CD05FEFBA74BA17F929FD27C8AB3099BC798@nasanexd02a.na.qualcomm.com> (raw)
In-Reply-To: <1309262442-21383-1-git-send-email-mshajakhan@atheros.com>


________________________________________
From: Mohammed Shafi Shajakhan [mohammed@qca.qualcomm.com]
Sent: 28 June 2011 17:30:42
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org; Rodriguez, Luis; Balasubramanian, senthilkumar; Shajakhan, Mohammed Shafi
Subject: [PATCH 1/2] ath9k: minor cleanup in tx_form_aggregation

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

moves a macro to the main header file ath9k.h and removes a redundant
variable/if check

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ath9k.h |    2 ++
 drivers/net/wireless/ath/ath9k/xmit.c  |    9 ++-------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 56a0ac4..ac9ec3c 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -129,6 +129,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
         (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
         WME_AC_VO)

+#define PADBYTES(_len) ((4 - ((_len) % 4)) % 4)
+
 #define ATH_AGGR_DELIM_SZ          4
 #define ATH_AGGR_MINPLEN           256 /* in bytes, minimum packet length */
 /* number of delimiters for encryption padding */
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index a1fed6c..18f02c0 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -708,9 +708,8 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
                                             struct list_head *bf_q,
                                             int *aggr_len)
 {
-#define PADBYTES(_len) ((4 - ((_len) % 4)) % 4)
        struct ath_buf *bf, *bf_first, *bf_prev = NULL;
-       int rl = 0, nframes = 0, ndelim, prev_al = 0;
+       int nframes = 0, ndelim, prev_al = 0;
        u16 aggr_limit = 0, al = 0, bpad = 0,
                al_delta, h_baw = tid->baw_size / 2;
        enum ATH_AGGR_STATUS status = ATH_AGGR_DONE;
@@ -729,10 +728,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
                        break;
                }

-               if (!rl) {
-                       aggr_limit = ath_lookup_rate(sc, bf, tid);
-                       rl = 1;
-               }
+               aggr_limit = ath_lookup_rate(sc, bf, tid);

                /* do not exceed aggregation limit */
                al_delta = ATH_AGGR_DELIM_SZ + fi->framelen;
@@ -785,7 +781,6 @@ static enum ATH_AGGR_STATUS ath_tx_form_aggr(struct ath_softc *sc,
        *aggr_len = al;

        return status;
-#undef PADBYTES
 }

 static void ath_tx_sched_aggr(struct ath_softc *sc, struct ath_txq *txq,
--
1.7.0.4

John please drop this patch, as it is completely wrong and the variable 'rl'  is not redundant , I over looked the code even though testing. thanks to Raj for pointing it out.

      reply	other threads:[~2011-06-28 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 12:00 [PATCH 1/2] ath9k: minor cleanup in tx_form_aggregation Mohammed Shafi Shajakhan
2011-06-28 13:04 ` Shajakhan, Mohammed Shafi [this message]

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=D106CD05FEFBA74BA17F929FD27C8AB3099BC798@nasanexd02a.na.qualcomm.com \
    --to=mohammed@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rmanohar@qca.qualcomm.com \
    --cc=rodrigue@qca.qualcomm.com \
    --cc=senthilb@qca.qualcomm.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;
as well as URLs for NNTP newsgroup(s).