atmodem: Fix issue with AT+CREG=? and AT+CGREG=? handling
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 24 May 2012 01:28:50 +0000 (03:28 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 24 May 2012 01:28:50 +0000 (03:28 +0200)
commit1f9f161e0b66fee9c0dd84ff77c51ea6645367cd
tree71d7c07f003f822282a352bd967dacd2acb3343b
parentce395cd818b435c5ece1b3dfc8734ee7234ad7c7
atmodem: Fix issue with AT+CREG=? and AT+CGREG=? handling

Some modems might see an interim +CREG: or +CGREG: notification when
querying the supported modes.

  Aux: > AT+CFUN=1\r
  Aux: < \r\nOK\r\n
  Aux: > AT+CREG=?\r
  Aux: < \r\n+CREG: 2\r\n
  Aux: < \r\n+CREG: (0-2)\r\nOK\r\n
  Unable to initialize Network Registration

To make this work, skip to the first line with an actual range value.
drivers/atmodem/gprs.c
drivers/atmodem/network-registration.c