2013-11-11 21:58:19 +00:00
|
|
|
--- a/driver/wl_iw.c
|
|
|
|
+++ b/driver/wl_iw.c
|
2014-07-07 17:38:54 +00:00
|
|
|
@@ -314,7 +314,7 @@ wl_iw_get_name(
|
2013-11-11 21:58:19 +00:00
|
|
|
)
|
|
|
|
{
|
|
|
|
int phytype, err;
|
|
|
|
- uint band[3];
|
|
|
|
+ uint i, band[3], bands;
|
|
|
|
char cap[5];
|
|
|
|
|
|
|
|
WL_TRACE(("%s: SIOCGIWNAME\n", dev->name));
|
2014-07-07 17:38:54 +00:00
|
|
|
@@ -335,16 +335,20 @@ wl_iw_get_name(
|
2013-11-11 21:58:19 +00:00
|
|
|
break;
|
|
|
|
case WLC_PHY_TYPE_LP:
|
|
|
|
case WLC_PHY_TYPE_G:
|
|
|
|
- if (band[0] >= 2)
|
|
|
|
- strcpy(cap, "abg");
|
|
|
|
- else
|
|
|
|
- strcpy(cap, "bg");
|
|
|
|
- break;
|
|
|
|
case WLC_PHY_TYPE_N:
|
|
|
|
- if (band[0] >= 2)
|
|
|
|
- strcpy(cap, "abgn");
|
|
|
|
- else
|
|
|
|
- strcpy(cap, "bgn");
|
|
|
|
+ bands = 0;
|
|
|
|
+ for (i = 1; i <= band[0]; i++) {
|
|
|
|
+ bands |= dtoh32(band[i]);
|
|
|
|
+ }
|
|
|
|
+ strcpy(cap, "");
|
|
|
|
+ if (bands & WLC_BAND_5G)
|
|
|
|
+ strcat(cap, "a");
|
|
|
|
+ if (bands & WLC_BAND_2G)
|
|
|
|
+ strcat(cap, "bg");
|
|
|
|
+ if (phytype == WLC_PHY_TYPE_N)
|
|
|
|
+ strcat(cap, "n");
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
done:
|