Search Linux Wireless

[PATCH (2.6.24) 1/3] iwlwifi: fix add_interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The iwlwifi drivers both make mac80211 accept an arbitrary number of
virtual interfaces while in reality they can only support one. Fix that.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Cc: Zhu Yi <yi.zhu@xxxxxxxxx>
Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Cc: linux-wireless <linux-wireless@xxxxxxxxxxxxxxx> 
---
Please apply this to 2.6.24 as that has userspace interface (nl80211) to
add/remove virtual interfaces. There's *LOTS* to be done for proper
support, e.g. monitor mode is completely messed up, but this at least
doesn't let the user create multiple interfaces that won't work.

Please push to Jeff for .24.

 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.orig/drivers/net/wireless/iwlwifi/iwl3945-base.c	2007-11-26 23:23:59.689045194 +0100
+++ linux-2.6/drivers/net/wireless/iwlwifi/iwl3945-base.c	2007-11-26 23:24:06.049043241 +0100
@@ -6942,7 +6942,7 @@ static int iwl_mac_add_interface(struct 
 
 	if (priv->interface_id) {
 		IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
-		return 0;
+		return -EOPNOTSUPP;
 	}
 
 	spin_lock_irqsave(&priv->lock, flags);
--- linux-2.6.orig/drivers/net/wireless/iwlwifi/iwl4965-base.c	2007-11-26 23:23:36.929050673 +0100
+++ linux-2.6/drivers/net/wireless/iwlwifi/iwl4965-base.c	2007-11-26 23:23:45.039044868 +0100
@@ -7332,7 +7332,7 @@ static int iwl_mac_add_interface(struct 
 
 	if (priv->interface_id) {
 		IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
-		return 0;
+		return -EOPNOTSUPP;
 	}
 
 	spin_lock_irqsave(&priv->lock, flags);

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux