diff mbox

[4/5] wil6210: stop_ap to leave interface closed

Message ID 1427704134-30699-5-git-send-email-qca_vkondrat@qca.qualcomm.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Vladimir Kondratiev March 30, 2015, 8:28 a.m. UTC
cfg80211_ops.stop_ap supposed to have interface closed
as post condition. Fulfill this requirement.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
 drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Johannes Berg March 30, 2015, 8:45 a.m. UTC | #1
On Mon, 2015-03-30 at 11:28 +0300, Vladimir Kondratiev wrote:
> cfg80211_ops.stop_ap supposed to have interface closed
> as post condition. Fulfill this requirement.

"closed" is rather misleading, since you most certainly should *not* do
dev_close() [and don't, but how should I know reading the commit log?]

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vladimir Kondratiev March 30, 2015, 1:56 p.m. UTC | #2
On Monday, March 30, 2015 10:45:56 AM Johannes Berg wrote:
> On Mon, 2015-03-30 at 11:28 +0300, Vladimir Kondratiev wrote:
> > cfg80211_ops.stop_ap supposed to have interface closed
> > as post condition. Fulfill this requirement.
> 
> "closed" is rather misleading, since you most certainly should *not* do
> dev_close() [and don't, but how should I know reading the commit log?]
> 
> johannes
> 

Yes, I see.
I meant that actually stop_ap leaves device in state similar to ndo_stop,
where it is non operational.

Would you suggest better wording? "Inactive", "down", "non operational"
or something else?

Thanks, Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo April 7, 2015, 4:30 p.m. UTC | #3
Vladimir Kondratiev <QCA_vkondrat@QCA.qualcomm.com> writes:

> On Monday, March 30, 2015 10:45:56 AM Johannes Berg wrote:
>> On Mon, 2015-03-30 at 11:28 +0300, Vladimir Kondratiev wrote:
>> > cfg80211_ops.stop_ap supposed to have interface closed
>> > as post condition. Fulfill this requirement.
>> 
>> "closed" is rather misleading, since you most certainly should *not* do
>> dev_close() [and don't, but how should I know reading the commit log?]
>> 
>> johannes
>> 
>
> Yes, I see.
> I meant that actually stop_ap leaves device in state similar to ndo_stop,
> where it is non operational.
>
> Would you suggest better wording? "Inactive", "down", "non operational"
> or something else?

Isn't "down" good enough here? So can I change it to:

  cfg80211_ops.stop_ap supposed to have interface down as post
  condition. Fulfill this requirement.
Johannes Berg April 7, 2015, 7:52 p.m. UTC | #4
>>> "closed" is rather misleading, since you most certainly should *not*
>do
>>> dev_close() [and don't, but how should I know reading the commit
>log?]
>>> 
>>> johannes
>>> 
>>
>> Yes, I see.
>> I meant that actually stop_ap leaves device in state similar to
>ndo_stop,
>> where it is non operational.
>>
>> Would you suggest better wording? "Inactive", "down", "non
>operational"
>> or something else?
>
>Isn't "down" good enough here? So can I change it to:

Well that kinda proves my point - down is wrong.

Carrier turned off is probably the right thing to do here.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo April 8, 2015, 8:06 a.m. UTC | #5
Johannes Berg <johannes@sipsolutions.net> writes:

>>>> "closed" is rather misleading, since you most certainly should *not*
>>do
>>>> dev_close() [and don't, but how should I know reading the commit
>>log?]
>>>> 
>>>> johannes
>>>> 
>>>
>>> Yes, I see.
>>> I meant that actually stop_ap leaves device in state similar to
>>ndo_stop,
>>> where it is non operational.
>>>
>>> Would you suggest better wording? "Inactive", "down", "non
>>operational"
>>> or something else?
>>
>>Isn't "down" good enough here? So can I change it to:
>
> Well that kinda proves my point - down is wrong.
>
> Carrier turned off is probably the right thing to do here.

Ok, I change the commit log to:

  cfg80211_ops.stop_ap supposed to have interface carried turned off as
  post condition. Fulfill this requirement.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index ec46a94..b51ac10 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -822,13 +822,9 @@  static int wil_cfg80211_stop_ap(struct wiphy *wiphy,
 	wmi_pcp_stop(wil);
 
 	__wil_down(wil);
-	__wil_up(wil);
 
 	mutex_unlock(&wil->mutex);
 
-	/* some functions above might fail (e.g. __wil_up). Nevertheless, we
-	 * return success because AP has stopped
-	 */
 	return 0;
 }