From patchwork Mon Jan 19 18:24:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 5660281 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DEEFEC058D for ; Mon, 19 Jan 2015 18:25:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2B8820364 for ; Mon, 19 Jan 2015 18:25:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2B7F20108 for ; Mon, 19 Jan 2015 18:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbbASSY7 (ORCPT ); Mon, 19 Jan 2015 13:24:59 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:37952 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbbASSY5 (ORCPT ); Mon, 19 Jan 2015 13:24:57 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so17705960wiv.0 for ; Mon, 19 Jan 2015 10:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vQAGFOSN4Q1J8+ysSwH5qHz7q4xcbd014WDIrFG9xIo=; b=HSpdzDQCJNk2CRqw7JNBQYDHjeNeIiMHdC4aAcMGTSPR1j3rty791WdGCHOIg3+U/L lOy6Z3LIk6/HgZYmObgQHb0cUutjsjFmIfNXd2eyvifvUfdZ9xd8WIBuIBC3o05lS2Fw N2G2LMKdl/Ovze13CLRqsnzg8+F9OaKjSGyQV+gA3UpJq3fjQFsyH04IzPOz6zfhRuQ6 Qzsgqs4MU7eyLECF5xisoVbEY2hmtZ6BicWxTXIjzNw+nLOrOrENlc89OoKUJJN3DjC8 ymuMrLHjPA055esTk6iAS5zbYmk4DXlfF7Fw9oPBWqo9nP7pSGxA1Egcx+kbXqxHjlOT yUKw== X-Received: by 10.180.216.36 with SMTP id on4mr37244487wic.27.1421691895549; Mon, 19 Jan 2015 10:24:55 -0800 (PST) Received: from tipsey.3.home ([92.40.107.9]) by mx.google.com with ESMTPSA id j1sm18224728wjw.25.2015.01.19.10.24.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jan 2015 10:24:54 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 2/6] staging: vt6655: common variable size channel numbers to ieee80211_channel->hw_value Date: Mon, 19 Jan 2015 18:24:11 +0000 Message-Id: <1421691855-2927-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421691855-2927-1-git-send-email-tvboxspy@gmail.com> References: <1421691855-2927-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP hw_value is u16 so fix all to the same size. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/channel.c | 6 +++--- drivers/staging/vt6655/device.h | 2 +- drivers/staging/vt6655/rf.c | 12 +++++++----- drivers/staging/vt6655/rf.h | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index 3fc09f4..3c17725 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -197,11 +197,11 @@ bool set_channel(void *pDeviceHandler, struct ieee80211_channel *ch) if (pDevice->byRFType == RF_AIROHA7230) RFbAL7230SelectChannelPostProcess(pDevice, pDevice->byCurrentCh, - (unsigned char)ch->hw_value); + ch->hw_value); - pDevice->byCurrentCh = (unsigned char)ch->hw_value; + pDevice->byCurrentCh = ch->hw_value; bResult &= RFbSelectChannel(pDevice, pDevice->byRFType, - (unsigned char)ch->hw_value); + ch->hw_value); /* Init Synthesizer Table */ if (pDevice->bEnablePSMode) diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 83efbfb..96d8e62 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -367,7 +367,7 @@ struct vnt_private { bool bIsBeaconBufReadySet; unsigned int cbBeaconBufReadySetCnt; bool bFixRate; - unsigned char byCurrentCh; + u16 byCurrentCh; bool bAES; diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 32ef993..27841aa 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -651,7 +651,8 @@ bool RFbInit( * Return Value: true if succeeded; false if failed. * */ -bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, unsigned char byChannel) +bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, + u16 byChannel) { bool bResult = true; @@ -687,7 +688,8 @@ bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, unsigned * Return Value: None. * */ -bool RFvWriteWakeProgSyn(struct vnt_private *priv, unsigned char byRFType, unsigned int uChannel) +bool RFvWriteWakeProgSyn(struct vnt_private *priv, unsigned char byRFType, + u16 uChannel) { void __iomem *dwIoBase = priv->PortOffset; int ii; @@ -767,7 +769,7 @@ bool RFvWriteWakeProgSyn(struct vnt_private *priv, unsigned char byRFType, unsig bool RFbSetPower( struct vnt_private *priv, unsigned int uRATE, - unsigned int uCH + u16 uCH ) { bool bResult = true; @@ -937,8 +939,8 @@ RFvRSSITodBm( /* Post processing for the 11b/g and 11a. * for save time on changing Reg2,3,5,7,10,12,15 */ bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, - unsigned char byOldChannel, - unsigned char byNewChannel) + u16 byOldChannel, + u16 byNewChannel) { bool bResult; diff --git a/drivers/staging/vt6655/rf.h b/drivers/staging/vt6655/rf.h index 8a6e2cf..2ea21e2 100644 --- a/drivers/staging/vt6655/rf.h +++ b/drivers/staging/vt6655/rf.h @@ -74,12 +74,12 @@ /*--------------------- Export Functions --------------------------*/ bool IFRFbWriteEmbedded(struct vnt_private *, unsigned long dwData); -bool RFbSelectChannel(struct vnt_private *, unsigned char byRFType, unsigned char byChannel); +bool RFbSelectChannel(struct vnt_private *, unsigned char byRFType, u16); bool RFbInit( struct vnt_private * ); -bool RFvWriteWakeProgSyn(struct vnt_private *, unsigned char byRFType, unsigned int uChannel); -bool RFbSetPower(struct vnt_private *, unsigned int uRATE, unsigned int uCH); +bool RFvWriteWakeProgSyn(struct vnt_private *, unsigned char byRFType, u16); +bool RFbSetPower(struct vnt_private *, unsigned int uRATE, u16); bool RFbRawSetPower( struct vnt_private *, unsigned char byPwr, @@ -94,7 +94,7 @@ RFvRSSITodBm( ); //{{ RobertYu: 20050104 -bool RFbAL7230SelectChannelPostProcess(struct vnt_private *, unsigned char byOldChannel, unsigned char byNewChannel); +bool RFbAL7230SelectChannelPostProcess(struct vnt_private *, u16, u16); //}} RobertYu #endif // __RF_H__