bcmdhd: add UPDATE_CHANNEL_LIST driver command
Om Prakash Singh [Mon, 28 Mar 2016 11:31:52 +0000 (16:31 +0530)]
add UPDATE_CHANNEL_LIST driver command to force update channel
list to cfg80211 layer.

Bug 200179093
Bug 200127847

Change-Id: Ib53d61dad84605a83628279a3d6981df582a609c
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1111539
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/net/wireless/bcmdhd/wl_android.c

index f400fdb..b71328b 100644 (file)
@@ -89,6 +89,7 @@
 #define CMD_P2P_DEV_ADDR       "P2P_DEV_ADDR"
 #define CMD_SETFWPATH          "SETFWPATH"
 #define CMD_SETBAND            "SETBAND"
+#define CMD_UPDATE_CHANNEL_LIST "UPDATE_CHANNEL_LIST"
 #define CMD_GETBAND            "GETBAND"
 #define CMD_COUNTRY            "COUNTRY"
 #define CMD_NV_COUNTRY         "NV_COUNTRY"
@@ -2531,6 +2532,12 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
        else if (strnicmp(command, CMD_SETBAND, strlen(CMD_SETBAND)) == 0) {
                uint band = *(command + strlen(CMD_SETBAND) + 1) - '0';
                bytes_written = wldev_set_band(net, band);
+       } else if (strnicmp(command, CMD_UPDATE_CHANNEL_LIST,
+                       strlen(CMD_UPDATE_CHANNEL_LIST)) == 0) {
+#ifdef WL_CFG80211
+               wl_update_wiphybands(NULL, true);
+#endif
+               bytes_written = 0;
        }
        else if (strnicmp(command, CMD_GETBAND, strlen(CMD_GETBAND)) == 0) {
                bytes_written = wl_android_get_band(net, command, priv_cmd.total_len);