On Tue, Oct 11, 2011 at 11:49, Eliad Peller <eliad@xxxxxxxxxx> wrote: > If there is an active AP role, stay always on. > Otherwise, allow chip to enter elp. > > (Note that this is a global configuration, so if the > device is already configured according to our policy, > we don't have to configure it again) > > Signed-off-by: Eliad Peller <eliad@xxxxxxxxxx> > --- > v2: use ap_count/sta_count instead of iterating > + if (!wl->ap_count) { > + if (is_ap) { > + /* Configure for power always on */ > + ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_CAM); > + if (ret < 0) > + return ret; > + } else if (!wl->sta_count) { > + /* Configure for ELP power saving */ > + ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); > + if (ret < 0) > + return ret; > + } > + } Probably need to add a symmetric part on remove_interface(). If ap was shutdown we can return to normal ELP. btw, elp_work() still gets called even in AP-mode. I'm guessing it has no effect, but if you want to prevent the SDIO transaction from taking place (like you said on IRC), you can check for it :) (Just nitpicking here) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html