shill: cellular: Recognize cellular devices using cdc_mbim driver.
BUG=chromium:254820
TEST=Tested the following:
1. Build and run unit tests.
2. Verify that shill creates a Cellular object for a device using the
cdc_mbim driver.
Change-Id: I6cf3b594ebca9991551dd9331bd01b18979d0b2c
Reviewed-on: https://gerrit.chromium.org/gerrit/60185
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/device_info.cc b/device_info.cc
index 5aa6441..af749f6 100644
--- a/device_info.cc
+++ b/device_info.cc
@@ -76,6 +76,7 @@
"gobi",
"QCUSBNet2k",
"GobiNet",
+ "cdc_mbim",
"qmi_wwan"
};
const char DeviceInfo::kTunDeviceName[] = "/dev/net/tun";
diff --git a/device_info_unittest.cc b/device_info_unittest.cc
index e8146e6..7e9bcfa 100644
--- a/device_info_unittest.cc
+++ b/device_info_unittest.cc
@@ -985,6 +985,11 @@
EXPECT_EQ(Technology::kCellular, GetDeviceTechnology());
}
+TEST_F(DeviceInfoTechnologyTest, CellularCdcMbim) {
+ CreateInfoSymLink("device/driver", "cdc_mbim");
+ EXPECT_EQ(Technology::kCellular, GetDeviceTechnology());
+}
+
TEST_F(DeviceInfoTechnologyTest, CellularQmiWwan) {
CreateInfoSymLink("device/driver", "qmi_wwan");
EXPECT_EQ(Technology::kCellular, GetDeviceTechnology());