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

Bug 200179093
Bug 200127847

Change-Id: I1df43d56af9f5c2009cd981dd60f2e2166d42198
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1111538
(cherry picked from commit 07026105159443408332f12db251c568fe16dc55)
Reviewed-on: http://git-master/r/1118923
(cherry picked from commit 789fd908d69fde9a2d22887f1fd6608362591c38)
Reviewed-on: http://git-master/r/1119748
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

drivers/net/wireless/bcmdhd_88/wl_android.c

index 4dbec41..fa9fb31 100644 (file)
@@ -87,6 +87,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"
@@ -1458,6 +1459,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);