- Jun 02, 2010
-
-
Julia Lawall authored
Use kmemdup when some other buffer is immediately copied into the allocated region. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @@ expression from,to,size,flag; statement S; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = kmemdup(from,size,flag); if (to==NULL || ...) S - memcpy(to, from, size); // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Acked-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- May 14, 2010
-
-
Joe Perches authored
This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 03, 2010
-
-
John W. Linville authored
Looks like we missed removing the return statement in the non-CONFIG_IWM_DEBUG dummy implementation of iwm_debugfs_init... Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
John W. Linville authored
"iwl: cleanup: remove unneeded error handling" missed the one in if_sdio_debugfs_init(). I don't think we even need to check -ENODEV ourselves because if DEBUG_FS is not compiled in, all the debugfs utility functions will become no-op. Reported-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Acked-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Apr 28, 2010
-
-
Dan Carpenter authored
This is just a cleanup and doesn't change how the code works. debugfs_create_dir() and debugfs_create_file() return an error pointer (-ENODEV) if CONFIG_DEBUG_FS is not enabled, otherwise if an error occurs they return NULL. This is how they are implemented and what it says in the DebugFS documentation. DebugFS can not be compiled as a module. As a result, we only need to check for error pointers and particularly -ENODEV one time to know that DebugFS is enabled. This patch keeps the first check for error pointers and removes the rest. The other reason for this patch, is that it silences some Smatch warnings. Smatch sees the condition "(result != -ENODEV)" and assumes that it's possible for "result" to equal -ENODEV. If it were possible it would lead to an error pointer dereference. But since it's not, we can just remove the check. Signed-off-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Apr 16, 2010
-
-
Samuel Ortiz authored
Add -D__CHECK_ENDIAN__ to driver ccflags so that sparse will always check endianness by default. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Mar 30, 2010
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by:
Tejun Heo <tj@kernel.org> Guess-its-ok-by:
Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- Mar 10, 2010
-
-
Zhu Yi authored
Fix wrong IWM_RX_TICKET_DROP_REASON_MSK macro define, typo and other small cleanups. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
This fixes the sparse warnings. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
Increase concatenated buffer from 8K to 32K to get better performance. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
Protect rx_tickets and rx_packets[] lists with spinlocks to fix the race condition for concurrent list operations. In iwmc3200wifi both sdio_isr_worker and rx_worker workqueues can access the rx ticket and packets lists at the same time under high rx load. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
Add event tracer for iwmc3200wifi driver. When enabled, all the commands and responses between the driver and firmware (also including Tx/Rx frames) will be recorded in the ftrace ring buffer. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
Use list_for_each_entry instead of list_for_each_entry_safe in places iteration against list entry removal is not required. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
We need to make sure we don't associate with APs on unallowed channels (according to regulatory setting). This could happen when the channel is not specified (auto-select) within the connection request. In this case we get the AP's channel until the firmware indicates the association succeeded later. We need to verify the associated channel. If the channel is disabled by regulatory, we have to disassociate with the AP. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Mar 06, 2010
-
-
Akinobu Mita authored
Rename for_each_bit to for_each_set_bit in the kernel source tree. To permit for_each_clear_bit(), should that ever be added. The patch includes a macro to map the old for_each_bit() onto the new for_each_set_bit(). This is a (very) temporary thing to ease the migration. [akpm@linux-foundation.org: add temporary for_each_bit()] Suggested-by:
Alexey Dobriyan <adobriyan@gmail.com> Suggested-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Artem Bityutskiy <dedekind@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Feb 09, 2010
-
-
Roel Kluin authored
The wrong pointer was tested. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Acked-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Daniel Mack authored
In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by:
Daniel Mack <daniel@caiaq.de> Cc: Joe Perches <joe@perches.com> Cc: Junio C Hamano <gitster@pobox.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Jan 14, 2010
-
-
Samuel Ortiz authored
Without this header, we can trigger a UMAC crash with debug enabled UMACs. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
John W. Linville authored
This reverts commit 6c853da3. From Message-ID: <1262663293.551.117.camel@debian> On Sat, 2010-01-02 at 22:09 +0800, Dan Carpenter wrote: > It don't think 6c853da3 is right. That's the patch > titled "iwmc3200wifi: fix array out-of-boundary access" > > Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array > index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH(). > > In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH > and I don't see any array out-of-bounds. > > #define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH) Ah, you are right. I took '%' for '&'. John, would you revert it? Sorry for the false alarm. Thanks, -yi Reported-by:
Dan Carpenter <error27@gmail.com> Reviewed-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 28, 2009
-
-
Zhu Yi authored
Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH(). Cc: stable@kernel.org Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 22, 2009
-
-
Joe Perches authored
Determine the offset at compile time. Signed-off-by:
Joe Perches <joe@perches.com> Acked-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
When the device receives an A-MSDU frame (indicated by flag IWM_RX_TICKET_AMSDU_MSK), use ieee80211_amsdu_to_8023s to convert it to a list of 802.3 frames and handled them to upper layer. Cc: Johannes Berg <johannes@sipsolutions.net> Acked-by:
Samuel Ortiz <samuel@sortiz.org> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 21, 2009
-
-
Roel Kluin authored
`queue' was unsigned so the test did not work. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Reviewed-by:
Pavel Roskin <proski@gnu.org> Acked-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 04, 2009
-
-
Samuel Ortiz authored
When debugging the wifi firmware, we need to disable the wimax core to gain some memory space. The default value will keep the wimax core enabled. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
Wifi and wimax coexistence mode is set by wifi at boot time. There can be several modes, defined by priority tables. User space components can decide which one to select by writing to /sys/module/iwmc3200wifi/parameters/wiwi with this patch, before bringing the interface up. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
When sending the wiwi coexistence priority table, we should not tell the LMAC that we want a response. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
This update follows the firmware engineers recommendations. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
When handling IWM_CMD_PMKID_FLUSH command, the bssid and pmkid in pmksa are all NULL. Check it before memcpy. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Acked-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
André Goddard Rosa authored
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by:
André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Nov 28, 2009
-
-
Samuel Ortiz authored
We need to implement the PMKSA API for proper WPA2 pre-auth and fast re-association. Our fullmac device generates all (re-)assoc IEs, and thus it needs the right PMKIDs. With this implementation we now get them from wpa_supplicant. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
The tx concatenation option works fine now, we no longer need the debugging option of disabling concatenation. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
We add the stopped queue count and display to the tx queue debugfs entry. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
To support 802.11n Tx aggregation support with iwmc3200 wifi, we have to handle the UMAC_CMD_OPCODE_STOP_RESUME_STA_TX notification from the UMAC. Before sending an AddBA, the UMAC synchronizes with the host in order to know what is the last Tx frame it's supposed to receive before it will be able to start the actual aggregation session. We thus have to keep track of the last sequence number that is scheduled for transmission on a particular RAxTID, send an answer to the UMAC with this sequence number. The UMAC then does the BA negociation and once it's done with it sends a new UMAC_CMD_OPCODE_STOP_RESUME_STA_TX notification to let us know that we can resume the Tx flow on the specified RAxTID. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Reviewed-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Zhu Yi authored
Set the wireless mode with regard to both the driver's configuration and the device's EEPROM result. Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
The iwmc3200wifi eeprom contains information about the available PHYs on the chip. We should update our wireless_mode setting and profile according to it. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
When we're down, we shouldnt try to set the UMAC power limit. We just return 0 instead, and cfg80211 toggles the soft rfkill state. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Samuel Ortiz authored
The fat channels eeprom entries let us know if 11n is enabled or not. We update our wiphy supported bands based on that. Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Zhu Yi <yi.zhu@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Nov 11, 2009
-
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <ben@decadent.org.uk> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Oct 30, 2009
-
-
John W. Linville authored
With the WLAN_PRE80211 drivers moved to drivers/staging, this distinction becomes unnecessary. Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-