Skip to contentSkip to conversation

Fix iwl6000 does not work in 2.6.31 kernel

PATCH In review Ike Panhc 6 participants 18 messages Dec 15, 2009 – Dec 17, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Ike Panhc

author
#0 lore raw

cover Fix iwl6000 does not work in 2.6.31 kernel

User reports that the Ubuntu Karmic (2.6.31-14-generic) recognize the the PCI id of iwl6000 series but can not scan for APs and not even to associate to AP. We need two commits cherry-picked from mainline kernel to fix this problem.

Since we have only version 4 firmware for iwl6000 in the linux-firmware package. We need to change the IWL6000_UCODE_API_MAX to v4 for driver to load version 4 firmware.

After fixing the firmware loading issue, the dmesg reports randomly command timeout for RXON, Unifying RXON timing is necessary for iwl6000. One minor conflict solved due to we still need sw_crypto in iwl-dev.h

Patches against linux-2.6.31.8 and Ubuntu-2.6.31-17.54 are listed below.

Ike Panhc (1):
iwlwifi: unify iwl_setup_rxon_timing

Wey-Yi Guy (1):
iwlwifi: change IWL6000_UCODE_API_MAX to v4

 drivers/net/wireless/iwlwifi/iwl-3945.c     |    1 +
 drivers/net/wireless/iwlwifi/iwl-6000.c     |    4 +-
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   64 -----------------------
 drivers/net/wireless/iwlwifi/iwl-commands.h |   20 +++++++-
 drivers/net/wireless/iwlwifi/iwl-core.c     |   59 +++++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 +
 drivers/net/wireless/iwlwifi/iwl-dev.h      |    1 +
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   74 +--------------------------
 8 files changed, 84 insertions(+), 140 deletions(-)
author
#1 lore raw

PATCH 1/2 iwlwifi: change IWL6000_UCODE_API_MAX to v4

From: Wey-Yi Guy <[email protected]>

uCode version changed to v4 for 6000 series

The additional parameter added to v4 is providing current tx power for each chain in tx statistics portion of "statistics notification" command.

(cherry picked from commit fcbaf8b06da385c73cb6218f079e9ddba9ee9f7c)
---
 drivers/net/wireless/iwlwifi/iwl-6000.c     |    4 ++--
 drivers/net/wireless/iwlwifi/iwl-commands.h |   18 ++++++++++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
drivers/net/wireless/iwlwifi/iwl-6000.c +2 -2
index e4a405f..45a3b57 100644
@@ -46,8 +46,8 @@
 #include "iwl-5000-hw.h"
 
 /* Highest firmware API version supported */
-#define IWL6000_UCODE_API_MAX 3
-#define IWL6050_UCODE_API_MAX 3
+#define IWL6000_UCODE_API_MAX 4
+#define IWL6050_UCODE_API_MAX 4
 
 /* Lowest firmware API version supported */
 #define IWL6000_UCODE_API_MIN 1
drivers/net/wireless/iwlwifi/iwl-commands.h +16 -2
index c87033b..69a97c7 100644
@@ -2913,6 +2913,20 @@ struct statistics_rx {
 	struct statistics_rx_ht_phy ofdm_ht;
 } __attribute__ ((packed));
 
+/**
+ * struct statistics_tx_power - current tx power
+ *
+ * @ant_a: current tx power on chain a in 1/2 dB step
+ * @ant_b: current tx power on chain b in 1/2 dB step
+ * @ant_c: current tx power on chain c in 1/2 dB step
+ */
+struct statistics_tx_power {
+	u8 ant_a;
+	u8 ant_b;
+	u8 ant_c;
+	u8 reserved;
+} __attribute__ ((packed));
+
 struct statistics_tx_non_phy_agg {
 	__le32 ba_timeout;
 	__le32 ba_reschedule_frames;
@@ -2924,8 +2938,6 @@ struct statistics_tx_non_phy_agg {
 	__le32 underrun;
 	__le32 bt_prio_kill;
 	__le32 rx_ba_rsp_cnt;
-	__le32 reserved2;
-	__le32 reserved3;
 } __attribute__ ((packed));
 
 struct statistics_tx {
@@ -2944,6 +2956,8 @@ struct statistics_tx {
 	__le32 cts_timeout_collision;
 	__le32 ack_or_ba_timeout_collision;
 	struct statistics_tx_non_phy_agg agg;
+	struct statistics_tx_power tx_power;
+	__le32 reserved1;
 } __attribute__ ((packed));
 
 
Signature · 1 line
1.6.3.3
author
#2 lore raw

PATCH 2/2 iwlwifi: unify iwl_setup_rxon_timing

In reply to Ike Panhc

This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal beacon interval. This is reflected in hw_paras.max_beacon_itrvl

(cherry picked from commit 2c2f3b33888419fb9e7d015b9dc67b9db4437efa)

Conflicts:

drivers/net/wireless/iwlwifi/iwl-dev.h

---
 drivers/net/wireless/iwlwifi/iwl-3945.c     |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   64 -----------------------
 drivers/net/wireless/iwlwifi/iwl-commands.h |    2 +
 drivers/net/wireless/iwlwifi/iwl-core.c     |   59 +++++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 +
 drivers/net/wireless/iwlwifi/iwl-dev.h      |    1 +
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   74 +--------------------------
 7 files changed, 66 insertions(+), 136 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -0
index b73ab6c..baef5a8 100644
@@ -2562,6 +2562,7 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
 	priv->hw_params.bcast_sta_id = IWL3945_BROADCAST_ID;
 
 	priv->hw_params.rx_wrt_ptr_reg = FH39_RSCSR_CHNL0_WPTR;
+	priv->hw_params.max_beacon_itrvl = IWL39_MAX_UCODE_BEACON_INTERVAL;
 
 	return 0;
 }
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -64

70 lines not on this page · raw message

drivers/net/wireless/iwlwifi/iwl-commands.h +2 -0
index 69a97c7..a61393a 100644
@@ -765,6 +765,8 @@ struct iwl5000_rxon_assoc_cmd {
 } __attribute__ ((packed));
 
 #define IWL_CONN_MAX_LISTEN_INTERVAL	10
+#define IWL_MAX_UCODE_BEACON_INTERVAL	4 /* 4096 */
+#define IWL39_MAX_UCODE_BEACON_INTERVAL	1 /* 1024 */
 
 /*
  * REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
drivers/net/wireless/iwlwifi/iwl-core.c +59 -0

71 lines not on this page · raw message

drivers/net/wireless/iwlwifi/iwl-core.h +1 -0
index 1e51891..03eef83 100644
@@ -572,6 +572,7 @@ extern void iwl_rx_reply_rx_phy(struct iwl_priv *priv,
 void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
 					   struct iwl_rx_mem_buffer *rxb);
 
+void iwl_setup_rxon_timing(struct iwl_priv *priv);
 static inline int iwl_send_rxon_assoc(struct iwl_priv *priv)
 {
 	return priv->cfg->ops->hcmd->rxon_assoc(priv);
drivers/net/wireless/iwlwifi/iwl-dev.h +1 -0
index e8c8607..f9d05bb 100644
@@ -626,6 +626,7 @@ struct iwl_hw_params {
 	u8  bcast_sta_id;
 	u8 fat_channel;
 	u8 sw_crypto;
+	u8  max_beacon_itrvl;	/* in 1024 ms */
 	u32 max_inst_size;
 	u32 max_data_size;
 	u32 max_bsm_size;
drivers/net/wireless/iwlwifi/iwl3945-base.c +2 -72

92 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#3 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 4 lines · Ike Panhc

This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal beacon interval. This is reflected in hw_paras.max_beacon_itrvl

Quoted 8 lines
(cherry picked from commit 2c2f3b33888419fb9e7d015b9dc67b9db4437efa)

Conflicts:

drivers/net/wireless/iwlwifi/iwl-dev.h

What does this mean?

Quoted 4 lines

What are you expecting this patch to be applied to?

confused,

greg k-h

author
#4 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 10 lines · Greg KH
Quoted 9 lines · Ike Panhc

This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal beacon interval. This is reflected in hw_paras.max_beacon_itrvl

(cherry picked from commit 2c2f3b33888419fb9e7d015b9dc67b9db4437efa)
Quoted 6 lines
Quoted 3 lines

Conflicts:

drivers/net/wireless/iwlwifi/iwl-dev.h

What does this mean?

After cherry-pick:

--- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h @@@ -625,7 -608,7 +625,11 @@@ struct iwl_hw_params

	u8  max_stations;
	u8  bcast_sta_id;
	u8 fat_channel;

++<<<<<<< HEAD:drivers/net/wireless/iwlwifi/iwl-dev.h
+ u8 sw_crypto;
++=======
+ u8 max_beacon_itrvl; /* in 1024 ms */
++>>>>>>> 2c2f3b3... iwlwifi: unify iwl_setup_rxon_timing:drivers/net/wireless/iwlwifi/iwl-dev.h

	u32 max_inst_size;
	u32 max_data_size;
	u32 max_bsm_size;

The sw_crypto is removed in the prior commit (90e8e4), and the commit is not in the stable tree. We still need sw_crypto.

So, the patch is modified to keep sw_crypto.

drivers/net/wireless/iwlwifi/iwl-dev.h +0 -0
@@ -626,6 +626,7 @@ struct iwl_hw_params {
	u8  bcast_sta_id;
	u8 fat_channel;
	u8 sw_crypto;
+	u8  max_beacon_itrvl;   /* in 1024 ms */
	u32 max_inst_size;
	u32 max_data_size;
	u32 max_bsm_size;
Quoted 8 lines
Quoted 4 lines

What are you expecting this patch to be applied to?

confused,

Please consider applying to linux-2.6.31.y

Quoted 2 lines

greg k-h

#5 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 34 lines · Ike Panhc
Quoted 10 lines · Greg KH
Quoted 9 lines · Ike Panhc

This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal beacon interval. This is reflected in hw_paras.max_beacon_itrvl

(cherry picked from commit 2c2f3b33888419fb9e7d015b9dc67b9db4437efa)
Quoted 6 lines
Quoted 3 lines

Conflicts:

drivers/net/wireless/iwlwifi/iwl-dev.h

What does this mean?

After cherry-pick:

drivers/net/wireless/iwlwifi/iwl-dev.h +0 -0
@@@ -625,7 -608,7 +625,11 @@@ struct iwl_hw_params 
	u8  max_stations;
	u8  bcast_sta_id;
	u8 fat_channel;

++<<<<<<< HEAD:drivers/net/wireless/iwlwifi/iwl-dev.h
+ u8 sw_crypto;
++=======

drivers/net/wireless/iwlwifi/iwl-dev.h +2 -0
+	u8  max_beacon_itrvl;   /* in 1024 ms */
++>>>>>>> 2c2f3b3... iwlwifi: unify iwl_setup_rxon_timing:drivers/net/wireless/iwlwifi/iwl-dev.h
	u32 max_inst_size;
	u32 max_data_size;
	u32 max_bsm_size;
Quoted 4 lines

The sw_crypto is removed in the prior commit (90e8e4), and the commit is not in the stable tree. We still need sw_crypto.

So, the patch is modified to keep sw_crypto.

And why would we care? We've never used this kind of marking before in the kernel changelogs that I know of.

Quoted 9 lines
Quoted 8 lines
Quoted 4 lines

What are you expecting this patch to be applied to?

confused,

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

thanks,

greg k-h

#6 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Hi Greg,

Quoted 43 lines
Quoted 32 lines
Quoted 9 lines
Quoted 9 lines

This patch unifies setup_rxon_timing funcions
of AGN and 3945. HWs differ only in supported maximal beacon interval. This is reflected in hw_paras.max_beacon_itrvl

(cherry picked from commit 2c2f3b33888419fb9e7d015b9dc67b9db4437efa)
Quoted 6 lines
Quoted 3 lines

Conflicts:

drivers/net/wireless/iwlwifi/iwl-dev.h

What does this mean?

After cherry-pick:

drivers/net/wireless/iwlwifi/iwl-dev.h +0 -0
@@@ -625,7 -608,7 +625,11 @@@ struct iwl_hw_params 
	u8  max_stations;
	u8  bcast_sta_id;
	u8 fat_channel;

++<<<<<<< HEAD:drivers/net/wireless/iwlwifi/iwl-dev.h
+ u8 sw_crypto;
++=======

drivers/net/wireless/iwlwifi/iwl-dev.h +2 -0
+	u8  max_beacon_itrvl;   /* in 1024 ms */
++>>>>>>> 2c2f3b3... iwlwifi: unify iwl_setup_rxon_timing:drivers/net/wireless/iwlwifi/iwl-dev.h
	u32 max_inst_size;
	u32 max_data_size;
	u32 max_bsm_size;
Quoted 4 lines

The sw_crypto is removed in the prior commit (90e8e4), and the commit is not in the stable tree. We still need sw_crypto.

So, the patch is modified to keep sw_crypto.

And why would we care? We've never used this kind of marking before in the kernel changelogs that I know of.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line

What are you expecting this patch to be applied to?

confused,

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

I agree here. Not copying Reinette on this is just wrong. And blindly picking some patches and sending them for -stable even more.

Regards

Marcel

#7 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 2 lines · Marcel Holtmann

I agree here. Not copying Reinette on this is just wrong. And blindly picking some patches and sending them for -stable even more.

I agree that Reinette should have been copied. I'm not sure I agree that sending the patches was wrong by itself.

Canonical gets kicked in the teeth for lack of upstream participation all the time. I even have some of their enamel on my shoes... But let's not be too hard on them for making a mistake while trying to do something that is overall helpful to the community at large.

Just my $0.02...

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#8 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 7 lines · John W. Linville
Quoted 2 lines · Marcel Holtmann

I agree here. Not copying Reinette on this is just wrong. And blindly picking some patches and sending them for -stable even more.

I agree that Reinette should have been copied. I'm not sure I agree that sending the patches was wrong by itself.

I'm not saying it is wrong, but I agree, you need to copy the maintainer, as we would need their ack before being able to accept any type of backport.

Ike, the script, scripts/get_maintainer.pl is your friend here.

thanks,

greg k-h

#9 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 5 lines · Greg KH
Quoted 4 lines · John W. Linville
Quoted 2 lines · Marcel Holtmann

I agree here. Not copying Reinette on this is just wrong. And blindly picking some patches and sending them for -stable even more.

Quoted 8 lines
Quoted 2 lines

I agree that Reinette should have been copied. I'm not sure I agree that sending the patches was wrong by itself.

I'm not saying it is wrong, but I agree, you need to copy the maintainer, as we would need their ack before being able to accept any type of backport.

Ike, the script, scripts/get_maintainer.pl is your friend here.

I should take some of the bashing here for not having been too specific when pushing people to "send it to stable". As John said, we are learning here.

I see that this gets improved.

Thanks,
Stefan

Quoted 8 lines

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#10 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

In reply to Greg KH
Quoted 5 lines · Greg KH
Quoted 1 line · Ike Panhc

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

It seems fine to me. You may want to let Intel comment too.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#11 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 9 lines · John W. Linville
Quoted 5 lines · Greg KH
Quoted 1 line · Ike Panhc

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

It seems fine to me. You may want to let Intel comment too.

No objection here. Even so, I find it strange that this patch fixes a problem since it really should not have any functional changes.

I see this patch is 2/2 of a series ... was 1/2 an iwlwifi patch also?

Reinette

#12 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 6 lines · reinette chatre
Quoted 5 lines · John W. Linville
Quoted 4 lines · Greg KH
Quoted 1 line · Ike Panhc

Please consider applying to linux-2.6.31.y

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I need the subsystem maintainer to agree with this, have they?

It seems fine to me. You may want to let Intel comment too.

No objection here. Even so, I find it strange that this patch fixes a problem since it really should not have any functional changes.

Ok, if there is no functional change, why is this needed?

Ike?

thanks,

greg k-h

author
#13 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 11 lines · Greg KH
Quoted 9 lines · reinette chatre
Quoted 6 lines · John W. Linville
Quoted 3 lines · Greg KH
Quoted 1 line · Ike Panhc

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

It seems fine to me. You may want to let Intel comment too.

No objection here. Even so, I find it strange that this patch fixes a problem since it really should not have any functional changes.

Quoted 7 lines

Ok, if there is no functional change, why is this needed?

Ike?

thanks,

greg k-h

I review the patch again. Yes, it is no functional change. Sorry I have misunderstanding about the patch. Please do not put the second patch into stable.

But Please consider applying the first patch (change IWL6000_UCODE_API_MAX to v4) to 2.6.31-stable tree. It will be good to use v4 firmware on iwl6000.

#14 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 14 lines · Ike Panhc
Quoted 13 lines · Greg KH
Quoted 9 lines · reinette chatre
Quoted 6 lines · John W. Linville
Quoted 3 lines · Greg KH
Quoted 1 line · Ike Panhc

Please consider applying to linux-2.6.31.y

I need the subsystem maintainer to agree with this, have they?

It seems fine to me. You may want to let Intel comment too.

No objection here. Even so, I find it strange that this patch fixes a problem since it really should not have any functional changes.

Ok, if there is no functional change, why is this needed?

Quoted 8 lines
Quoted 5 lines

Ike?

thanks,

greg k-h

I review the patch again. Yes, it is no functional change. Sorry I have misunderstanding about the patch. Please do not put the second patch into stable.

Ok, will do.

Quoted 2 lines

But Please consider applying the first patch (change IWL6000_UCODE_API_MAX to v4) to 2.6.31-stable tree. It will be good to use v4 firmware on iwl6000.

Why, what bug does it fix? Will it require users to update their firmware versions on their system as well?

thanks,

greg k-h

#15 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

In reply to Ike Panhc
Quoted 2 lines · Ike Panhc

But Please consider applying the first patch (change IWL6000_UCODE_API_MAX to v4) to 2.6.31-stable tree. It will be good to use v4 firmware on iwl6000.

Please no. This will effectively enable 6000 series in 2.6.31. We did not target 2.6.31 for 6000 series enabling and more patches, which are in 2.6.32, are required for 6000 series to work well.

Reinette

author
#16 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 11 lines · reinette chatre
Quoted 2 lines · Ike Panhc

But Please consider applying the first patch (change IWL6000_UCODE_API_MAX to v4) to 2.6.31-stable tree. It will be good to use v4 firmware on iwl6000.

Please no. This will effectively enable 6000 series in 2.6.31. We did not target 2.6.31 for 6000 series enabling and more patches, which are in 2.6.32, are required for 6000 series to work well.

Reinette

Got it, so backport any patch for iwl6000 to 2.6.31-stable is not reasonable.

#17 lore raw

Re: [stable] [PATCH 2/2] iwlwifi: unify iwl_setup_rxon_timing

Quoted 6 lines · Ike Panhc
Quoted 5 lines · reinette chatre
Quoted 2 lines · Ike Panhc

But Please consider applying the first patch (change IWL6000_UCODE_API_MAX to v4) to 2.6.31-stable tree. It will be good to use v4 firmware on iwl6000.

Quoted 7 lines
Quoted 6 lines

Please no. This will effectively enable 6000 series in 2.6.31. We did not target 2.6.31 for 6000 series enabling and more patches, which are in 2.6.32, are required for 6000 series to work well.

Reinette

Got it, so backport any patch for iwl6000 to 2.6.31-stable is not reasonable.

Bugfixes are fine, but that is not what this is.

Please go read the file, Documentation/stable_kernel_rules.txt to give you an idea of what we are expecting here.

thanks,

greg k-h