linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
	Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Subject: Re: [PATCH] rtl8187b work in progress...
Date: Thu, 03 Apr 2008 23:21:23 -0400	[thread overview]
Message-ID: <1207279283.2585.11.camel@dv> (raw)
In-Reply-To: <1207074268-16335-1-git-send-email-linville@tuxdriver.com>

On Tue, 2008-04-01 at 14:24 -0400, John W. Linville wrote:
> No idea if it even compiles...

Sorry for delay.  Thanks for the code!  It needs some minor changes to
compile:

diff --git a/drivers/net/wireless/rtl8187.h b/drivers/net/wireless/rtl8187.h
index 4c297d1..35c6486 100644
--- a/drivers/net/wireless/rtl8187.h
+++ b/drivers/net/wireless/rtl8187.h
@@ -50,6 +50,13 @@ struct rtl8187_tx_info {
 	struct ieee80211_hw *dev;
 };
 
+enum {
+	DEVICE_RTL8187,
+	DEVICE_RTL8187B
+};
+
+#define RTL818X_MSR_ENEDCA		(1 << 4)
+
 /* Tx flags are common between rtl8187 and rtl8187b */
 #define RTL8187_TX_FLAG_NO_ENCRYPT	(1 << 15)
 #define RTL8187_TX_FLAG_MORE_FRAG	(1 << 17)
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index ec7f80b..b1b2548 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -224,7 +224,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
 	info->urb = urb;
 	info->dev = dev;
 	usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2),
-			  priv->is_rtl8187b ? hdr_b : hdr,
+			  priv->is_rtl8187b ? (void *)hdr_b : (void *)hdr,
 			  skb->len, rtl8187_tx_cb, skb);
 	usb_submit_urb(urb, GFP_ATOMIC);
 

Plus there are spurious messages about uninitialized hdr and hdr_b in
rtl8187_tx().  Perhaps a cleaner solution would be to use a union or
separate functions to populate the header, but that's details.  sparse
doesn't report anything serious.

Anyway, the module loads fine:

rtl8187 1-1:1.0: usb_probe_interface
rtl8187 1-1:1.0: usb_probe_interface - got id
phy2: Selected rate control algorithm 'pid'
phy2: hwaddr 00:14:d1:45:a9:0b, rtl8187 V0 + rtl8225
usbcore: registered new interface driver rtl8187

But if I bring the interface up, it takes a lot of time, and I get this
in the kernel log:

phy2: RF Calibration Failed! 0

Scanning causes immediate kernel panic in
ieee80211_generic_frame_duration(), which is called from rtl8187_tx().
Sorry, no time to capture the backtrace now, but it's the code added by
you.

-- 
Regards,
Pavel Roskin

  parent reply	other threads:[~2008-04-04  3:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 23:13 Problems with RTL8187 USB device Larry Finger
2008-02-27  1:07 ` John W. Linville
2008-02-27  5:27   ` Larry Finger
2008-03-01 19:21     ` Larry Finger
2008-03-25 20:31   ` Daniel Gimpelevich
2008-04-01 15:41     ` Daniel Gimpelevich
2008-04-01 17:51       ` John W. Linville
2008-04-01 18:07         ` Daniel Gimpelevich
2008-04-01 18:24           ` [PATCH] rtl8187b work in progress John W. Linville
2008-04-02  0:09             ` Herton Ronaldo Krzesinski
2008-04-02  2:40               ` Herton Ronaldo Krzesinski
2008-04-04  3:33                 ` Pavel Roskin
2008-04-04 14:07                   ` Herton Ronaldo Krzesinski
2008-04-04 15:17                     ` Pavel Roskin
2008-04-07 12:01                       ` Herton Ronaldo Krzesinski
2008-04-04  3:21             ` Pavel Roskin [this message]
2008-04-01 21:26           ` Problems with RTL8187 USB device Pavel Roskin

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=1207279283.2585.11.camel@dv \
    --to=proski@gnu.org \
    --cc=daniel@gimpelevich.san-francisco.ca.us \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).