Skip to contentSkip to conversation

drivers/net/wireless/iwlwifi/iwl-debugfs.c

built bug Ingo Molnar 3 participants 6 messages Apr 19, 2008 – Apr 21, 2008

Subsystems (4)
lore
Share & tools
lore
maintainer
#1 lore raw

From: Ingo Molnar <[email protected]>
Date: Sat, 19 Apr 2008 15:56:02 +0200

Quoted 2 lines

drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function 'iwl_dbgfs_stations_read':
drivers/net/wireless/iwlwifi/iwl-debugfs.c:256: error: 'struct iwl4965_tid_data' has no member named 'agg'

This should fix it, thanks for the report.

Longer term, I seriously question the sanity of including iwl4964 specific dumping into a debug module that is linked into both iwlwifi drivers :-/

iwlwifi: Fix unconditional access to station->tidp[].agg.

Reportred by Ingo Molnar:

drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function 'iwl_dbgfs_stations_read':
drivers/net/wireless/iwlwifi/iwl-debugfs.c:256: error: 'struct iwl4965_tid_data' has no member named 'agg'

Needs CONFIG_IWL4965_HT protection.

drivers/net/wireless/iwlwifi/iwl-debugfs.c +12 -6
index 0f16f26..9a30e1d 100644
@@ -239,28 +239,34 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
 					"ps_status: %u\n", station->ps_status);
 			pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n");
 			pos += scnprintf(buf + pos, bufsz - pos,
-					"seq_num\t\ttxq_id\t");
+					"seq_num\t\ttxq_id");
+#ifdef CONFIG_IWL4965_HT
 			pos += scnprintf(buf + pos, bufsz - pos,
-					"frame_count\twait_for_ba\t");
+					"\tframe_count\twait_for_ba\t");
 			pos += scnprintf(buf + pos, bufsz - pos,
 					"start_idx\tbitmap0\t");
 			pos += scnprintf(buf + pos, bufsz - pos,
-					"bitmap1\trate_n_flags\n");
+					"bitmap1\trate_n_flags");
+#endif
+			pos += scnprintf(buf + pos, bufsz - pos, "\n");
 
 			for (j = 0; j < MAX_TID_COUNT; j++) {
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"[%d]:\t\t%u\t", j,
+						"[%d]:\t\t%u", j,
 						station->tid[j].seq_number);
+#ifdef CONFIG_IWL4965_HT
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"%u\t\t%u\t\t%u\t\t",
+						"\t%u\t\t%u\t\t%u\t\t",
 						station->tid[j].agg.txq_id,
 						station->tid[j].agg.frame_count,
 						station->tid[j].agg.wait_for_ba);
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"%u\t%llu\t%u\n",
+						"%u\t%llu\t%u",
 						station->tid[j].agg.start_idx,
 						(unsigned long long)station->tid[j].agg.bitmap,
 						station->tid[j].agg.rate_n_flags);
+#endif
+				pos += scnprintf(buf + pos, bufsz - pos, "\n");
 			}
 			pos += scnprintf(buf + pos, bufsz - pos, "\n");
 		}
#3 lore raw

[build bug] iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'

In reply to Ingo Molnar
Quoted 3 lines

here's another networking (iwlwifi) related build failure with latest -git:

a third -git build failure triggered in last night's x86.git build/boot testing:

drivers/built-in.o: In function `iwl3945_led_unregister_led':
iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'
drivers/built-in.o: In function `iwl3945_led_register_led':
iwl-3945-led.c:(.text+0x119ecd): undefined reference to `led_classdev_register'

config:

http://redhat.com/~mingo/misc/config-Sat_Apr_19_22_08_04_CEST_2008.bad

probably due to commit ab53d8af6 "iwlwifi: Add led support".

Ingo

maintainer
#4 lore raw

Re: [build bug] iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'

From: Ingo Molnar <[email protected]>
Date: Sun, 20 Apr 2008 09:34:41 +0200

Quoted 4 lines

drivers/built-in.o: In function `iwl3945_led_unregister_led':
iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'
drivers/built-in.o: In function `iwl3945_led_register_led':
iwl-3945-led.c:(.text+0x119ecd): undefined reference to `led_classdev_register'

Thanks for the report.

This is the classic "API_OPTION=m && API_USER=y" problem.

In this case the best fix is probably to use select in the iwlwifi Kconfig files. The following patch should cure it.

iwlwifi: Use 'select' for MAC80211_LEDS and LEDS_CLASS instead of 'depends'

drivers/net/wireless/iwlwifi/Kconfig +6 -2
index f844b73..c4e631d 100644
@@ -49,7 +49,9 @@ config IWL4965_HT
 
 config IWL4965_LEDS
 	bool "Enable LEDS features in iwl4965 driver"
-	depends on IWL4965 && MAC80211_LEDS && LEDS_CLASS
+	depends on IWL4965
+	select MAC80211_LEDS
+	select LEDS_CLASS
 	select IWLWIFI_LEDS
 	---help---
 	  This option enables LEDS for the iwlwifi drivers
@@ -134,7 +136,9 @@ config IWL3945_SPECTRUM_MEASUREMENT
 
 config IWL3945_LEDS
 	bool "Enable LEDS features in iwl3945 driver"
-	depends on IWL3945 && MAC80211_LEDS && LEDS_CLASS
+	depends on IWL3945
+	select MAC80211_LEDS
+	select LEDS_CLASS
 	---help---
 	  This option enables LEDS for the iwl3945 driver.
 
#2 lore raw
In reply to David Miller
Quoted 7 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Sunday, April 20, 2008 4:09 AM
To: [email protected]
Cc: [email protected]; Winkler, Tomas;

[email protected];

Quoted 1 line

[email protected]; [email protected];

[email protected];

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct

Quoted 36 lines

[email protected]; [email protected]
Subject: Re: [built bug] drivers/net/wireless/iwlwifi/iwl-debugfs.c

From: Ingo Molnar <[email protected]>
Date: Sat, 19 Apr 2008 15:56:02 +0200

Quoted 1 line

drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function

'iwl_dbgfs_stations_read':

Quoted 1 line

drivers/net/wireless/iwlwifi/iwl-debugfs.c:256: error: 'struct

iwl4965_tid_data' has no member named 'agg'

This should fix it, thanks for the report.

Longer term, I seriously question the sanity of including iwl4964 specific dumping into a debug module that is linked into both iwlwifi drivers :-/

iwlwifi: Fix unconditional access to station->tidp[].agg.

Reportred by Ingo Molnar:

drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function 'iwl_dbgfs_stations_read':
drivers/net/wireless/iwlwifi/iwl-debugfs.c:256: error: 'struct iwl4965_tid_data' has no member named 'agg'

Needs CONFIG_IWL4965_HT protection.

drivers/net/wireless/iwlwifi/iwl-debugfs.c +0 -0
index 0f16f26..9a30e1d 100644
@@ -239,28 +239,34 @@ static ssize_t iwl_dbgfs_stations_read(struct

file

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct · line 240

Quoted 2 lines
drivers/net/wireless/iwlwifi/iwl-debugfs.c +0 -0
 *file, char __user *user_buf,
 					"ps_status: %u\n",

station->ps_status);

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct · line 241

Quoted 1 line
drivers/net/wireless/iwlwifi/iwl-debugfs.c +0 -0
 			pos += scnprintf(buf + pos, bufsz - pos, "tid

data:\n");

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-debugfs.c +3 -2
 			pos += scnprintf(buf + pos, bufsz - pos,
-					"seq_num\t\ttxq_id\t");
+					"seq_num\t\ttxq_id");
+#ifdef CONFIG_IWL4965_HT
 			pos += scnprintf(buf + pos, bufsz - pos,
-					"frame_count\twait_for_ba\t");
+					"\tframe_count\twait_for_ba\t");
 			pos += scnprintf(buf + pos, bufsz - pos,
 					"start_idx\tbitmap0\t");
 			pos += scnprintf(buf + pos, bufsz - pos,

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-debugfs.c +4 -2
-					"bitmap1\trate_n_flags\n");
+					"bitmap1\trate_n_flags");
+#endif
+			pos += scnprintf(buf + pos, bufsz - pos, "\n");
 
 			for (j = 0; j < MAX_TID_COUNT; j++) {
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"[%d]:\t\t%u\t", j,
+						"[%d]:\t\t%u", j,
 

station->tid[j].seq_number);

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,

Quoted 5 lines
drivers/net/wireless/iwlwifi/iwl-debugfs.c +2 -1
+#ifdef CONFIG_IWL4965_HT
 				pos += scnprintf(buf + pos, bufsz - pos,
-						"%u\t\t%u\t\t%u\t\t",
+						"\t%u\t\t%u\t\t%u\t\t",
 

station->tid[j].agg.txq_id,

Quoted 1 line

station->tid[j].agg.frame_count,

Quoted 1 line

station->tid[j].agg.wait_for_ba);

drivers/net/wireless/iwlwifi/iwl-debugfs.c static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, · line 264

Quoted 4 lines
				pos += scnprintf(buf + pos, bufsz - pos,
drivers/net/wireless/iwlwifi/iwl-debugfs.c +1 -1
-						"%u\t%llu\t%u\n",
+						"%u\t%llu\t%u",

station->tid[j].agg.start_idx,

Quoted 1 line

(unsigned long

long)station-

Quoted 2 lines
Quoted 1 line

tid[j].agg.bitmap,

station->tid[j].agg.rate_n_flags);

drivers/net/wireless/iwlwifi/iwl-debugfs.c

Quoted 2 lines
drivers/net/wireless/iwlwifi/iwl-debugfs.c +2 -0
+#endif
+				pos += scnprintf(buf + pos, bufsz - pos,

"\n");

Quoted 3 lines
			}
			pos += scnprintf(buf + pos, bufsz - pos, "\n");

ACK
}
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#5 lore raw

RE: [build bug] iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'

In reply to David Miller
Quoted 7 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Sunday, April 20, 2008 10:52 AM
To: [email protected]
Cc: [email protected]; Winkler, Tomas;

[email protected];

Quoted 1 line

[email protected]; [email protected];

[email protected];

Quoted 15 lines

[email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [build bug] iwl-3945-led.c:(.text+0x119e36): undefined reference to `__led_classdev_unregister'

From: Ingo Molnar <[email protected]>
Date: Sun, 20 Apr 2008 09:34:41 +0200

Quoted 2 lines

drivers/built-in.o: In function `iwl3945_led_unregister_led':
iwl-3945-led.c:(.text+0x119e36): undefined reference to

`__led_classdev_unregister'

Quoted 2 lines

drivers/built-in.o: In function `iwl3945_led_register_led':
iwl-3945-led.c:(.text+0x119ecd): undefined reference to

`led_classdev_register'

Quoted 8 lines

Thanks for the report.

This is the classic "API_OPTION=m && API_USER=y" problem.

In this case the best fix is probably to use select in the iwlwifi Kconfig files. The following patch should cure it.

iwlwifi: Use 'select' for MAC80211_LEDS and LEDS_CLASS instead of

'depends'

Quoted 27 lines
drivers/net/wireless/iwlwifi/Kconfig +0 -0
index f844b73..c4e631d 100644
@@ -49,7 +49,9 @@ config IWL4965_HT
 

config IWL4965_LEDS
bool "Enable LEDS features in iwl4965 driver"

drivers/net/wireless/iwlwifi/Kconfig +3 -1
-	depends on IWL4965 && MAC80211_LEDS && LEDS_CLASS
+	depends on IWL4965
+	select MAC80211_LEDS
+	select LEDS_CLASS
	select IWLWIFI_LEDS
	---help---
	  This option enables LEDS for the iwlwifi drivers
drivers/net/wireless/iwlwifi/Kconfig +0 -0
@@ -134,7 +136,9 @@ config IWL3945_SPECTRUM_MEASUREMENT
 

config IWL3945_LEDS
bool "Enable LEDS features in iwl3945 driver"

drivers/net/wireless/iwlwifi/Kconfig +3 -1
-	depends on IWL3945 && MAC80211_LEDS && LEDS_CLASS
+	depends on IWL3945
+	select MAC80211_LEDS
+	select LEDS_CLASS
Quoted 3 lines
	---help---
	  This option enables LEDS for the iwl3945 driver.

ACK
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.