return ret;
 }
 
-int wl1271_plt_start(struct wl1271 *wl)
+int wl1271_plt_start(struct wl1271 *wl, const enum plt_mode plt_mode)
 {
        int retries = WL1271_BOOT_RETRIES;
        struct wiphy *wiphy = wl->hw->wiphy;
+
+       static const char* const PLT_MODE[] = {
+               "PLT_OFF",
+               "PLT_ON",
+               "PLT_FEM_DETECT"
+       };
+
        int ret;
 
        mutex_lock(&wl->mutex);
                goto out;
        }
 
+       /* Indicate to lower levels that we are now in PLT mode */
+       wl->plt = true;
+       wl->plt_mode = plt_mode;
+
        while (retries) {
                retries--;
                ret = wl12xx_chip_wakeup(wl, true);
                if (ret < 0)
                        goto power_off;
 
-               wl->plt = true;
                wl->state = WL1271_STATE_ON;
-               wl1271_notice("firmware booted in PLT mode (%s)",
+               wl1271_notice("firmware booted in PLT mode %s (%s)",
+                             PLT_MODE[plt_mode],
                              wl->chip.fw_ver_str);
 
                /* update hw/fw version info in wiphy struct */
                wl1271_power_off(wl);
        }
 
+       wl->plt = false;
+       wl->plt_mode = PLT_OFF;
+
        wl1271_error("firmware boot in PLT mode failed despite %d retries",
                     WL1271_BOOT_RETRIES);
 out:
        wl->sleep_auth = WL1271_PSM_ILLEGAL;
        wl->state = WL1271_STATE_OFF;
        wl->plt = false;
+       wl->plt_mode = PLT_OFF;
        wl->rx_counter = 0;
        mutex_unlock(&wl->mutex);
 
 
        val = nla_get_u32(tb[WL1271_TM_ATTR_PLT_MODE]);
 
        switch (val) {
-       case 0:
+       case PLT_OFF:
                ret = wl1271_plt_stop(wl);
                break;
-       case 1:
-               ret = wl1271_plt_start(wl);
+       case PLT_ON:
+       case PLT_FEM_DETECT:
+               ret = wl1271_plt_start(wl, val);
                break;
        default:
                ret = -EINVAL;
 
        FILTER_FW_HANDLE = 2
 };
 
+enum plt_mode {
+       PLT_OFF = 0,
+       PLT_ON = 1,
+       PLT_FEM_DETECT = 2,
+};
+
 struct wl12xx_rx_filter_field {
        __le16 offset;
        u8 len;
 #define wl12xx_for_each_wlvif_ap(wl, wlvif)    \
                wl12xx_for_each_wlvif_bss_type(wl, wlvif, BSS_TYPE_AP_BSS)
 
-int wl1271_plt_start(struct wl1271 *wl);
+int wl1271_plt_start(struct wl1271 *wl, const enum plt_mode plt_mode);
 int wl1271_plt_stop(struct wl1271 *wl);
 int wl1271_recalc_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif);
 void wl12xx_queue_recovery_work(struct wl1271 *wl);