]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up wifi patch for older kernels
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Nov 2022 17:26:36 +0000 (18:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Nov 2022 17:26:36 +0000 (18:26 +0100)
queue-5.10/wifi-wilc1000-validate-number-of-channels.patch
queue-5.15/wifi-wilc1000-validate-number-of-channels.patch

index d0ab424b55b077cf327c5bd4a33d460a99a9ed81..70f34eca86b3d0e58c819a542cfa0f0169af8c1e 100644 (file)
@@ -19,18 +19,19 @@ Signed-off-by: Kalle Valo <kvalo@kernel.org>
 Link: https://lore.kernel.org/r/20221123153543.8568-5-philipturnbull@github.com
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- drivers/net/wireless/microchip/wilc1000/cfg80211.c |   22 +++++++++++++++------
- 1 file changed, 16 insertions(+), 6 deletions(-)
+ drivers/net/wireless/microchip/wilc1000/cfg80211.c |   23 +++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
 
 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
 +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
-@@ -961,19 +961,29 @@ static inline void wilc_wfi_cfg_parse_ch
+@@ -961,19 +961,30 @@ static inline void wilc_wfi_cfg_parse_ch
        }
  
        if (ch_list_idx) {
 -              u16 attr_size;
 -              struct wilc_ch_list_elem *e;
 -              int i;
++              unsigned int i;
 +              u16 elem_size;
  
                ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
@@ -39,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +              /* the number of bytes following the final 'elem' member */
 +              elem_size = le16_to_cpu(ch_list->attr_len) -
 +                      (sizeof(*ch_list) - sizeof(struct wilc_attr_entry));
-+              for (unsigned int i = 0; i < elem_size;) {
++              for (i = 0; i < elem_size;) {
 +                      struct wilc_ch_list_elem *e;
 +
                        e = (struct wilc_ch_list_elem *)(ch_list->elem + i);
index d0ab424b55b077cf327c5bd4a33d460a99a9ed81..70f34eca86b3d0e58c819a542cfa0f0169af8c1e 100644 (file)
@@ -19,18 +19,19 @@ Signed-off-by: Kalle Valo <kvalo@kernel.org>
 Link: https://lore.kernel.org/r/20221123153543.8568-5-philipturnbull@github.com
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- drivers/net/wireless/microchip/wilc1000/cfg80211.c |   22 +++++++++++++++------
- 1 file changed, 16 insertions(+), 6 deletions(-)
+ drivers/net/wireless/microchip/wilc1000/cfg80211.c |   23 +++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
 
 --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
 +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
-@@ -961,19 +961,29 @@ static inline void wilc_wfi_cfg_parse_ch
+@@ -961,19 +961,30 @@ static inline void wilc_wfi_cfg_parse_ch
        }
  
        if (ch_list_idx) {
 -              u16 attr_size;
 -              struct wilc_ch_list_elem *e;
 -              int i;
++              unsigned int i;
 +              u16 elem_size;
  
                ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
@@ -39,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +              /* the number of bytes following the final 'elem' member */
 +              elem_size = le16_to_cpu(ch_list->attr_len) -
 +                      (sizeof(*ch_list) - sizeof(struct wilc_attr_entry));
-+              for (unsigned int i = 0; i < elem_size;) {
++              for (i = 0; i < elem_size;) {
 +                      struct wilc_ch_list_elem *e;
 +
                        e = (struct wilc_ch_list_elem *)(ch_list->elem + i);