From 3308bc150646abcf523c001a7b6086c46703b204 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 18 Nov 2019 16:07:37 +0100 Subject: wireless: T1627: config migrator does not support camel casing convert all nodes to lowercase --- interface-definitions/interfaces-wireless.xml | 2 +- src/migration-scripts/interfaces/3-to-4 | 30 +++++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/interface-definitions/interfaces-wireless.xml b/interface-definitions/interfaces-wireless.xml index c9b9618e8..4d098ac37 100644 --- a/interface-definitions/interfaces-wireless.xml +++ b/interface-definitions/interfaces-wireless.xml @@ -43,7 +43,7 @@ HT (High Throughput) settings - + 40MHz intolerance, use 20MHz only! diff --git a/src/migration-scripts/interfaces/3-to-4 b/src/migration-scripts/interfaces/3-to-4 index 4a2fd9c0d..8b9bf7f96 100755 --- a/src/migration-scripts/interfaces/3-to-4 +++ b/src/migration-scripts/interfaces/3-to-4 @@ -24,24 +24,36 @@ if not config.exists(base): else: for wifi in config.list_nodes(base): # as converting a node to bool is always the same, we can script it - to_bool_nodes = ['capabilities ht 40MHz-incapable', 'capabilities ht auto-powersave', - 'capabilities ht delayed-block-ack', 'capabilities ht dsss-cck-40', - 'capabilities ht greenfield', 'capabilities ht ldpc', 'capabilities ht lsig-protection', - 'capabilities ht stbc tx', 'capabilities require-ht', 'capabilities require-vht', - 'capabilities vht antenna-pattern-fixed', 'capabilities vht ldpc', - 'capabilities vht stbc tx', 'capabilities vht tx-powersave', - 'capabilities vht vht-cf', 'expunge-failing-stations', 'isolate-stations'] + to_bool_nodes = ['capabilities ht 40MHz-incapable', + 'capabilities ht auto-powersave', + 'capabilities ht delayed-block-ack', + 'capabilities ht dsss-cck-40', + 'capabilities ht greenfield', + 'capabilities ht ldpc', + 'capabilities ht lsig-protection', + 'capabilities ht stbc tx', + 'capabilities require-ht', + 'capabilities require-vht', + 'capabilities vht antenna-pattern-fixed', + 'capabilities vht ldpc', + 'capabilities vht stbc tx', + 'capabilities vht tx-powersave', + 'capabilities vht vht-cf', + 'expunge-failing-stations', + 'isolate-stations'] for node in to_bool_nodes: if config.exists(base + [wifi, node]): tmp = config.return_value(base + [wifi, node]) # delete old node config.delete(base + [wifi, node]) + # set new node if it was enabled if tmp == 'true': - config.set(base + [wifi, node]) + # OLD CLI used camel casing in 40MHz-incapable which is + # not supported in the new backend. Convert all to lower-case + config.set(base + [wifi, node.lower()]) if config.exists(base + [wifi, 'debug']): - tmp = config.return_value(base + [wifi, 'debug']) config.delete(base + [wifi, 'debug']) try: -- cgit v1.2.3