From patchwork Sun Mar 6 17:23:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 613821 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p26HNnU6029650 for ; Sun, 6 Mar 2011 17:23:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212Ab1CFRXr (ORCPT ); Sun, 6 Mar 2011 12:23:47 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:47902 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752811Ab1CFRXp (ORCPT ); Sun, 6 Mar 2011 12:23:45 -0500 Received: by mail-wy0-f174.google.com with SMTP id 36so3553649wyg.19 for ; Sun, 06 Mar 2011 09:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=fd2t4pUNaLtrbGbA1+w+i5yvPvJxe8iTIqjJSrLPGmc=; b=P6ArytmqYAz22KGKepzwkfpH4GN36zj05vwU9gEMIEd7jnCK3gUjBjgcvsxLqwTWPO d/qVNSS03iIREhgGSHGuQKXwZdH/KwryT9Vpww23S2ErX/1Jo/S1XeyNlWWNPq8+y+tJ aBdMcFv16yn1YDtegK43fA3bZ2nrvDWqfJnrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=rq1EdZ13T35Cj0guDGLGIK9w9r5H4GT4ZH1Lho1di2Ye4aMgxZGVoCu2EH6PpB93QC FKdNcdFgpycl0tTaHwwEnqQiKn79dtF/SAny25i3s6MI3VDIK4HK3D/Pe4D5hTvJkE6l okI7pl345BZ845AL7VUp3tFoO5qc+IGoPMG1U= Received: by 10.227.179.69 with SMTP id bp5mr2588219wbb.192.1299432225175; Sun, 06 Mar 2011 09:23:45 -0800 (PST) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id x1sm1402161wbh.8.2011.03.06.09.23.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Mar 2011 09:23:44 -0800 (PST) From: Grazvydas Ignotas To: "John W. Linville" Cc: Kalle Valo , linux-wireless@vger.kernel.org, David Gnedt , Grazvydas Ignotas Subject: [PATCH 1/2] wl1251: remove wl1251_ps_set_elp function Date: Sun, 6 Mar 2011 19:23:36 +0200 Message-Id: <1299432217-32139-2-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1299432217-32139-1-git-send-email-notasas@gmail.com> References: <1299432217-32139-1-git-send-email-notasas@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 06 Mar 2011 17:23:49 +0000 (UTC) diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c index 9ba23ed..842155e 100644 --- a/drivers/net/wireless/wl1251/ps.c +++ b/drivers/net/wireless/wl1251/ps.c @@ -102,38 +102,6 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl) return 0; } -static int wl1251_ps_set_elp(struct wl1251 *wl, bool enable) -{ - int ret; - - if (enable) { - wl1251_debug(DEBUG_PSM, "sleep auth psm/elp"); - - ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); - if (ret < 0) - return ret; - - wl1251_ps_elp_sleep(wl); - } else { - wl1251_debug(DEBUG_PSM, "sleep auth cam"); - - /* - * When the target is in ELP, we can only - * access the ELP control register. Thus, - * we have to wake the target up before - * changing the power authorization. - */ - - wl1251_ps_elp_wakeup(wl); - - ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_CAM); - if (ret < 0) - return ret; - } - - return 0; -} - int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) { int ret; @@ -162,7 +130,7 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) if (ret < 0) return ret; - ret = wl1251_ps_set_elp(wl, true); + ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); if (ret < 0) return ret; @@ -171,7 +139,8 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) case STATION_ACTIVE_MODE: default: wl1251_debug(DEBUG_PSM, "leaving psm"); - ret = wl1251_ps_set_elp(wl, false); + + ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_CAM); if (ret < 0) return ret;