mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
staging: rtl8192e: Remove check if channel_array[channel_plan].len != 0
channel_plan is constant COUNTRY_CODE_WORLD_WIDE_13. Remove equation to check length of array as it is always not 0. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/0cfcc32a06033908c469ef0273de2485dbfd6b82.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
89d132c7b0
commit
7e655d4a80
@@ -55,13 +55,11 @@ void dot11d_channel_map(u8 channel_plan, struct rtllib_device *ieee)
|
||||
|
||||
ieee->global_domain = false;
|
||||
|
||||
if (channel_array[channel_plan].len != 0) {
|
||||
memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
|
||||
sizeof(GET_DOT11D_INFO(ieee)->channel_map));
|
||||
for (i = 0; i < channel_array[channel_plan].len; i++) {
|
||||
GET_DOT11D_INFO(ieee)->channel_map[channel_array
|
||||
[channel_plan].channel[i]] = 1;
|
||||
}
|
||||
memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
|
||||
sizeof(GET_DOT11D_INFO(ieee)->channel_map));
|
||||
for (i = 0; i < channel_array[channel_plan].len; i++) {
|
||||
GET_DOT11D_INFO(ieee)->channel_map[channel_array
|
||||
[channel_plan].channel[i]] = 1;
|
||||
}
|
||||
|
||||
switch (channel_plan) {
|
||||
|
||||
Reference in New Issue
Block a user