Skip to contentSkip to conversation

orinoco: Remove conditionals that are useless in the kernel drivers.

PATCH In review Pavel Roskin 2 participants 3 messages Sep 16, 2005 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 orinoco: Remove conditionals that are useless in the kernel drivers.

diff-tree 7c5bc25c778643f8cdf930ad8391b9eac24a16e4 (from 065d9cac98a5406ecd5a1368f8fd38f55739dee9)

Author: Pavel Roskin <proski-mXXj517/[email protected]>
Date:   Fri Sep 16 00:49:05 2005 -0400

Remove conditionals that are useless in the kernel drivers.

Kernel drivers are never compiled against pcmcia-cs headers. Firmware is never embedded into spectrum_cs module.

drivers/net/wireless/orinoco_cs.c +0 -3
@@ -12,13 +12,10 @@
 
 #define DRIVER_NAME "orinoco_cs"
 #define PFX DRIVER_NAME ": "
 
 #include <linux/config.h>
-#ifdef  __IN_PCMCIA_PACKAGE__
-#include <pcmcia/k_compat.h>
-#endif /* __IN_PCMCIA_PACKAGE__ */
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
drivers/net/wireless/spectrum_cs.c +1 -25
@@ -20,13 +20,10 @@
 
 #define DRIVER_NAME "spectrum_cs"
 #define PFX DRIVER_NAME ": "
 
 #include <linux/config.h>
-#ifdef  __IN_PCMCIA_PACKAGE__
-#include <pcmcia/k_compat.h>
-#endif /* __IN_PCMCIA_PACKAGE__ */
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
@@ -36,10 +33,11 @@
 #include <linux/ioport.h>
 #include <linux/netdevice.h>
 #include <linux/if_arp.h>
 #include <linux/etherdevice.h>
 #include <linux/wireless.h>
+#include <linux/firmware.h>
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
@@ -49,33 +47,14 @@
 #include <asm/io.h>
 #include <asm/system.h>
 
 #include "orinoco.h"
 
-/*
- * If SPECTRUM_FW_INCLUDED is defined, the firmware is hardcoded into
- * the driver.  Use get_symbol_fw script to generate spectrum_fw.h and
- * copy it to the same directory as spectrum_cs.c.
- *
- * If SPECTRUM_FW_INCLUDED is not defined, the firmware is loaded at the
- * runtime using hotplug.  Use the same get_symbol_fw script to generate
- * files symbol_sp24t_prim_fw symbol_sp24t_sec_fw, copy them to the
- * hotplug firmware directory (typically /usr/lib/hotplug/firmware) and
- * make sure that you have hotplug installed and enabled in the kernel.
- */
-/* #define SPECTRUM_FW_INCLUDED 1 */
-
-#ifdef SPECTRUM_FW_INCLUDED
-/* Header with the firmware */
-#include "spectrum_fw.h"
-#else	/* !SPECTRUM_FW_INCLUDED */
-#include <linux/firmware.h>
 static unsigned char *primsym;
 static unsigned char *secsym;
 static const char primary_fw_name[] = "symbol_sp24t_prim_fw";
 static const char secondary_fw_name[] = "symbol_sp24t_sec_fw";
-#endif	/* !SPECTRUM_FW_INCLUDED */
 
 /********************************************************************/
 /* Module stuff							    */
 /********************************************************************/
 
@@ -569,12 +548,10 @@ spectrum_dl_image(hermes_t *hw, dev_link
 static int
 spectrum_dl_firmware(hermes_t *hw, dev_link_t *link)
 {
 	int ret;
 	client_handle_t handle = link->handle;
-
-#ifndef SPECTRUM_FW_INCLUDED
 	const struct firmware *fw_entry;
 
 	if (request_firmware(&fw_entry, primary_fw_name,
 			     &handle_to_dev(handle)) == 0) {
 		primsym = fw_entry->data;
@@ -590,11 +567,10 @@ spectrum_dl_firmware(hermes_t *hw, dev_l
 	} else {
 		printk(KERN_ERR PFX "Cannot find firmware: %s\n",
 		       secondary_fw_name);
 		return -ENOENT;
 	}
-#endif
 
 	/* Load primary firmware */
 	ret = spectrum_dl_image(hw, link, primsym);
 	if (ret) {
 		printk(KERN_ERR PFX "Primary firmware download failed\n");
Signature · 10 lines
Regards,
Pavel Roskin



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#1 lore raw

applied patch 1-3, and then stopped:

Applying 'orinoco: Remove conditionals that are useless in the kernel drivers.'

Wrote tree 38c3d8007e70992829271a2fcf453624d4afadd2
Committed: 65853b133d0256786df25f03eea0e5a6799e8d17

Applying 'orinoco: Don't include <net/ieee80211.h> twice.'

Wrote tree 78dd96949dcb026a37f182255db3d804a4274706
Committed: 27c91efba4c121f90c0e6d371c7064733b286a69

Applying 'orinoco: Update PCMCIA ID's.'

Wrote tree a183ce73c486bfe86ea5e96e9619f2088784bbae
Committed: 9c8a11d7c2298680ff3ee8acda54575c88668bfc

Applying 'orinoco: Add support for WE-16 and WE-17'

error: patch failed: drivers/net/wireless/orinoco.c:133
error: drivers/net/wireless/orinoco.c: patch does not apply
error: patch failed: drivers/net/wireless/orinoco.h:11
error: drivers/net/wireless/orinoco.h: patch does not apply

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi, Jeff!

Quoted 1 line · Jeff Garzik

applied patch 1-3, and then stopped:

[skip]

Quoted 6 lines

Applying 'orinoco: Add support for WE-16 and WE-17'

error: patch failed: drivers/net/wireless/orinoco.c:133
error: drivers/net/wireless/orinoco.c: patch does not apply
error: patch failed: drivers/net/wireless/orinoco.h:11
error: drivers/net/wireless/orinoco.h: patch does not apply

I don't know what you are doing, but the patch applies just fine for me.
Trying to reproduce this problem, I saved the message from the mail
client (Evolution), pulled and seeked to the netdev branch (rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git) and used git-applymbox:

[proski@dv linux-2.6]$ cg-pull netdev
WARNING: The rsync access method is DEPRECATED and will be REMOVED in the future!

receiving file list ... done
HEAD

sent 133 bytes received 861 bytes 397.60 bytes/sec total size is 41 speedup is 0.04

receiving file list ... done

sent 118 bytes received 1027 bytes 763.33 bytes/sec total size is 697 speedup is 0.61
Up to date.
[proski@dv linux-2.6]$ cg-seek netdev
On commit 065d9cac98a5406ecd5a1368f8fd38f55739dee9 [proski@dv linux-2.6]$ git-applymbox ~/commit4.mail

Applying 'orinoco: Add support for WE-16 and WE-17'

Wrote tree 9a0cb331e2d8ca6c372cfafdc8fa95211c20a6ef
Committed: a7484e843aa2a15d4a0fd15326072105539a44dc

Maybe your script doesn't like that the author of that patch is not me, but Jean Tourrilhes?

Or maybe the patch is corrupted on your side? Then please see the attachment (compressed for protection). The patches are also available at http://red-bean.com/proski/orinoco/

Signature · 2 lines
Regards,
Pavel Roskin