net: wireless: bcmdhd: Remove country update from wl_update_wiphybands
authorDmitry Shmidt <dimitrysh@google.com>
Wed, 11 Jul 2012 17:17:59 +0000 (10:17 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Thu, 12 Jul 2012 17:45:50 +0000 (10:45 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/wl_cfg80211.c
drivers/net/wireless/bcmdhd/wl_cfg80211.h

index 4d763c9e41f1090bce3bb590ebc0544b8a7460da..657a1bf6a83a29176b4354b65aafd47c5a4d5b93 100644 (file)
@@ -4536,7 +4536,7 @@ void dhd_bus_country_set(struct net_device *dev, wl_country_t *cspec)
        if (dhd && dhd->pub.up) {
                memcpy(&dhd->pub.dhd_cspec, cspec, sizeof(wl_country_t));
 #ifdef WL_CFG80211
-               wl_update_wiphybands(NULL, cspec->ccode);
+               wl_update_wiphybands(NULL);
 #endif
        }
 }
@@ -4547,7 +4547,7 @@ void dhd_bus_band_set(struct net_device *dev, uint band)
 
        if (dhd && dhd->pub.up) {
 #ifdef WL_CFG80211
-               wl_update_wiphybands(NULL, NULL);
+               wl_update_wiphybands(NULL);
 #endif
        }
 }
index 7049d77f24d3122c0f47e8f6cb2666d00e7a1e92..353713880bb3d5fbfc433a5b0c13068001540727 100644 (file)
@@ -7146,7 +7146,7 @@ static int wl_construct_reginfo(struct wl_priv *wl, s32 bw_cap)
        return err;
 }
 
-s32 wl_update_wiphybands(struct wl_priv *wl, char *country_code)
+s32 wl_update_wiphybands(struct wl_priv *wl)
 {
        struct wiphy *wiphy;
        struct net_device *dev;
@@ -7157,7 +7157,6 @@ s32 wl_update_wiphybands(struct wl_priv *wl, char *country_code)
        int nmode = 0;
        int bw_cap = 0;
        int index = 0;
-       struct regulatory_request *new_request;
        bool rollback_lock = false;
 
        WL_DBG(("Entry"));
@@ -7226,23 +7225,6 @@ s32 wl_update_wiphybands(struct wl_priv *wl, char *country_code)
 
        wiphy_apply_custom_regulatory(wiphy, &brcm_regdom);
 
-       if (country_code != NULL) {
-               WL_DBG(("country_code[0]=%c, country_code[1]=%c\n", country_code[0], country_code[1]));
-               /* Allocate a requlatory request to update cfg80211 for the supported channels */
-               new_request = kzalloc(sizeof(struct regulatory_request),
-                                       GFP_KERNEL);
-               if (!new_request) {
-                       WL_ERR(("error Memory alloc for requlatory request failed\n"));
-                       err = -ENOMEM;
-               } else {
-                       new_request->alpha2[0] = country_code[0];
-                       new_request->alpha2[1] = country_code[1];
-                       WL_DBG(("Send an event to cfg80211 to update supplicant to take the new channel list"));
-                       nl80211_send_reg_change_event(new_request);
-                       kfree(new_request);
-               }
-       }
-
 end_bands:
        if (rollback_lock)
                mutex_unlock(&wl->usr_sync);
@@ -7265,7 +7247,7 @@ static s32 __wl_cfg80211_up(struct wl_priv *wl)
        if (unlikely(err && err != -EINPROGRESS)) {
                WL_ERR(("wl_config_ifmode failed\n"));
        }
-       err = wl_update_wiphybands(wl, NULL);
+       err = wl_update_wiphybands(wl);
        if (unlikely(err)) {
                WL_ERR(("wl_update_wiphybands failed\n"));
        }
index c3281ec79dfb0d36eb6f4c7f1387b1a89e368711..49bed703062af5da9da3f7901de9d7db428cdef6 100644 (file)
@@ -669,7 +669,6 @@ extern int wl_cfg80211_hang(struct net_device *dev, u16 reason);
 extern s32 wl_mode_to_nl80211_iftype(s32 mode);
 int wl_cfg80211_do_driver_init(struct net_device *net);
 void wl_cfg80211_enable_trace(int level);
-extern s32 wl_update_wiphybands(struct wl_priv *wl, char *country_code);
+extern s32 wl_update_wiphybands(struct wl_priv *wl);
 extern s32 wl_cfg80211_if_is_group_owner(void);
-extern void nl80211_send_reg_change_event(struct regulatory_request *request);
 #endif                         /* _wl_cfg80211_h_ */