Browsing is not working
authorMarc Blassin <marcx.blassin@intel.com>
Wed, 30 Nov 2011 14:36:44 +0000 (15:36 +0100)
committerbuildbot <buildbot@intel.com>
Thu, 1 Dec 2011 16:17:01 +0000 (08:17 -0800)
BZ: 15379

As ioctl in the tty_operations struct for kernel 3.0 requires only 3
parameters, the wrong signature in n_gsm (4 parameters) leads to an IOCTL
call to the MUX which is not handled correctly.
Because of this, the RIL is not able to request the network interface
creation to the MUX via the GSMIOC_ENABLE_NET IOCTL call, so 3G data browsing is not
possible as no network interface exists.

Change-Id: Ic2ef269b5f3f161448230e6fd88ba35b3537c133
Signed-off-by: Marc Blassin <marcx.blassin@intel.com>
Reviewed-on: http://android.intel.com:8080/25804
Reviewed-by: Seibel, Eric <eric.seibel@intel.com>
Tested-by: Seibel, Eric <eric.seibel@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/tty/n_gsm.c

index ecf9e12..20035bc 100644 (file)
@@ -3027,7 +3027,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty, struct file *filp,
 /*
  * RRG: FIXME: protect ioctls w/ per-dlci exclusion
  */
-static int gsmtty_ioctl(struct tty_struct *tty, struct file *filp,
+static int gsmtty_ioctl(struct tty_struct *tty,
                        unsigned int cmd, unsigned long arg)
 {
        struct gsm_dlci *dlci = tty->driver_data;
@@ -3050,7 +3050,15 @@ static int gsmtty_ioctl(struct tty_struct *tty, struct file *filp,
                gsm_destroy_network(dlci);
                return 0;
        default:
-               return n_tty_ioctl_helper(tty, filp, cmd, arg);
+               /* While ioctl in the tty_operations struct for kernel 3.0
+                * requires only 3 parameters we do not have the file pointer
+                * to pass to the n_tty_ioclt_helper function.
+                * This function does only pass the parameter to tty_mode_ioctl
+                * which is doing nothing with it except to check it against
+                * NULL and BUG_ON if this is the case
+                * We can bypass this check by using a dummy value in the code.
+                */
+               return n_tty_ioctl_helper(tty, 0xb4dc0de, cmd, arg);
        }
 }