Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: RE: [PATCH] cdmamodem: create vendor.h file.
Date: Mon, 25 Jul 2011 16:44:53 +0200	[thread overview]
Message-ID: <1311605094.8920.19.camel@aeonflux> (raw)
In-Reply-To: <568DE01DA537804BA73470071BAC288938F4E57B@irsmsx503.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 3584 bytes --]

Hi Bertrand,

> > >  Makefile.am                |    3 ++-
> > >  drivers/cdmamodem/vendor.h |   25 +++++++++++++++++++++++++
> > >  2 files changed, 27 insertions(+), 1 deletions(-)
> > >  create mode 100644 drivers/cdmamodem/vendor.h
> > >
> > > diff --git a/Makefile.am b/Makefile.am
> > > index e00f73b..f1ef96c 100644
> > > --- a/Makefile.am
> > > +++ b/Makefile.am
> > > @@ -270,7 +270,8 @@ builtin_sources += drivers/cdmamodem/cdmamodem.h \
> > >  			drivers/cdmamodem/voicecall.c \
> > >  			drivers/cdmamodem/devinfo.c \
> > >  			drivers/cdmamodem/connman.c \
> > > -			drivers/cdmamodem/network-registration.c
> > > +			drivers/cdmamodem/network-registration.c \
> > > +			drivers/cdmamodem/vendor.h
> > >  endif
> > >
> > >  builtin_modules += g1
> > > diff --git a/drivers/cdmamodem/vendor.h b/drivers/cdmamodem/vendor.h
> > > new file mode 100644
> > > index 0000000..3b00bbf
> > > --- /dev/null
> > > +++ b/drivers/cdmamodem/vendor.h
> > > @@ -0,0 +1,25 @@
> > > +/*
> > > + *
> > > + *  oFono - Open Source Telephony
> > > + *
> > > + *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
> > > + *
> > > + *  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.
> > > + *
> > > + *  This program is distributed in the hope that it will be useful,
> > > + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > > + *  GNU General Public License for more details.
> > > + *
> > > + *  You should have received a copy of the GNU General Public License
> > > + *  along with this program; if not, write to the Free Software
> > > + *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
> > USA
> > > + *
> > > + */
> > > +
> > > +enum ofono_vendor {
> > > +	OFONO_VENDOR_GENERIC = 0,
> > > +	OFONO_VENDOR_SPEEDUP,
> > > +};
> > 
> > do not bother with this until it is really needed. Vendor quirks are the
> > last resort to avoid massive code duplication. In a lot of cases a
> > vendor specific atom driver is the better choice.
> > 
> > And you can just share the atmodem ones in this case anyway.
> 
> I am thinking again to this file, and I think we will definitely need a Vendor.h for CDMA.
> 
> As we said in another discussion, there is no standard in CDMA, so we should have vendor specific code in any atom. And creating an atom per modem will duplicate a lot of code.
> 
> And I don't know if we should set an OFONO_VENDOR_GENERIC for CDMA. I think that if 2 modems are using the same AT command (CPIN for example), we should do a switch or if/else with all the different vendor.
> 
> Another exemple. We are working on ConnMan atom. The 2 kind of dongle we have used, Huawei and SpeedUp, are using ^DORMANT for dormant mode notification. I don't think that we have to duplicate the ConnMan atom. We should be using the same atom, and use vendor define to set the AT command to register.
> 
> What do you think about this?

are you sure that the SpeedUp and Huawei dongle are really different.
Maybe it is just a re-branded version of the other. They could be
different and just share the same AT command set, but even then we might
not just bother here.

And from were I am standing, feel free to share the vendor quirks from
atmodem/vendor.h. At least until we have the rest figured out.

Regards

Marcel



  reply	other threads:[~2011-07-25 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 11:04 [PATCH] cdmamodem: create vendor.h file Bertrand Aygon
2011-07-23 11:08 ` Aygon, Bertrand
2011-07-23 15:05 ` Marcel Holtmann
2011-07-25 14:30   ` Aygon, Bertrand
2011-07-25 14:44     ` Marcel Holtmann [this message]
2011-07-25 15:00       ` Aygon, Bertrand
2011-07-25  6:23         ` Denis Kenzior
2011-07-25 16:58         ` Marcel Holtmann

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=1311605094.8920.19.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.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