net: wireless: bcmdhd: Update to version 1.28.9-5
Dmitry Shmidt [Tue, 28 Aug 2012 01:32:09 +0000 (18:32 -0700)]
- Add cfg80211 del_station functionality
- Propagate disconnect error code for cfg80211

Change-Id: I0cf772f70323e9604da06d83340ff6cead07b84b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Reviewed-on: http://git-master/r/130076
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/include/epivers.h
drivers/net/wireless/bcmdhd/wl_android.c
drivers/net/wireless/bcmdhd/wl_cfg80211.c
drivers/net/wireless/bcmdhd/wl_cfg80211.h

index 43a613d..bc0b374 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: bcmsdh_sdmmc_linux.c 342895 2012-07-04 11:36:15Z $
+ * $Id: bcmsdh_sdmmc_linux.c 352934 2012-08-24 07:58:45Z $
  */
 
 #include <typedefs.h>
@@ -210,6 +210,7 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
                sd_err(("%s: error while trying to keep power\n", __FUNCTION__));
                return ret;
        }
+
 #if defined(OOB_INTR_ONLY)
        bcmsdh_oob_intr_set(0);
 #endif /* defined(OOB_INTR_ONLY) */
@@ -241,14 +242,14 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
 {
 #if defined(OOB_INTR_ONLY)
        struct sdio_func *func = dev_to_sdio_func(pdev);
-#endif
+#endif /* defined(OOB_INTR_ONLY) */
        sd_trace(("%s Enter\n", __FUNCTION__));
+
        dhd_mmc_suspend = FALSE;
 #if defined(OOB_INTR_ONLY)
        if ((func->num == 2) && dhd_os_check_if_up(bcmsdh_get_drvdata()))
                bcmsdh_oob_intr_set(1);
 #endif /* (OOB_INTR_ONLY) */
-
        smp_mb();
        return 0;
 }
@@ -383,7 +384,7 @@ static int __init
 bcmsdh_module_init(void)
 {
        int error = 0;
-       sdio_function_init();
+       error = sdio_function_init();
        return error;
 }
 
index 1befd9e..5ae51fd 100644 (file)
@@ -22,7 +22,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: dhd_linux.c 351203 2012-08-17 06:23:09Z $
+ * $Id: dhd_linux.c 352803 2012-08-24 00:25:26Z $
  */
 
 #include <typedefs.h>
@@ -376,8 +376,8 @@ module_param(dhd_console_ms, uint, 0644);
 uint dhd_slpauto = TRUE;
 module_param(dhd_slpauto, uint, 0);
 
-/* ARP offload agent mode : Enable ARP Host Auto-Reply and ARP Peer Auto-Reply */
-uint dhd_arp_mode = 0xb;
+/* ARP offload agent mode : Enable ARP Peer Auto-Reply */
+uint dhd_arp_mode = ARP_OL_AGENT | ARP_OL_PEER_AUTO_REPLY;
 module_param(dhd_arp_mode, uint, 0);
 
 /* ARP offload enable */
@@ -3496,6 +3496,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        setbit(eventmask, WLC_E_SET_SSID);
        setbit(eventmask, WLC_E_PRUNE);
        setbit(eventmask, WLC_E_AUTH);
+       setbit(eventmask, WLC_E_ASSOC);
        setbit(eventmask, WLC_E_REASSOC);
        setbit(eventmask, WLC_E_REASSOC_IND);
        setbit(eventmask, WLC_E_DEAUTH);
@@ -4697,6 +4698,13 @@ dhd_dev_reset(struct net_device *dev, uint8 flag)
 
        dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
 
+       if (flag == TRUE) {
+               /* Issue wl down command before resetting the chip */
+               if (dhd_wl_ioctl_cmd(&dhd->pub, WLC_DOWN, NULL, 0, TRUE, 0) < 0) {
+                       DHD_TRACE(("%s: wl down failed\n", __FUNCTION__));
+               }
+       }
+
        ret = dhd_bus_devreset(&dhd->pub, flag);
        if (ret) {
                DHD_ERROR(("%s: dhd_bus_devreset: %d\n", __FUNCTION__, ret));
index c3471cb..e5a695e 100644 (file)
 
 #define        EPI_RC_NUMBER           9
 
-#define        EPI_INCREMENTAL_NUMBER  2
+#define        EPI_INCREMENTAL_NUMBER  5
 
 #define        EPI_BUILD_NUMBER        0
 
-#define        EPI_VERSION             1, 28, 9, 2
+#define        EPI_VERSION             1, 28, 9, 5
 
-#define        EPI_VERSION_NUM         0x011c0902
+#define        EPI_VERSION_NUM         0x011c0905
 
 #define EPI_VERSION_DEV                1.28.9
 
 /* Driver Version String, ASCII, 32 chars max */
 #ifdef BCMINTERNAL
-#define        EPI_VERSION_STR         "1.28.9.2 (r BCMINT)"
+#define        EPI_VERSION_STR         "1.28.9.5 (r BCMINT)"
 #else
 #ifdef WLTEST
-#define        EPI_VERSION_STR         "1.28.9.2 (r WLTEST)"
+#define        EPI_VERSION_STR         "1.28.9.5 (r WLTEST)"
 #else
-#define        EPI_VERSION_STR         "1.28.9.2 (r)"
+#define        EPI_VERSION_STR         "1.28.9.5 (r)"
 #endif
 #endif /* BCMINTERNAL */
 
index eda2faf..38ecd8f 100644 (file)
@@ -455,7 +455,7 @@ static int wl_android_set_fwpath(struct net_device *net, char *command, int tota
 
 int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
 {
-#define PRIVATE_COMMAND_MAX_LEN        4096
+#define PRIVATE_COMMAND_MAX_LEN        8192
        int ret = 0;
        char *command = NULL;
        int bytes_written = 0;
index e67fd22..3e0676a 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: wl_cfg80211.c 351262 2012-08-17 12:15:01Z $
+ * $Id: wl_cfg80211.c 352999 2012-08-24 13:01:09Z $
  */
 
 #include <typedefs.h>
@@ -72,8 +72,6 @@ u32 wl_dbg_level = WL_DBG_ERR;
 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
 #define MAX_WAIT_TIME 1500
-#define WL_SCAN_ACTIVE_TIME     40 /* ms : Embedded default Active setting from DHD Driver */
-#define WL_SCAN_PASSIVE_TIME   130 /* ms: Embedded default Passive setting from DHD Driver */
 
 #ifdef VSDB
 /* sleep time to keep STA's connecting or connection for continuous af tx or finding a peer */
@@ -1233,7 +1231,7 @@ wl_cfg80211_change_virtual_iface(struct wiphy *wiphy, struct net_device *ndev,
        chanspec_t chspec;
        struct wl_priv *wl = wiphy_priv(wiphy);
 
-       WL_DBG(("Enter \n"));
+       WL_DBG(("Enter type %d\n", type));
        switch (type) {
        case NL80211_IFTYPE_MONITOR:
        case NL80211_IFTYPE_WDS:
@@ -1301,7 +1299,7 @@ wl_cfg80211_change_virtual_iface(struct wiphy *wiphy, struct net_device *ndev,
                        return -EINVAL;
                }
        } else {
-               WL_ERR(("INVALID:change_virtual_iface for transition from GO/AP to client/STA"));
+               WL_DBG(("Change_virtual_iface for transition from GO/AP to client/STA"));
        }
 
        ndev->ieee80211_ptr->iftype = type;
@@ -1505,8 +1503,8 @@ static void wl_scan_prep(struct wl_scan_params *params, struct cfg80211_scan_req
        params->bss_type = DOT11_BSSTYPE_ANY;
        params->scan_type = 0;
        params->nprobes = -1;
-       params->active_time = -1;
-       params->passive_time = -1;
+       params->active_time = DHD_SCAN_ACTIVE_TIME;
+       params->passive_time = DHD_SCAN_PASSIVE_TIME;
        params->home_time = -1;
        params->channel_num = 0;
        memset(&params->ssid, 0, sizeof(wlc_ssid_t));
@@ -2729,12 +2727,12 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
        /* increate dwell time to receive probe response or detect Beacon
        * from target AP at a noisy air only during connect command
        */
-       ext_join_params->scan.active_time = WL_SCAN_ACTIVE_TIME*8;
-       ext_join_params->scan.passive_time = WL_SCAN_PASSIVE_TIME*3;
+       ext_join_params->scan.active_time = DHD_SCAN_ACTIVE_TIME*8;
+       ext_join_params->scan.passive_time = DHD_SCAN_PASSIVE_TIME*3;
        /* Set up join scan parameters */
        ext_join_params->scan.scan_type = -1;
        ext_join_params->scan.nprobes
-               = (ext_join_params->scan.active_time/(WL_SCAN_ACTIVE_TIME / 2));
+               = (ext_join_params->scan.active_time/(DHD_SCAN_ACTIVE_TIME / 2));
        ext_join_params->scan.home_time = -1;
 
        if (sme->bssid)
@@ -5200,6 +5198,50 @@ exit:
 }
 
 static s32
+wl_cfg80211_del_station(
+       struct wiphy *wiphy,
+       struct net_device *ndev,
+       u8* mac_addr)
+{
+       struct net_device *dev;
+       struct wl_priv *wl = wiphy_priv(wiphy);
+       scb_val_t scb_val;
+       s8 eabuf[ETHER_ADDR_STR_LEN];
+
+       WL_DBG(("Entry\n"));
+       if (mac_addr == NULL) {
+               WL_DBG(("mac_addr is NULL ignore it\n"));
+               return 0;
+       }
+
+       if (ndev == wl->p2p_net) {
+               dev = wl_to_prmry_ndev(wl);
+       } else {
+               dev = ndev;
+       }
+
+       if (p2p_is_on(wl)) {
+               /* Suspend P2P discovery search-listen to prevent it from changing the
+                * channel.
+                */
+               if ((wl_cfgp2p_discover_enable_search(wl, false)) < 0) {
+                       WL_ERR(("Can not disable discovery mode\n"));
+                       return -EFAULT;
+               }
+       }
+
+       memcpy(scb_val.ea.octet, mac_addr, ETHER_ADDR_LEN);
+       scb_val.val = DOT11_RC_DEAUTH_LEAVING;
+       wldev_ioctl(dev, WLC_SCB_DEAUTHENTICATE_FOR_REASON, &scb_val,
+               sizeof(scb_val_t), true);
+       WL_DBG(("Disconnect STA : %s scb_val.val %d\n",
+               bcm_ether_ntoa((const struct ether_addr *)mac_addr, eabuf),
+               scb_val.val));
+       wl_delay(400);
+       return 0;
+}
+
+static s32
 wl_cfg80211_change_beacon(
        struct wiphy *wiphy,
        struct net_device *dev,
@@ -5405,6 +5447,7 @@ static struct cfg80211_ops wl_cfg80211_ops = {
        .change_beacon = wl_cfg80211_change_beacon,
        .start_ap = wl_cfg80211_start_ap,
        .stop_ap = wl_cfg80211_stop_ap,
+       .del_station = wl_cfg80211_del_station,
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0) */
 };
 
@@ -5466,6 +5509,15 @@ static s32 wl_setup_wiphy(struct wireless_dev *wdev, struct device *sdiofunc_dev
                WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS |
 #endif
                WIPHY_FLAG_4ADDR_STATION;
+       /*  If driver advertises FW_ROAM, the supplicant wouldn't
+        * send the BSSID & Freq in the connect command allowing the
+        * the driver to choose the AP to connect to. But unless we
+        * support ROAM_CACHE in firware this will delay the ASSOC as
+        * as the FW need to do a full scan before attempting to connect
+        * So that feature will just increase assoc. The better approach
+        * to let Supplicant to provide channel info and FW letter may roam
+        * if needed so DON'T advertise that featur eto Supplicant.
+        */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
        /* wdev->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM; */
 #endif
@@ -5473,7 +5525,12 @@ static s32 wl_setup_wiphy(struct wireless_dev *wdev, struct device *sdiofunc_dev
        wdev->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
                WIPHY_FLAG_OFFCHAN_TX;
 #endif
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
+       /* From 3.4 kernel ownards AP_SME flag can be advertised
+        * to remove the patch from supplicant
+        */
+       wdev->wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME;
+#endif
 #ifdef ENABLE_CUSTOM_REGULATORY_DOMAIN
        WL_DBG(("Registering custom regulatory)\n"));
        wdev->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
@@ -5609,11 +5666,8 @@ static s32 wl_inform_single_bss(struct wl_priv *wl, struct wl_bss_info *bi)
                        notif_bss_info->frame_len));
 
        signal = notif_bss_info->rssi * 100;
-
-
        if (!mgmt->u.probe_resp.timestamp) {
                struct timespec ts;
-
                get_monotonic_boottime(&ts);
                mgmt->u.probe_resp.timestamp = ((u64)ts.tv_sec * 1000000)
                                                + ts.tv_nsec / 1000;
@@ -6229,7 +6283,7 @@ wl_bss_connect_done(struct wl_priv *wl, struct net_device *ndev,
                        conn_info->req_ie_len,
                        conn_info->resp_ie,
                        conn_info->resp_ie_len,
-                       completed ? WLAN_STATUS_SUCCESS : WLAN_STATUS_AUTH_TIMEOUT,
+                       completed ? WLAN_STATUS_SUCCESS : e->reason,
                        GFP_KERNEL);
                if (completed)
                        WL_INFO(("Report connect result - connection succeeded\n"));
index 38e52b2..7efdf99 100644 (file)
@@ -21,7 +21,7 @@
  * software in any way with any other Broadcom software provided under a license
  * other than the GPL, without Broadcom's express prior written consent.
  *
- * $Id: wl_cfg80211.h 351262 2012-08-17 12:15:01Z $
+ * $Id: wl_cfg80211.h 352213 2012-08-22 05:03:55Z $
  */
 
 #ifndef _wl_cfg80211_h_