Re: Problem with Kernel Oops in ipw2200

Zhu Yi <[email protected]> Fri, 14 Nov 2008 10:58:58 +0800
Newsgroups gmane.linux.kernel.wireless.general,gmane.linux.drivers.ipw2100.devel
Organization Intel Corp.
Message-ID <[email protected]>
On Thu, 2008-11-13 at 17:16 +0800, Frank Seidel wrote:
> The problem is that before this patch ipw2200 didn't have that problem
> and now with it is constantly on various machines is running in
> a kernel oops at ipw_tx_skb called by ipw_net_hard_start_xmit.
> So imho that patch introduced the bug somehow and even partly
> reverting it fixes the problem here on my testmachine.

May I have your oops log?

Please try if attached patch fix the problem.

Thanks,
-yi
ipw2200-send-noassoc.patch (text/x-patch, 548 B)
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 65a733d..0a14dea 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -10197,6 +10197,11 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
 	u16 remaining_bytes;
 	int fc;
 
+	if (!(priv->status & STATUS_ASSOCIATED)) {
+		IPW_DEBUG("Tx attempt while not associated.\n");
+		goto drop;
+	}
+
 	hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
 	switch (priv->ieee->iw_mode) {
 	case IW_MODE_ADHOC: