From: Christian Lamparter <chunkeey@googlemail.com>
To: Larry.Finger@lwfinger.net
Cc: linux-wireless@vger.kernel.org, Joshua.Roys@gtri.gatech.edu
Subject: [RFC] rtlwifi: fix in_ep = in_ep_num mishap in _rtl_usb_init_rx
Date: Sun, 14 Oct 2012 22:13:56 +0200 [thread overview]
Message-ID: <201210142213.56197.chunkeey@googlemail.com> (raw)
in_ep and in_ep_num should not be the same as
a device can have a different in_ep than "1".
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
Note:
This patch is related to:
"[PATCH 3/9] rtlwifi: fix the selection of the bulk in endpoint"
However, it would be much better if we can get rid of
in_ep_num and define an in_ep array so the rtlwifi
frameworks knows which EPs to scan. But this could be
"too much" of an overkill, so another solution would
be to just have a single in_ep.
Larry, do you know of any hardware which has two in endpoints?
Joshua, I get as far as "blinking LEDs". But the PHY/RF and RX
seem to need more work, or did you have some success with it
and it's just the HW combination/refactoring that broke it?!
Regards,
Chr
---
rtlwifi/rtl8192cu/sw.c | 1 +
rtlwifi/usb.c | 3 ++-
rtlwifi/wifi.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/rtlwifi/rtl8192cu/sw.c b/rtlwifi/rtl8192cu/sw.c
index 9970c2b..24b6f69 100644
--- a/rtlwifi/rtl8192cu/sw.c
+++ b/rtlwifi/rtl8192cu/sw.c
@@ -151,6 +151,7 @@ MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {
/* rx */
+ .in_ep = RTL92C_USB_BULK_IN_NUM,
.in_ep_num = RTL92C_USB_BULK_IN_NUM,
.rx_urb_num = RTL92C_NUM_RX_URBS,
.rx_max_size = RTL92C_SIZE_MAX_RX_BUFFER,
diff --git a/rtlwifi/usb.c b/rtlwifi/usb.c
index 31db282..d7744e1 100644
--- a/rtlwifi/usb.c
+++ b/rtlwifi/usb.c
@@ -306,7 +306,8 @@ static int _rtl_usb_init_rx(struct ieee80211_hw *hw)
rtlusb->rx_max_size = rtlpriv->cfg->usb_interface_cfg->rx_max_size;
rtlusb->rx_urb_num = rtlpriv->cfg->usb_interface_cfg->rx_urb_num;
- rtlusb->in_ep = rtlpriv->cfg->usb_interface_cfg->in_ep_num;
+ rtlusb->in_ep = rtlpriv->cfg->usb_interface_cfg->in_ep;
+ rtlusb->in_ep_nums = rtlpriv->cfg->usb_interface_cfg->in_ep_num;
rtlusb->usb_rx_hdl = rtlpriv->cfg->usb_interface_cfg->usb_rx_hdl;
rtlusb->usb_rx_segregate_hdl =
rtlpriv->cfg->usb_interface_cfg->usb_rx_segregate_hdl;
diff --git a/rtlwifi/wifi.h b/rtlwifi/wifi.h
index ad02203..882b870 100644
--- a/rtlwifi/wifi.h
+++ b/rtlwifi/wifi.h
@@ -1550,6 +1550,7 @@ struct rtl_mod_params {
struct rtl_hal_usbint_cfg {
/* data - rx */
+ u32 in_ep;
u32 in_ep_num;
u32 rx_urb_num;
u32 rx_max_size;
--
1.7.10.4
next reply other threads:[~2012-10-14 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 20:13 Christian Lamparter [this message]
2012-10-14 23:38 ` [RFC] rtlwifi: fix in_ep = in_ep_num mishap in _rtl_usb_init_rx Larry Finger
2012-10-15 10:42 ` Christian Lamparter
2012-10-15 15:13 ` Larry Finger
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=201210142213.56197.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=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.