udev: fix detection of HP HS2330 (3607gw)

commit 6a2847f7ab introduced basic
detection of HP HS2330 based on OEM Ericsson F3607gw modems.

Because some (or all?) HS2330 modems contain flawed text identifiers
containing strange (probably erroneous) binary sequences in place of
the ASCII space '\x20' character, the previous commit is incomplete.
The following logic detects the modem properly, by comparing binary
data as well as ASCII text values.
This commit is contained in:
Michael Schloh von Bennewitz 2011-06-30 00:39:44 -05:00 committed by Denis Kenzior
parent c19dea9889
commit a90d81e310
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ static void add_mbm(struct ofono_modem *modem,
(g_str_has_suffix(desc, "Minicard Data Modem") ||
g_str_has_suffix(desc, "Mini-Card Data Modem") ||
g_str_has_suffix(desc, "Module Data Modem") ||
g_str_has_suffix(desc, "Module\xc2\xa0""Data Modem") ||
g_str_has_suffix(desc, "Broadband Data Modem"))) {
devnode = udev_device_get_devnode(udev_device);
ofono_modem_set_string(modem, DATA_DEVICE, devnode);