iwlwifi: fix aggregation limit
Johannes Berg
maintainerPATCH 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)/**
Hi Johannes,
Quoted 11 lines
According to the documentation, the limit is
0x3f== 63, not 64.Signed-off-by Johannes Berg <[email protected]>---
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
Johannes Berg
maintainerQuoted 15 lines · Marcel Holtmann
Hi Johannes,
Quoted 13 lines
According to the documentation, the limit is
0x3f== 63, not 64.Signed-off-by Johannes Berg <[email protected]>---
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
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.Signed-off-by Johannes Berg <[email protected]>---
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.
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.Signed-off-by Johannes Berg <[email protected]>---
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
0x1ffor 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