From: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
To: <linux-wireless@vger.kernel.org>
Cc: <Larry.Finger@lwfinger.net>
Subject: [PATCH 2/9] rtlwifi: don't pass a null pointer to fill_tx_desc
Date: Thu, 3 May 2012 01:10:47 -0400 [thread overview]
Message-ID: <4FA21357.8090600@gtri.gatech.edu> (raw)
In-Reply-To: <4FA212D9.5020602@gtri.gatech.edu>
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0002-rtlwifi-don-t-pass-a-null-pointer-to-fill_tx_desc.patch --]
[-- Type: text/x-patch, Size: 2538 bytes --]
>From bdd269b21d249d75175de4e22c11e2a5bfbb8a08 Mon Sep 17 00:00:00 2001
From: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
Date: Thu, 3 May 2012 00:03:09 -0400
Subject: [PATCH 2/9] rtlwifi: don't pass a null pointer to fill_tx_desc
Take care of "allocating" the txdesc in the usb core, rather than in
each subdriver. This also avoids passing a rather useless null argument
to fill_tx_desc.
Signed-off-by: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
---
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 4 +---
drivers/net/wireless/rtlwifi/usb.c | 6 ++++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..9e01f96 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -513,12 +513,10 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
u16 pktlen = skb->len;
enum rtl_desc_qsel fw_qsel = _rtl8192cu_mq_to_descq(hw, fc,
skb_get_queue_mapping(skb));
- u8 *txdesc;
+ u8 *txdesc = pdesc_tx;
seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
rtl_get_tcb_desc(hw, info, sta, skb, tcb_desc);
- txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE);
- memset(txdesc, 0, RTL_TX_HEADER_SIZE);
SET_TX_DESC_PKT_SIZE(txdesc, pktlen);
SET_TX_DESC_LINIP(txdesc, 0);
SET_TX_DESC_PKT_OFFSET(txdesc, RTL_DUMMY_OFFSET);
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index d04dbda..91969ee 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -850,7 +850,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct rtl_tx_desc *pdesc = NULL;
+ u8 *pdesc = NULL;
struct rtl_tcb_desc tcb_desc;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data);
__le16 fc = hdr->frame_control;
@@ -887,7 +887,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
seq_number += 1;
seq_number <<= 4;
}
- rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+ pdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE);
+ memset(pdesc, 0, RTL_TX_HEADER_SIZE);
+ rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, pdesc, info, skb,
hw_queue, &tcb_desc);
if (!ieee80211_has_morefrags(hdr->frame_control)) {
if (qc)
--
1.7.7.6
next prev parent reply other threads:[~2012-05-03 5:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 5:08 [WIP] rtlwifi: rtl8192su subdriver Joshua Roys
2012-05-03 5:10 ` [PATCH 1/9] rtlwifi: avoid race registering with mac80211 Joshua Roys
2012-05-03 17:10 ` Larry Finger
2012-05-03 17:21 ` Joshua Roys
2012-05-03 18:55 ` Larry Finger
2012-05-03 5:10 ` Joshua Roys [this message]
2012-05-03 5:11 ` [PATCH 3/9] rtlwifi: fix typo Joshua Roys
2012-05-03 5:11 ` [PATCH 4/9] rtlwifi: fix the selection of the bulk in endpoint Joshua Roys
2012-05-03 16:07 ` Larry Finger
2012-05-03 16:47 ` Joshua Roys
2012-05-03 5:12 ` [PATCH 5/9] rtlwifi: check for all 8192Sx-family cards for efuse operations Joshua Roys
2012-05-03 5:12 ` [PATCH 6/9] rtlwifi: add short circuit in the receive path Joshua Roys
2012-05-03 5:13 ` [PATCH 7/9] rtlwifi: fail rtl_usb_start if any bulk in urbs fail Joshua Roys
2012-05-03 5:13 ` [PATCH 8/9] rtlwifi: ugly hack to enable feature disparity between subdrivers Joshua Roys
2012-05-03 5:15 ` [PATCH 9/9] [WIP] rtlwifi: add rtl8192su subdriver Joshua Roys
2012-05-08 2:18 ` [WIP v2] rtlwifi: " Joshua Roys
2012-05-08 2:18 ` [PATCH 1/9] rtlwifi: don't pass a null pointer to fill_tx_desc Joshua Roys
2012-05-08 2:18 ` [PATCH 2/9] rtlwifi: fix typo Joshua Roys
2012-05-08 2:18 ` [PATCH 3/9] rtlwifi: fix the selection of the bulk in endpoint Joshua Roys
2012-05-08 2:18 ` [PATCH 4/9] rtlwifi: check for all 8192Sx-family cards for efuse operations Joshua Roys
2012-05-08 2:18 ` [PATCH 5/9] rtlwifi: add short circuit in the receive path Joshua Roys
2012-05-08 2:18 ` [PATCH 6/9] rtlwifi: fail rtl_usb_start if any bulk in urbs fail Joshua Roys
2012-05-08 2:18 ` [PATCH 7/9] rtlwifi: mimic rtl_pci_stop and disable LEDs Joshua Roys
2012-05-08 2:18 ` [PATCH 8/9] rtlwifi: ugly hack to enable feature disparity between subdrivers Joshua Roys
2012-05-08 2:18 ` [PATCH 9/9] rtlwifi: add rtl8192su subdriver Joshua Roys
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=4FA21357.8090600@gtri.gatech.edu \
--to=joshua.roys@gtri.gatech.edu \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.