From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:38501 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755953AbaELRVJ (ORCPT ); Mon, 12 May 2014 13:21:09 -0400 Date: Mon, 12 May 2014 22:51:37 +0530 From: Rajkumar Manoharan To: Johannes Berg CC: , , Sachin Ahuja , "Luis R. Rodriguez" Subject: Re: [PATCH v2] cfg80211: avoid restoring the regulatory during disconnect Message-ID: <20140512172136.GA9468@qca.qualcomm.com> (sfid-20140512_192113_814521_44F199B1) References: <1399631327-23379-1-git-send-email-rmanohar@qti.qualcomm.com> <1399903203.4337.9.camel@jlt4.sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" In-Reply-To: <1399903203.4337.9.camel@jlt4.sipsolutions.net> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, May 12, 2014 at 04:00:03PM +0200, Johannes Berg wrote: > On Fri, 2014-05-09 at 15:58 +0530, Rajkumar Manoharan wrote: > > > +static bool cfg80211_is_all_countryie_ignore(void) > > +{ > > + struct cfg80211_registered_device *rdev; > > + struct wireless_dev *wdev; > > + > > + list_for_each_entry(rdev, &cfg80211_rdev_list, list) { > > + list_for_each_entry(wdev, &rdev->wdev_list, list) { > > + wdev_lock(wdev); > > + if (!(wdev->wiphy->regulatory_flags & > > + REGULATORY_COUNTRY_IE_IGNORE)) { > > + wdev_unlock(wdev); > > The locking here seems completely pointless. > locking is handled in same way of cfg80211_is_all_idle. Still want to remove locks? > Also, maybe you can do something about the long lines, maybe with a > temporary variable? > -Rajkumar