bcmdhd_1_77_nn: fix wifi for missing SY country profile
authorDanny Wood <danwood76@gmail.com>
Tue, 28 Sep 2021 11:02:58 +0000 (12:02 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 28 Sep 2021 12:06:42 +0000 (13:06 +0100)
* a5xelte fimrware maps the SY region to XZ, so this emulates that behaviour

Change-Id: I606e893a0c08ddbe5fdb97bd363c02be515c314f

drivers/net/wireless/bcmdhd_1_77_nn/wldev_common.c

index 90f3c380769d5baecd7cb3ff27785e0560fa845e..759c00808aa63deae485e5535a270019b51506b2 100644 (file)
@@ -481,6 +481,12 @@ int wldev_set_country(
        if (!country_code)
                return error;
 
+       /* Force country code to XZ if country code is SY (matches a5xelte firmware) */
+       if((country_code[0] == 'S') && (country_code[1] == 'Y')) {
+               country_code[0] = 'X';
+               country_code[1] = 'Z';
+       }
+
        bzero(&scbval, sizeof(scb_val_t));
        error = wldev_iovar_getbuf(dev, "country", NULL, 0, &cur_cspec, sizeof(wl_country_t), NULL);
        if (error < 0) {