Skip to contentSkip to conversation

iwlwifi: fix aggregation limit

PATCH In review Johannes Berg 3 participants 5 messages Jul 1, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 iwlwifi: fix aggregation limit

According to the documentation, the limit is 0x3f == 63, not 64.

---
It seems bug 2018 is related to the link quality command, because it seems I can trivially trigger it or similar bugs that way, but this doesn't fix it.

drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
@@ -1922,7 +1922,7 @@ struct iwl_link_qual_general_params {
 #define LINK_QUAL_AGG_DISABLE_START_MIN	(0)
 
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF	(31)
-#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	(64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	0x3f
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN	(0)
 
 /**
#1 lore raw

Hi Johannes,

Quoted 11 lines

According to the documentation, the limit is 0x3f == 63, not 64.

---
It seems bug 2018 is related to the link quality command, because it seems I can trivially trigger it or similar bugs that way, but this doesn't fix it.

drivers/net/wireless/iwlwifi/iwl-commands.h struct iwl_link_qual_general_params { · line 1926

Quoted 6 lines
drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
@@ -1922,7 +1922,7 @@ struct iwl_link_qual_general_params {
 #define LINK_QUAL_AGG_DISABLE_START_MIN	(0)
 
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF	(31)
-#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	(64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	0x3f
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN	(0)

why are you switching of hex now? Just putting (63) in there is not enough?

Regards

Marcel

author maintainer
#2 lore raw
Quoted 15 lines · Marcel Holtmann

Hi Johannes,

Quoted 13 lines

According to the documentation, the limit is 0x3f == 63, not 64.

---
It seems bug 2018 is related to the link quality command, because it seems I can trivially trigger it or similar bugs that way, but this doesn't fix it.

drivers/net/wireless/iwlwifi/iwl-commands.h +0 -0
@@ -1922,7 +1922,7 @@ struct iwl_link_qual_general_params {
 #define LINK_QUAL_AGG_DISABLE_START_MIN	(0)
 
Quoted 7 lines

drivers/net/wireless/iwlwifi/iwl-commands.h struct iwl_link_qual_general_params { · line 1926

Quoted 4 lines
drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF	(31)
-#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	(64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	0x3f
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN	(0)

why are you switching of hex now? Just putting (63) in there is not enough?

It would be, obviously, but the doc says 0x3f.

johannes

#3 lore raw
Quoted 27 lines · ext Johannes Berg
Quoted 16 lines · Marcel Holtmann

Hi Johannes,

Quoted 13 lines

According to the documentation, the limit is 0x3f == 63, not 64.

---
It seems bug 2018 is related to the link quality command, because it seems I can trivially trigger it or similar bugs that way, but this doesn't fix it.

drivers/net/wireless/iwlwifi/iwl-commands.h +0 -0
@@ -1922,7 +1922,7 @@ struct iwl_link_qual_general_params {
 #define LINK_QUAL_AGG_DISABLE_START_MIN	(0)
 
Quoted 8 lines

drivers/net/wireless/iwlwifi/iwl-commands.h struct iwl_link_qual_general_params { · line 1927

Quoted 5 lines
drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF	(31)
-#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	(64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	0x3f
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN	(0)
 

why are you switching of hex now? Just putting (63) in there is not enough?

Quoted 2 lines

It would be, obviously, but the doc says 0x3f.

I think it would be nicer to have (63) or otherwise convert all the macros to use the 0x format. Does the spec use 0x1f for the default value, for instance, instead of (31)?

Signature · 2 lines
Cheers,
Luca.
#4 lore raw

Hi Johannes,

Quoted 22 lines
Quoted 22 lines
Quoted 21 lines
Quoted 11 lines

According to the documentation, the limit is 0x3f == 63, not 64.

---
It seems bug 2018 is related to the link quality command, because it seems I can trivially trigger it or similar bugs that way, but this doesn't fix it.

drivers/net/wireless/iwlwifi/iwl-commands.h struct iwl_link_qual_general_params { · line 1927

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-commands.h +1 -1
@@ -1922,7 +1922,7 @@ struct iwl_link_qual_general_params {
 #define LINK_QUAL_AGG_DISABLE_START_MIN	(0)
 
 #define LINK_QUAL_AGG_FRAME_LIMIT_DEF	(31)
-#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	(64)
+#define LINK_QUAL_AGG_FRAME_LIMIT_MAX	0x3f
 #define LINK_QUAL_AGG_FRAME_LIMIT_MIN	(0)
 

why are you switching of hex now? Just putting (63) in there is not enough?

Quoted 6 lines
Quoted 2 lines

It would be, obviously, but the doc says 0x3f.

I think it would be nicer to have (63) or otherwise convert all the macros to use the 0x format. Does the spec use 0x1f for the default value, for instance, instead of (31)?

I would agree. Use (31) and let the commit message explain it. Not that it is really that important.

Regards

Marcel