diff mbox

[PATCHv2,1/2] ath9k_htc: remove driver specific checks for interfaces combinations

Message ID 1346014505-7554-1-git-send-email-ordex@autistici.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Antonio Quartulli Aug. 26, 2012, 8:55 p.m. UTC
Thanks to the new interface combinations code we can safely remove all the
driver specific checks for unsupported modes.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---

this patch if v2 of "ath9k_htc: allow coexistence of IBSS with other modes". Now
it is more generic.



 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 20 --------------------
 1 file changed, 20 deletions(-)

Comments

Mohammed Shafi Aug. 27, 2012, 5:17 a.m. UTC | #1
Hi,

On Mon, Aug 27, 2012 at 2:25 AM, Antonio Quartulli <ordex@autistici.org> wrote:
> Thanks to the new interface combinations code we can safely remove all the
> driver specific checks for unsupported modes.

i had just sent this some time back
http://permalink.gmane.org/gmane.linux.kernel.wireless.general/96443.

please review if something had to be changed.

>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
>
> this patch if v2 of "ath9k_htc: allow coexistence of IBSS with other modes". Now
> it is more generic.
>
>
>
>  drivers/net/wireless/ath/ath9k/htc_drv_main.c | 20 --------------------
>  1 file changed, 20 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index c32f6e3..51c69f2 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -1040,26 +1040,6 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
>
>         mutex_lock(&priv->mutex);
>
> -       if (priv->nvifs >= ATH9K_HTC_MAX_VIF) {
> -               mutex_unlock(&priv->mutex);
> -               return -ENOBUFS;
> -       }
> -
> -       if (priv->num_ibss_vif ||
> -           (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
> -               ath_err(common, "IBSS coexistence with other modes is not allowed\n");
> -               mutex_unlock(&priv->mutex);
> -               return -ENOBUFS;
> -       }
> -
> -       if (((vif->type == NL80211_IFTYPE_AP) ||
> -            (vif->type == NL80211_IFTYPE_ADHOC)) &&
> -           ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) {
> -               ath_err(common, "Max. number of beaconing interfaces reached\n");
> -               mutex_unlock(&priv->mutex);
> -               return -ENOBUFS;
> -       }
> -
>         ath9k_htc_ps_wakeup(priv);
>         memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
>         memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);
> --
> 1.7.12
>
> --
> 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
Antonio Quartulli Aug. 27, 2012, 6:54 a.m. UTC | #2
Hi Mohammed,

On Mon, Aug 27, 2012 at 10:47:29 +0530, Mohammed Shafi wrote:
> Hi,
> 
> On Mon, Aug 27, 2012 at 2:25 AM, Antonio Quartulli <ordex@autistici.org> wrote:
> > Thanks to the new interface combinations code we can safely remove all the
> > driver specific checks for unsupported modes.
> 
> i had just sent this some time back
> http://permalink.gmane.org/gmane.linux.kernel.wireless.general/96443.
> 
> please review if something had to be changed.
> 

Sorry, but I hadn't seen your patch. Otherwise I would have not sent mine.

Your patch is ok. But, at this point, should patch 2/6 and 3/6 be merged
together?

Other than that, patch 2/6 should be modified to take into account IBSS mode.


Cheers,
Mohammed Shafi Aug. 27, 2012, 9:15 a.m. UTC | #3
Hi Antonio,

>
> On Mon, Aug 27, 2012 at 10:47:29 +0530, Mohammed Shafi wrote:
>> Hi,
>>
>> On Mon, Aug 27, 2012 at 2:25 AM, Antonio Quartulli <ordex@autistici.org> wrote:
>> > Thanks to the new interface combinations code we can safely remove all the
>> > driver specific checks for unsupported modes.
>>
>> i had just sent this some time back
>> http://permalink.gmane.org/gmane.linux.kernel.wireless.general/96443.
>>
>> please review if something had to be changed.
>>
>
> Sorry, but I hadn't seen your patch. Otherwise I would have not sent mine.

no issues :-)

>
> Your patch is ok. But, at this point, should patch 2/6 and 3/6 be merged
> together?

an order of interface combinations advertisement(2/6), followed by
removing specific
checks should be fine right ?

>
> Other than that, patch 2/6 should be modified to take into account IBSS mode.

yeah saw your patch, that in ath9k_htc IBSS interface can coexist with
one more interface.
The standalone limitation exists in ath9k too, not sure this is a
limitation to beacon config
for ath9k & ath9k_htc, I will just confirm. If its fine i will resend
the v2 version signing off both
of our names accounting IBSS mode too.


>
>
> Cheers,
>
>
> --
> Antonio Quartulli
>
> ..each of us alone is worth nothing..
> Ernesto "Che" Guevara
Antonio Quartulli Aug. 27, 2012, 9:42 a.m. UTC | #4
Hi Mohammed,

On Mon, Aug 27, 2012 at 02:45:36 +0530, Mohammed Shafi wrote:
> Hi Antonio,
> 
> > Your patch is ok. But, at this point, should patch 2/6 and 3/6 be merged
> > together?
> 
> an order of interface combinations advertisement(2/6), followed by
> removing specific
> checks should be fine right ?

In my opinion this is correct. But maybe Johannes has some arguments against this
order?

> 
> >
> > Other than that, patch 2/6 should be modified to take into account IBSS mode.
> 
> yeah saw your patch, that in ath9k_htc IBSS interface can coexist with
> one more interface.
> The standalone limitation exists in ath9k too, not sure this is a
> limitation to beacon config
> for ath9k & ath9k_htc, I will just confirm. If its fine i will resend
> the v2 version signing off both
> of our names accounting IBSS mode too.


fine with me :) Thank you!
Mohammed Shafi Sept. 3, 2012, 2:01 p.m. UTC | #5
Hi Antonio,

>> Other than that, patch 2/6 should be modified to take into account IBSS mode.
>
> yeah saw your patch, that in ath9k_htc IBSS interface can coexist with
> one more interface.

sorry for the delayed response(almost tortoise's pace :) ), the
ath9k_htc maintainer said
TSF sync may be an issue if we have IBSS interface coexistence, any
thoughts about this (or)
this should be fine based on your testing. please let me know!
Antonio Quartulli Sept. 4, 2012, 7:07 a.m. UTC | #6
On Mon, Sep 03, 2012 at 07:31:34PM +0530, Mohammed Shafi wrote:
> Hi Antonio,
> 
> >> Other than that, patch 2/6 should be modified to take into account IBSS mode.
> >
> > yeah saw your patch, that in ath9k_htc IBSS interface can coexist with
> > one more interface.
> 
> sorry for the delayed response(almost tortoise's pace :) ),

no worries :):)

> the
> ath9k_htc maintainer said
> TSF sync may be an issue if we have IBSS interface coexistence, any
> thoughts about this (or)
> this should be fine based on your testing. please let me know!
> 

Well, during my test I didn't hit any problem, but since the ath9k_htc
maintainer has much more experience then me I will perform a more stressful test
and see what happens. I'll let you know!

Thanks,
Mohammed Shafi Sept. 4, 2012, 7:47 a.m. UTC | #7
Hi Antonio,

>
>> the
>> ath9k_htc maintainer said
>> TSF sync may be an issue if we have IBSS interface coexistence, any
>> thoughts about this (or)
>> this should be fine based on your testing. please let me know!
>>
>
> Well, during my test I didn't hit any problem, but since the ath9k_htc
> maintainer has much more experience then me I will perform a more stressful test
> and see what happens. I'll let you know!

sure, thanks a lot!

>
> Thanks,
>
>
>
> --
> Antonio Quartulli
>
> ..each of us alone is worth nothing..
> Ernesto "Che" Guevara
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index c32f6e3..51c69f2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1040,26 +1040,6 @@  static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
 
 	mutex_lock(&priv->mutex);
 
-	if (priv->nvifs >= ATH9K_HTC_MAX_VIF) {
-		mutex_unlock(&priv->mutex);
-		return -ENOBUFS;
-	}
-
-	if (priv->num_ibss_vif ||
-	    (priv->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
-		ath_err(common, "IBSS coexistence with other modes is not allowed\n");
-		mutex_unlock(&priv->mutex);
-		return -ENOBUFS;
-	}
-
-	if (((vif->type == NL80211_IFTYPE_AP) ||
-	     (vif->type == NL80211_IFTYPE_ADHOC)) &&
-	    ((priv->num_ap_vif + priv->num_ibss_vif) >= ATH9K_HTC_MAX_BCN_VIF)) {
-		ath_err(common, "Max. number of beaconing interfaces reached\n");
-		mutex_unlock(&priv->mutex);
-		return -ENOBUFS;
-	}
-
 	ath9k_htc_ps_wakeup(priv);
 	memset(&hvif, 0, sizeof(struct ath9k_htc_target_vif));
 	memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);