linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] iwlwifi: replace 0x8086 with PCI_VENDOR_ID_INTEL
       [not found] <11944155883607-git-send-email-reinette.chatre@intel.com>
@ 2007-11-07  6:06 ` Reinette Chatre
  2007-11-07  6:06   ` [PATCH 2/5] iwl4965: fix cannot find a suitable rate issue Reinette Chatre
  0 siblings, 1 reply; 6+ messages in thread
From: Reinette Chatre @ 2007-11-07  6:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi, Reinette Chatre

From: Zhu Yi <yi.zhu@intel.com>

Replace 0x8086 with PCI_VENDOR_ID_INTEL for PCI_DEVICE declaration.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-3945.c |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-4965.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index e9cb40e..101b970 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2267,8 +2267,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv)
 }
 
 struct pci_device_id iwl_hw_card_ids[] = {
-	{PCI_DEVICE(0x8086, 0x4222)},
-	{PCI_DEVICE(0x8086, 0x4227)},
+	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4222)},
+	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4227)},
 	{0}
 };
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index fed2357..620f125 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4690,8 +4690,8 @@ void iwl_hw_cancel_deferred_work(struct iwl_priv *priv)
 }
 
 struct pci_device_id iwl_hw_card_ids[] = {
-	{PCI_DEVICE(0x8086, 0x4229)},
-	{PCI_DEVICE(0x8086, 0x4230)},
+	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4229)},
+	{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4230)},
 	{0}
 };
 
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] iwl4965: fix cannot find a suitable rate issue
  2007-11-07  6:06 ` [PATCH 1/5] iwlwifi: replace 0x8086 with PCI_VENDOR_ID_INTEL Reinette Chatre
@ 2007-11-07  6:06   ` Reinette Chatre
       [not found]     ` <11944155923015-git-send-email-reinette.chatre@intel.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Reinette Chatre @ 2007-11-07  6:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Mohamed Abbas, Zhu Yi, Reinette Chatre

From: Mohamed Abbas <mabbas@linux.intel.com>

This patch fixes the iwl4965 problem for "Can not find a suitable rate
issues." by making rs_switch_to_mimo and rs_switch_to_siso functions
return -1 when CONFIG_IWL4965_HT is not selected. They used to return 0,
which means we can switch to HT rate causing the rate scale problem and
the error message.

The patch also fix another bug reported by Ben Cahill that it uses wrong
value for max_success_limit.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965-rs.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 5189788..19d1b05 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -782,7 +782,7 @@ static void rs_set_stay_in_table(u8 is_legacy,
 	if (is_legacy) {
 		lq_data->table_count_limit = IWL_LEGACY_TABLE_COUNT;
 		lq_data->max_failure_limit = IWL_LEGACY_FAILURE_LIMIT;
-		lq_data->max_success_limit = IWL_LEGACY_TABLE_COUNT;
+		lq_data->max_success_limit = IWL_LEGACY_SUCCESS_LIMIT;
 	} else {
 		lq_data->table_count_limit = IWL_NONE_LEGACY_TABLE_COUNT;
 		lq_data->max_failure_limit = IWL_NONE_LEGACY_FAILURE_LIMIT;
@@ -937,9 +937,10 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,
 
 	IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
 		     tbl->current_rate.rate_n_flags, is_green);
-
-#endif				/*CONFIG_IWL4965_HT */
 	return 0;
+#else
+	return -1;
+#endif				/*CONFIG_IWL4965_HT */
 }
 
 static int rs_switch_to_siso(struct iwl_priv *priv,
@@ -991,9 +992,11 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
 	rs_mcs_from_tbl(&tbl->current_rate, tbl, rate, is_green);
 	IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
 		     tbl->current_rate.rate_n_flags, is_green);
+	return 0;
+#else
+	return -1;
 
 #endif				/*CONFIG_IWL4965_HT */
-	return 0;
 }
 
 static int rs_move_legacy_other(struct iwl_priv *priv,
@@ -1282,7 +1285,7 @@ static void rs_stay_in_table(struct iwl_rate_scale_priv *lq_data)
 			lq_data->total_failed = 0;
 			lq_data->total_success = 0;
 			lq_data->flush_timer = 0;
-		} else if (lq_data->table_count > 0) {
+		} else {
 			lq_data->table_count++;
 			if (lq_data->table_count >=
 			    lq_data->table_count_limit) {
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] remove unused iwl4965_init_hw_rates function
       [not found]     ` <11944155923015-git-send-email-reinette.chatre@intel.com>
@ 2007-11-07  6:06       ` Reinette Chatre
  2007-11-07  6:06         ` [PATCH 5/5] MAINTAINERS: Add Reinette Chatre to iwlwifi & ipw2100/ipw2200 Reinette Chatre
  2007-11-08 18:22       ` [PATCH 3/5] iwlwifi: cleanup namespace Christoph Hellwig
  1 sibling, 1 reply; 6+ messages in thread
From: Reinette Chatre @ 2007-11-07  6:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi, Reinette Chatre

From: Zhu Yi <yi.zhu@intel.com>

The patch removes the unused function to fix a recursive bug caused
by namespace change.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965.c     |    8 --------
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    2 --
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index f7c5ac3..9b8560d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4269,14 +4269,6 @@ static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id,
 
 #endif/* CONFIG_IWL4965_HT_AGG */
 #endif /* CONFIG_IWL4965_HT */
-/*
- * RATE SCALE CODE
- */
-int iwl4965_init_hw_rates(struct iwl4965_priv *priv, struct ieee80211_rate *rates)
-{
-	return 0;
-}
-
 
 /**
  * iwl4965_add_station - Initialize a station's hardware rate table
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 7549224..64366c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5626,8 +5626,6 @@ static void iwl4965_init_hw_rates(struct iwl4965_priv *priv,
 		if (IWL_BASIC_RATES_MASK & (1 << i))
 			rates[i].flags |= IEEE80211_RATE_BASIC;
 	}
-
-	iwl4965_init_hw_rates(priv, rates);
 }
 
 /**
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] MAINTAINERS: Add Reinette Chatre to iwlwifi & ipw2100/ipw2200
  2007-11-07  6:06       ` [PATCH 4/5] remove unused iwl4965_init_hw_rates function Reinette Chatre
@ 2007-11-07  6:06         ` Reinette Chatre
  0 siblings, 0 replies; 6+ messages in thread
From: Reinette Chatre @ 2007-11-07  6:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Reinette Chatre, Zhu Yi

Also fix Zhu Yi's name.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Zhu Yi <yi.zhu@intel.com>
---
 MAINTAINERS |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 498e890..f300a65 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2039,10 +2039,12 @@ W:	http://sourceforge.net/projects/e1000/
 S:	Supported
 
 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
-P:	Yi Zhu
+P:	Zhu Yi
 M:	yi.zhu@intel.com
 P:	James Ketrenos
 M:	jketreno@linux.intel.com
+P:	Reinette Chatre
+M:	reinette.chatre@intel.com
 L:	linux-wireless@vger.kernel.org
 L:	ipw2100-devel@lists.sourceforge.net
 L:	http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
@@ -2050,10 +2052,12 @@ W:	http://ipw2100.sourceforge.net
 S:	Supported
 
 INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
-P:	Yi Zhu
+P:	Zhu Yi
 M:	yi.zhu@intel.com
 P:	James Ketrenos
 M:	jketreno@linux.intel.com
+P:	Reinette Chatre
+M:	reinette.chatre@intel.com
 L:	linux-wireless@vger.kernel.org
 L:	ipw2100-devel@lists.sourceforge.net
 L:	http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
@@ -2063,6 +2067,8 @@ S:	Supported
 INTEL WIRELESS WIFI LINK (iwlwifi)
 P:	Zhu Yi
 M:	yi.zhu@intel.com
+P:	Reinette Chatre
+M:	reinette.chatre@intel.com
 L:	linux-wireless@vger.kernel.org
 L:	ipw3945-devel@lists.sourceforge.net
 W:	http://intellinuxwireless.org
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/5] iwlwifi: cleanup namespace
       [not found]     ` <11944155923015-git-send-email-reinette.chatre@intel.com>
  2007-11-07  6:06       ` [PATCH 4/5] remove unused iwl4965_init_hw_rates function Reinette Chatre
@ 2007-11-08 18:22       ` Christoph Hellwig
  2007-11-09  1:53         ` Zhu Yi
  1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2007-11-08 18:22 UTC (permalink / raw)
  To: Reinette Chatre; +Cc: linville, linux-wireless, Christoph Hellwig, Zhu Yi

On Tue, Nov 06, 2007 at 10:06:26PM -0800, Reinette Chatre wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> Prefix all symbols with iwl3945_ or iwl4965_ and thus allow building
> the driver into the kernel. Also remove all the useless default statements
> in Kconfig while we're at it.

Any chance we can get this whole patch series into 2.6.24?  It's just
a blind cleanup of the symbols and having two new drivers that can't
be built into the kernel or loaded into the kernel is rather
embarassing.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/5] iwlwifi: cleanup namespace
  2007-11-08 18:22       ` [PATCH 3/5] iwlwifi: cleanup namespace Christoph Hellwig
@ 2007-11-09  1:53         ` Zhu Yi
  0 siblings, 0 replies; 6+ messages in thread
From: Zhu Yi @ 2007-11-09  1:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Reinette Chatre, linville, linux-wireless


On Thu, 2007-11-08 at 19:22 +0100, Christoph Hellwig wrote:
> Any chance we can get this whole patch series into 2.6.24?  It's just
> a blind cleanup of the symbols and having two new drivers that can't
> be built into the kernel or loaded into the kernel is rather
> embarassing.

No. It's not a that "simple" cleanup. We actually found a endless
recursive bug in your previous patch (already fixed in this one). There
is a static iwl_init_hw_rates() in iwl4965-base.c and there is also a
public iwl4965_init_hw_rates() in iwl-4965.c. When you do the string
replacement, it became a endless recursive for iwl4965_init_hw_rates().

Furthermore, although both of the drivers can be built into kernel at
the same time, it is useless if you do so now. Because if you make a
network driver build in the kernel, it is initialized in a very early
stage (before hd, sata). Currently the iwlwifi drivers (I think also
other wireless drivers) load the firmware in pci_probe(), we have to
move it to interface open() time to resolve this problem. But this is
not so easy as it looks like: iwlwifi drivers cannot get MAC address
before firmware is loaded and running, but mac80211 requires MAC address
from the driver when ieee80211_register_hw() is called.
ieee80211_register_hw() creates the wlan0 interface. You have no
interface if you don't call ieee80211_register_hw() at pci_probe()...

I'll come up a patch to delay the device MAC address get until
wlan0->start() is called for mac80211. So that I can delay the firmware
loading from pci probe to interface open time for iwlwifi drivers. In
conclusion, the patch only makes iwlwifi drivers compile but not work
for the kernel build in case. More patches will come. And we have to
target it for 2.6.25.

Thanks,
-yi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-09  2:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <11944155883607-git-send-email-reinette.chatre@intel.com>
2007-11-07  6:06 ` [PATCH 1/5] iwlwifi: replace 0x8086 with PCI_VENDOR_ID_INTEL Reinette Chatre
2007-11-07  6:06   ` [PATCH 2/5] iwl4965: fix cannot find a suitable rate issue Reinette Chatre
     [not found]     ` <11944155923015-git-send-email-reinette.chatre@intel.com>
2007-11-07  6:06       ` [PATCH 4/5] remove unused iwl4965_init_hw_rates function Reinette Chatre
2007-11-07  6:06         ` [PATCH 5/5] MAINTAINERS: Add Reinette Chatre to iwlwifi & ipw2100/ipw2200 Reinette Chatre
2007-11-08 18:22       ` [PATCH 3/5] iwlwifi: cleanup namespace Christoph Hellwig
2007-11-09  1:53         ` Zhu Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).