public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: linux-bluetooth@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [RFCv1] mac80211: Adds Software / Virtual AMP 80211
Date: Tue, 10 Apr 2012 15:47:44 +0300	[thread overview]
Message-ID: <20120410124742.GA17779@aemeltch-MOBL1> (raw)
In-Reply-To: <CAGRGNgX+R0CrtF2tBJ1AASBqkhHjmEfcqVnJiTd_1mXFL2rVUw@mail.gmail.com>

Hi Julian,

Thanks for review,

On Tue, Apr 10, 2012 at 10:26:11PM +1000, Julian Calaby wrote:
> > --- a/net/mac80211/iface.c
> > +++ b/net/mac80211/iface.c
> > @@ -898,6 +900,11 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
> >        case NL80211_IFTYPE_WDS:
> >        case NL80211_IFTYPE_AP_VLAN:
> >                break;
> > +       case NL80211_IFTYPE_VIRTUAL_AMP80211:
> > +#ifdef CONFIG_MAC80211_VIRTUAL_AMP
> > +               ieee80211_vamp_setup_sdata(sdata);
> > +               break;
> > +#endif
> >        case NL80211_IFTYPE_UNSPECIFIED:
> >        case NUM_NL80211_IFTYPES:
> >                BUG();
> 
> Should this really BUG() if VAMP is not enabled? Maybe print a warning
> and return an error instead.

I will make it empty inline function.

> > diff --git a/net/mac80211/virtual_amp.h b/net/mac80211/virtual_amp.h
> > new file mode 100644
> > index 0000000..5b7d219
> > --- /dev/null
> > +++ b/net/mac80211/virtual_amp.h
> > @@ -0,0 +1,29 @@
> > +/*
> > + * Virtual / Software AMP 80211 BT Controller header
> > + *
> > + * Copyright 2012 Intel Corp.
> > + *
> > + * Written by andrei.emeltchenko@intel.com
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#include "ieee80211_i.h"
> > +
> > +#ifdef CONFIG_MAC80211_VIRTUAL_AMP
> > +
> > +void ieee80211_vamp_setup_sdata(struct ieee80211_sub_if_data *sdata);
> > +void ieee80211_vamp_clean_sdata(struct ieee80211_sub_if_data *sdata);
> > +
> > +struct vamp_data {
> > +       struct hci_dev *hdev;
> > +
> > +       unsigned long flags;
> > +
> > +       struct work_struct work;
> > +       struct sk_buff_head txq;
> > +};
> > +
> > +#endif /* CONFIG_MAC80211_VIRTUAL_AMP */
> 
> A cleaner way of doing this is to have the function prototypes
> specified as empty inline functions when CONFIG_MAC80211_VIRTUAL_AMP
> is not defined and remove the #ifdefs in the main code. GCC's smart
> enough to compile away all the empty functions.

Will do this way.

Best regards 
Andrei Emeltchenko 


  reply	other threads:[~2012-04-10 12:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 12:11 [RFCv1] Draft Software/Virtual AMP80211 Andrei Emeltchenko
2012-04-10 12:11 ` [RFCv1] mac80211: Adds Software / Virtual AMP 80211 Andrei Emeltchenko
2012-04-10 12:26   ` Julian Calaby
2012-04-10 12:47     ` Andrei Emeltchenko [this message]
2012-04-10 16:39   ` Johannes Berg
2012-04-10 21:17     ` Marcel Holtmann
2012-04-10 21:20       ` Johannes Berg
2012-04-10 21:24         ` Johannes Berg
2012-04-11  7:11           ` Andrei Emeltchenko
2012-04-18  2:03             ` Johannes Berg
2012-04-18 12:15               ` Andrei Emeltchenko
2012-04-18 14:38                 ` Johannes Berg
2012-04-18 14:52                   ` Andrei Emeltchenko
2012-04-18 15:09                     ` Johannes Berg
2012-04-18 15:39                       ` Mat Martineau
2012-04-19  6:36                       ` Andrei Emeltchenko
2012-04-19 13:28                         ` Johannes Berg
2012-04-19 13:39                           ` Andrei Emeltchenko
2012-04-19 14:21                             ` Johannes Berg
2012-04-10 21:29         ` Marcel Holtmann
2012-04-11  7:05           ` Andrei Emeltchenko
2012-04-18  2:07             ` Johannes Berg
2012-04-18 11:20               ` Andrei Emeltchenko
2012-04-18 11:51                 ` Marcel Holtmann
2012-04-18 12:10                   ` Andrei Emeltchenko
2012-04-18 12:15                     ` Marcel Holtmann
2012-04-18 12:33                       ` Andrei Emeltchenko
2012-04-18 13:11                         ` Marcel Holtmann
2012-04-18 13:22                           ` Andrei Emeltchenko
2012-04-18 14:29                             ` Marcel Holtmann
2012-04-18 15:02                               ` Andrei Emeltchenko
2012-04-18 14:34                   ` Johannes Berg
2012-04-18 14:56                     ` Marcel Holtmann
2012-04-18 14:30                 ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410124742.GA17779@aemeltch-MOBL1 \
    --to=andrei.emeltchenko.news@gmail.com \
    --cc=julian.calaby@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox