← Back to team overview

netplan-developers team mailing list archive

[Merge] ~jocave/netplan/+git/netplan:dont-rebind-mwifiex into netplan:master

 

Jonathan Cave has proposed merging ~jocave/netplan/+git/netplan:dont-rebind-mwifiex into netplan:master.

Requested reviews:
  Developers of netplan (netplan-developers)

For more details, see:
https://code.launchpad.net/~jocave/netplan/+git/netplan/+merge/307531

We have found the mwifiex_pcie driver does not handle unbind/bind actions well. This manifested as frequent kernel panics when console-conf used netplan to configure interfaces on Ubuntu Core images.
-- 
Your team Developers of netplan is requested to review the proposed merge of ~jocave/netplan/+git/netplan:dont-rebind-mwifiex into netplan:master.
diff --git a/src/netplan b/src/netplan
index bdef802..403a5d1 100755
--- a/src/netplan
+++ b/src/netplan
@@ -103,8 +103,10 @@ def replug(device):  # pragma: nocover (covered in autopkgtest)
     try:
         # we must resolve symlinks here as the device dir will be gone after unbind
         driver = os.path.realpath(os.path.join(devdir, 'device', 'driver'))
-        if os.path.basename(driver) == 'mac80211_hwsim':
-            logging.debug('replug %s: mac80211_hwsim does not support rebinding, ignoring', device)
+        driver_name = os.path.basename(driver)
+        if driver_name in ('mac80211_hwsim', 'mwifiex_pcie'):
+            logging.debug('replug %s: %s does not support rebinding, ignoring',
+                          device, driver_name)
             return False
         logging.debug('replug %s: unbinding %s from %s', device, devname, driver)
         with open(os.path.join(driver, 'unbind'), 'w') as f:

Follow ups