net: wireless: bcmdhd: Update to Version 5.90.125.94.1
authorDmitry Shmidt <dimitrysh@google.com>
Wed, 30 Nov 2011 20:49:02 +0000 (12:49 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Mon, 19 Dec 2011 21:22:43 +0000 (13:22 -0800)
- Return zeroed private command buffer
- Fix memory leak in wl_inform_single_bss()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/dhd_common.c
drivers/net/wireless/bcmdhd/dhd_linux_mon.c
drivers/net/wireless/bcmdhd/include/epivers.h
drivers/net/wireless/bcmdhd/wl_android.c
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index a29c2fab28cd67ba33e5062bef7875fee4c9fe42..c90bb1676a25558411e8df0be19b6fffb18f433c 100644 (file)
@@ -1902,6 +1902,7 @@ dhd_pno_set(dhd_pub_t *dhd, wlc_ssid_t* ssids_local, int nssid, ushort scan_fr,
        if ((!dhd) && (!ssids_local)) {
                DHD_ERROR(("%s error exit\n", __FUNCTION__));
                err = -1;
+               return err;
        }
 
        if (dhd_check_ap_wfd_mode_set(dhd) == TRUE)
@@ -2155,14 +2156,14 @@ wl_iw_parse_channel_list_tlv(char** list_str, uint16* channel_list,
 int
 wl_iw_parse_ssid_list_tlv(char** list_str, wlc_ssid_t* ssid, int max, int *bytes_left)
 {
-       char* str =  *list_str;
+       char* str;
        int idx = 0;
 
        if ((list_str == NULL) || (*list_str == NULL) || (*bytes_left < 0)) {
                DHD_ERROR(("%s error paramters\n", __FUNCTION__));
                return -1;
        }
-
+       str = *list_str;
        while (*bytes_left > 0) {
 
                if (str[0] != CSCAN_TLV_TYPE_SSID_IE) {
index dd9c71f75be66db381266da7c8f9708bd6d7e366..ce94ff9993db1096cec3807dae617faf8d3da9d2 100644 (file)
@@ -225,9 +225,10 @@ static void dhd_mon_if_set_multicast_list(struct net_device *ndev)
        mon_if = ndev_to_monif(ndev);
        if (mon_if == NULL || mon_if->real_ndev == NULL) {
                MON_PRINT(" cannot find matched net dev, skip the packet\n");
+       } else {
+               MON_PRINT("enter, if name: %s, matched if name %s\n",
+               ndev->name, mon_if->real_ndev->name);
        }
-
-       MON_PRINT("enter, if name: %s, matched if name %s\n", ndev->name, mon_if->real_ndev->name);
 }
 
 static int dhd_mon_if_change_mac(struct net_device *ndev, void *addr)
@@ -238,9 +239,10 @@ static int dhd_mon_if_change_mac(struct net_device *ndev, void *addr)
        mon_if = ndev_to_monif(ndev);
        if (mon_if == NULL || mon_if->real_ndev == NULL) {
                MON_PRINT(" cannot find matched net dev, skip the packet\n");
+       } else {
+               MON_PRINT("enter, if name: %s, matched if name %s\n",
+               ndev->name, mon_if->real_ndev->name);
        }
-
-       MON_PRINT("enter, if name: %s, matched if name %s\n", ndev->name, mon_if->real_ndev->name);
        return ret;
 }
 
index ae1f975bdb64e9345f88e8624b67042318ba489b..fe71e166a7d933ccdd12c45292e089cbd35f30ea 100644 (file)
@@ -44,6 +44,6 @@
 #define EPI_VERSION_DEV                5.90.125
 
 
-#define        EPI_VERSION_STR         "5.90.125.94"
+#define        EPI_VERSION_STR         "5.90.125.94.1"
 
 #endif 
index 67f7d9fca53ad23f55217ea7195172e937520124..b6804817240ad11121602d9c6123cb66702a55bf 100644 (file)
@@ -559,8 +559,10 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
                bytes_written = strlen("OK");
        }
 
-       if (bytes_written > 0) {
-               if (bytes_written > priv_cmd.total_len) {
+       if (bytes_written >= 0) {
+               if ((bytes_written == 0) && (priv_cmd.total_len > 0))
+                       command[0] = '\0';
+               if (bytes_written >= priv_cmd.total_len) {
                        DHD_ERROR(("%s: bytes_written = %d\n", __FUNCTION__, bytes_written));
                        bytes_written = priv_cmd.total_len;
                } else {
@@ -571,7 +573,8 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
                        DHD_ERROR(("%s: failed to copy data to user buffer\n", __FUNCTION__));
                        ret = -EFAULT;
                }
-       } else {
+       }
+       else {
                ret = bytes_written;
        }
 
index daa7d2605aafccbd048dafd7b75ff06cd9fab8f7..9c2533028df52541401529bf609da8f96cd83064 100644 (file)
@@ -4155,6 +4155,7 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
        struct wl_cfg80211_bss_info *notif_bss_info;
        struct wl_scan_req *sr = wl_to_sr(wl);
        struct beacon_proberesp *beacon_proberesp;
+       struct cfg80211_bss *cbss = NULL;
        s32 mgmt_type;
        s32 signal;
        u32 freq;
@@ -4213,13 +4214,15 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
 
        signal = notif_bss_info->rssi * 100;
 
-       if (unlikely(!cfg80211_inform_bss_frame(wiphy, channel, mgmt,
-               le16_to_cpu(notif_bss_info->frame_len),
-               signal, GFP_KERNEL))) {
+       cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+               le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+       if (unlikely(!cbss)) {
                WL_ERR(("cfg80211_inform_bss_frame error\n"));
                kfree(notif_bss_info);
                return -EINVAL;
        }
+
+       cfg80211_put_bss(cbss);
        kfree(notif_bss_info);
 
        return err;