From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:53203 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371Ab2ASMfp (ORCPT ); Thu, 19 Jan 2012 07:35:45 -0500 Subject: Re: [PATCH 2/2] mac80211: make CQM RSSI support per virtual interface From: Johannes Berg To: Eliad Peller Cc: John Linville , linux-wireless@vger.kernel.org In-Reply-To: (sfid-20120119_123759_062535_26ECFC35) References: <20120119082956.486569312@sipsolutions.net> <20120119083102.873553392@sipsolutions.net> (sfid-20120119_123759_062535_26ECFC35) Content-Type: text/plain; charset="UTF-8" Date: Thu, 19 Jan 2012 13:35:40 +0100 Message-ID: <1326976540.3324.3.camel@jlt3.sipsolutions.net> (sfid-20120119_133549_378358_A0826B50) Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, 2012-01-19 at 13:37 +0200, Eliad Peller wrote: > On Thu, Jan 19, 2012 at 10:29 AM, Johannes Berg > wrote: > > From: Johannes Berg > > > > Similar to the previous beacon filtering patch, > > make CQM RSSI support depend on the flags that > > the driver set for virtual interfaces. > > > > Signed-off-by: Johannes Berg > > --- > [...] > > > > > - if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) { > > - if (sdata->vif.type != NL80211_IFTYPE_STATION) > > - return -EOPNOTSUPP; > > - return 0; > > - } > > - > > /* tell the driver upon association, unless already associated */ > > - if (sdata->u.mgd.associated) > > + if (sdata->u.mgd.associated && > > + sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI) > > ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM); > > > should you return EOPNOTSUPP if the vif doesn't support it? No. The code above that checks the type is useless as cfg80211 already checks the type, and we do support this in software in mac80211 if there's no HW offload for it. johannes