},
        {
                .max = 1,
-               .types = BIT(NL80211_IFTYPE_AP) |
-                        BIT(NL80211_IFTYPE_P2P_GO) |
-                        BIT(NL80211_IFTYPE_P2P_CLIENT),
+               .types =   BIT(NL80211_IFTYPE_AP)
+                        | BIT(NL80211_IFTYPE_P2P_GO)
+                        | BIT(NL80211_IFTYPE_P2P_CLIENT)
+#ifdef CONFIG_MAC80211_MESH
+                        | BIT(NL80211_IFTYPE_MESH_POINT)
+#endif
        },
        {
                .max = 1,
                .max = 2,
                .types = BIT(NL80211_IFTYPE_AP),
        },
+#ifdef CONFIG_MAC80211_MESH
+       {
+               .max = 1,
+               .types = BIT(NL80211_IFTYPE_MESH_POINT),
+       },
+#endif
        {
                .max = 1,
                .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
 
        wl1271_error("Your WiFi FW version (%u.%u.%u.%u.%u) is invalid.\n"
                     "Please use at least FW %s\n"
                     "You can get the latest firmwares at:\n"
-                    "git://github.com/TI-OpenLink/firmwares.git",
+                    "git://git.ti.com/wilink8-wlan/wl18xx_fw.git",
                     fw_ver[FW_VER_CHIP], fw_ver[FW_VER_IF_TYPE],
                     fw_ver[FW_VER_MAJOR], fw_ver[FW_VER_SUBTYPE],
                     fw_ver[FW_VER_MINOR], min_fw_str);
 
 
        wl1271_debug(DEBUG_CMD, "cmd role start ap %d", wlvif->role_id);
 
-       /* trying to use hidden SSID with an old hostapd version */
-       if (wlvif->ssid_len == 0 && !bss_conf->hidden_ssid) {
-               wl1271_error("got a null SSID from beacon/bss");
-               ret = -EINVAL;
-               goto out;
+       /* If MESH --> ssid_len is always 0 */
+       if (!ieee80211_vif_is_mesh(vif)) {
+               /* trying to use hidden SSID with an old hostapd version */
+               if (wlvif->ssid_len == 0 && !bss_conf->hidden_ssid) {
+                       wl1271_error("got a null SSID from beacon/bss");
+                       ret = -EINVAL;
+                       goto out;
+               }
        }
 
        cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 
        struct wl12xx_vif *wlvif = container_of(work, struct wl12xx_vif,
                                                rc_update_work);
        struct wl1271 *wl = wlvif->wl;
+       struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
        mutex_lock(&wl->mutex);
 
        if (ret < 0)
                goto out;
 
-       wlcore_hw_sta_rc_update(wl, wlvif);
+       if (ieee80211_vif_is_mesh(vif)) {
+               ret = wl1271_acx_set_ht_capabilities(wl, &wlvif->rc_ht_cap,
+                                                    true, wlvif->sta.hlid);
+               if (ret < 0)
+                       goto out_sleep;
+       } else {
+               wlcore_hw_sta_rc_update(wl, wlvif);
+       }
 
+out_sleep:
        wl1271_ps_elp_sleep(wl);
 out:
        mutex_unlock(&wl->mutex);
 
 static u8 wl12xx_get_role_type(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 {
+       struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
+
        switch (wlvif->bss_type) {
        case BSS_TYPE_AP_BSS:
                if (wlvif->p2p)
                        return WL1271_ROLE_P2P_GO;
+               else if (ieee80211_vif_is_mesh(vif))
+                       return WL1271_ROLE_MESH_POINT;
                else
                        return WL1271_ROLE_AP;
 
                wlvif->p2p = 1;
                /* fall-through */
        case NL80211_IFTYPE_AP:
+       case NL80211_IFTYPE_MESH_POINT:
                wlvif->bss_type = BSS_TYPE_AP_BSS;
                break;
        default:
                if (ret < 0)
                        goto out;
 
-               ret = wl1271_ap_set_probe_resp_tmpl(wl, wlvif->basic_rate, vif);
-               if (ret < 0)
-                       goto out;
+               /* No need to set probe resp template for mesh */
+               if (!ieee80211_vif_is_mesh(vif)) {
+                       ret = wl1271_ap_set_probe_resp_tmpl(wl,
+                                                           wlvif->basic_rate,
+                                                           vif);
+                       if (ret < 0)
+                               goto out;
+               }
 
                ret = wlcore_set_beacon_template(wl, vif, true);
                if (ret < 0)
 
        /* this callback is atomic, so schedule a new work */
        wlvif->rc_update_bw = sta->bandwidth;
+       memcpy(&wlvif->rc_ht_cap, &sta->ht_cap, sizeof(sta->ht_cap));
        ieee80211_queue_work(hw, &wlvif->rc_update_work);
 }
 
                                         BIT(NL80211_IFTYPE_AP) |
                                         BIT(NL80211_IFTYPE_P2P_DEVICE) |
                                         BIT(NL80211_IFTYPE_P2P_CLIENT) |
+#ifdef CONFIG_MAC80211_MESH
+                                        BIT(NL80211_IFTYPE_MESH_POINT) |
+#endif
                                         BIT(NL80211_IFTYPE_P2P_GO);
+
        wl->hw->wiphy->max_scan_ssids = 1;
        wl->hw->wiphy->max_sched_scan_ssids = 16;
        wl->hw->wiphy->max_match_sets = 16;