lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1258083706.7715.16.camel@violet>
Date:	Fri, 13 Nov 2009 04:41:46 +0100
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Julian Calaby <julian.calaby@...il.com>
Cc:	Janakiram Sistla <janakiram.sistla@...il.com>,
	"John W. Linville" <linville@...driver.com>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 0/1] Adding radio type FM

Hi Julian,

please stop CCing majordomo@...r.kernel.org since that one is not a
mailing list.

> <janakiram.sistla@...il.com> wrote:
> > Resending with added comments from John.
> > From 1b1493392faeb6702ff364447b135e481930b397 Mon Sep 17 00:00:00 2001
> > From: Janakiram Sistla <janakiram.sistla@...il.com>
> > Date: Fri, 13 Nov 2009 08:16:26 +0530
> > Subject: [PATCH 1/1] Adding radio type FM
> >
> > Adding radio type FM in RFKILL_TYPE_.FM also belongs to
> > same class of with both TX/RX capability.
> > Also Added input type for the above same.
> >
> > Signed-off-by: Janakiram Sistla <janakiram.sistla@...il.com>
> > ---
> >  include/linux/input.h  |    1 +
> >  include/linux/rfkill.h |    1 +
> >  net/rfkill/core.c      |    2 ++
> >  net/rfkill/input.c     |    9 +++++++++
> >  4 files changed, 13 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/input.h b/include/linux/input.h
> > index 0ccfc30..f03ae90 100644
> > --- a/include/linux/input.h
> > +++ b/include/linux/input.h
> > @@ -376,6 +376,7 @@ struct input_absinfo {
> >  #define KEY_DISPLAY_OFF                245     /* display device to off state */
> >
> >  #define KEY_WIMAX              246
> > +#define KEY_FM                 247
> >
> >  /* Range 248 - 255 is reserved for special needs of AT keyboard driver */
> >
> > diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
> > index 3392c59..03f5598 100644
> > --- a/include/linux/rfkill.h
> > +++ b/include/linux/rfkill.h
> > @@ -45,6 +45,7 @@ enum rfkill_type {
> >        RFKILL_TYPE_WIMAX,
> >        RFKILL_TYPE_WWAN,
> >        RFKILL_TYPE_GPS,
> > +       RFKILL_TYPE_FM,
> >        NUM_RFKILL_TYPES,
> >  };
> >
> > diff --git a/net/rfkill/core.c b/net/rfkill/core.c
> > index ba2efb9..b8ac206 100644
> > --- a/net/rfkill/core.c
> > +++ b/net/rfkill/core.c
> > @@ -592,6 +592,8 @@ static const char *rfkill_get_type_str(enum
> > rfkill_type type)
> >                return "wwan";
> >        case RFKILL_TYPE_GPS:
> >                return "gps";
> > +       case RRFKILL_TYPE_FM:
> > +               return "fm";
> >        default:
> >                BUG();
> >        }
> > diff --git a/net/rfkill/input.c b/net/rfkill/input.c
> > index a7295ad..f51b16d 100644
> > --- a/net/rfkill/input.c
> > +++ b/net/rfkill/input.c
> > @@ -212,6 +212,9 @@ static void rfkill_event(struct input_handle
> > *handle, unsigned int type,
> >                case KEY_WIMAX:
> >                        rfkill_schedule_toggle(RFKILL_TYPE_WIMAX);
> >                        break;
> > +               case KEY_FM:
> > +                       rfkill_schedule_toggle(RFKILL_TYPE_FM);
> > +                       break;
> >                }
> >        } else if (type == EV_SW && code == SW_RFKILL_ALL)
> >                rfkill_schedule_evsw_rfkillall(data);
> > @@ -290,6 +293,12 @@ static const struct input_device_id rfkill_ids[] = {
> >                .keybit = { [BIT_WORD(KEY_UWB)] = BIT_MASK(KEY_UWB) },
> >        },
> >        {
> > +               .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
> > +                               INPUT_DEVICE_ID_MATCH_KEYBIT,
> > +               .evbit = { BIT_MASK(EV_KEY) },
> > +               .keybit = { [BIT_WORD(KEY_FM)] = BIT_MASK(KEY_UWB) },
> 
> Surely both instances of KEY_UWB should be changed.

which makes it even more clearly that this code path has never been
tested. So lets leave this KEY_FM business out and just submit the
RFKILL additions.

You don't need to emulate a key event to use RFKILL anyway. The new
RFKILL subsystem supports /dev/rfkill and there is the rfkill userspace
utility. Which you wanna send a patch to extend it with FM support.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ