Search Linux Wireless

Re: [PATCH 2/3] mwifiex: use IEEE80211_HT_PARAM_CHA_SEC_* macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bing and Amitkumar,

Quick question:

On Wed, Dec 21, 2011 at 18:47, Bing Zhao <bzhao@xxxxxxxxxxx> wrote:
> From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
>
> Replace driver specific macros with the corresponding
> IEEE80211_HT_PARAM_CHA_SEC_* macros defined in ieee80211.h.
> Also, rename 'adapter->chan_offset' to 'adapter->sec_chan_offset'
> for consistency.
>
> Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
> ---
> diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
> index 64bf640..0723f61 100644
> --- a/drivers/net/wireless/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/mwifiex/cfg80211.c
> +static u8
> +mwifiex_cfg80211_channel_type_to_sec_chan_offset(enum nl80211_channel_type
> +                                                channel_type)
>  {
>        switch (channel_type) {
>        case NL80211_CHAN_NO_HT:
>        case NL80211_CHAN_HT20:
> -               return NO_SEC_CHANNEL;
> +               return IEEE80211_HT_PARAM_CHA_SEC_NONE;
>        case NL80211_CHAN_HT40PLUS:
> -               return SEC_CHANNEL_ABOVE;
> +               return IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
>        case NL80211_CHAN_HT40MINUS:
> -               return SEC_CHANNEL_BELOW;
> +               return IEEE80211_HT_PARAM_CHA_SEC_BELOW;
>        default:
> -               return NO_SEC_CHANNEL;
> +               return IEEE80211_HT_PARAM_CHA_SEC_NONE;
>        }
>  }

Is there a function in mac80211 to do this for you?

> @@ -51,20 +51,20 @@ mwifiex_cfg80211_channel_type_to_mwifiex_channels(enum nl80211_channel_type
>  static enum nl80211_channel_type
>  mwifiex_channels_to_cfg80211_channel_type(int channel_type)
>  {
>        switch (channel_type) {
> -       case NO_SEC_CHANNEL:
> +       case IEEE80211_HT_PARAM_CHA_SEC_NONE:
>                return NL80211_CHAN_HT20;
> -       case SEC_CHANNEL_ABOVE:
> +       case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
>                return NL80211_CHAN_HT40PLUS;
> -       case SEC_CHANNEL_BELOW:
> +       case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
>                return NL80211_CHAN_HT40MINUS;
>        default:
>                return NL80211_CHAN_HT20;

Same again.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux