From patchwork Wed Nov 25 21:55:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 63013 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAPLvFkN026075 for ; Wed, 25 Nov 2009 21:57:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935111AbZKYV40 (ORCPT ); Wed, 25 Nov 2009 16:56:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935127AbZKYV4X (ORCPT ); Wed, 25 Nov 2009 16:56:23 -0500 Received: from bu3sch.de ([62.75.166.246]:60066 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935117AbZKYV4U convert rfc822-to-8bit (ORCPT ); Wed, 25 Nov 2009 16:56:20 -0500 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1NDPqb-000103-UX; Wed, 25 Nov 2009 21:56:26 +0000 From: Michael Buesch To: "John W. Linville" Subject: [PATCH] airo: Fix integer overflow warning Date: Wed, 25 Nov 2009 22:55:11 +0100 User-Agent: KMail/1.9.9 Cc: "linux-wireless" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200911252255.11570.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Index: wireless-testing/drivers/net/wireless/airo.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/airo.c 2009-11-01 13:58:47.000000000 +0100 +++ wireless-testing/drivers/net/wireless/airo.c 2009-11-25 22:49:18.000000000 +0100 @@ -4806,7 +4806,7 @@ static int airo_config_commit(struct net static inline int sniffing_mode(struct airo_info *ai) { - return le16_to_cpu(ai->config.rmode & RXMODE_MASK) >= + return (le16_to_cpu(ai->config.rmode) & le16_to_cpu(RXMODE_MASK)) >= le16_to_cpu(RXMODE_RFMON); }