Search Linux Wireless

Re: [PATCH v2 06/35] brcmfmac: firmware: Support passing in multiple board_types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 4, 2022 at 9:28 AM Hector Martin <marcan@xxxxxxxxx> wrote:
>
> In order to make use of the multiple alt_path functionality, change
> board_type to an array. Bus drivers can pass in a NULL-terminated list
> of board type strings to try for the firmware fetch.

> +               /* strip extension at the end */
> +               strscpy(alt_path, path, BRCMF_FW_NAME_LEN);
> +               alt_path[suffix - path] = 0;
>
> -       alt_paths[0] = kstrdup(alt_path, GFP_KERNEL);
> +               strlcat(alt_path, ".", BRCMF_FW_NAME_LEN);
> +               strlcat(alt_path, board_types[i], BRCMF_FW_NAME_LEN);
> +               strlcat(alt_path, suffix, BRCMF_FW_NAME_LEN);
> +
> +               alt_paths[i] = kstrdup(alt_path, GFP_KERNEL);
> +               brcmf_dbg(TRACE, "FW alt path: %s\n", alt_paths[i]);

Consider replacing these string manipulations with kasprintf().

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux