Gmane
Favicon
From: Ian Schram <ischram <at> telenet.be>
Subject: Questions raised when reading the (3945) code.
Newsgroups: gmane.linux.drivers.ipw3945.devel
Date: 2007-09-30 16:30:58 GMT (1 year, 39 weeks, 5 days, 18 hours and 54 minutes ago)
As might have been apparent by my previous patches, I've reread the iwl3945 code,
in the hopes of understanding more than last time. While doing that I came across
several items, the ones (I thought) were obvious I have sent patches for. These
are the ones that remain:

1) iwl-hw.h: some comments are >80 columns, but they don't easily scale down

2) in iwl3945-base.c en iwl-4965-base.c
this comment:
	/* We received data from the HW, so stop the watchdog */
appears to be lost, it has been there since the first checkin, but the line it was
originally above was removed. And I can't track down what it might mean in that
position.

3) in iwl_set_rate()
iwl_get_hw_mode() is not followed by a null check, in contrast to all it's other
invocations. Seeing as a call to iwl_set_rxon_channel() which is invoked by a
mac80211 callback. immediately changes the priv->phymode this might cause problems?
although changing phymode probably doesn't occur to often.

and some lesser issues:
4) iwl_check_rxon_cmd ends with a curious sequence of if(error)

5) for iwl_fill_probe_req() is never called with is_direct!=0
and hence some code paths will never be taken

6) Documentation indicates that CSR_INT_BIT_RF_KILL can never be set for 3945
so maybe the check should be removed from the 3945 irq tasklet. I doubt it will
provide noticeable performance gain even though it's a pretty hot codepath.

7) there are several invocations of cpu_to_le16() with constants, where in other
places __constant_cpu_to_le16() is used. I didn't change this because I've been
thought never to use __functions when not absolutely very sure.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/