diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-23 22:09:16 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-23 22:09:16 +0200 |
commit | 43323512f08b671e391685c601e78645b15ee681 (patch) | |
tree | 6d4eff3efa01e6af067bd2a4dc49c55aa1728d50 /sys/src/9/pc/etheriwl.c | |
parent | 2cf1e43e8cb87f0b201229548fe76a02548e67f1 (diff) |
wifi: add a debug flag and printing
add a debug flag that can be set in the ethernet options which
causes status transitions and wifictl messages to be printed.
Diffstat (limited to 'sys/src/9/pc/etheriwl.c')
-rw-r--r-- | sys/src/9/pc/etheriwl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c index 6c192a6b7..51c80933e 100644 --- a/sys/src/9/pc/etheriwl.c +++ b/sys/src/9/pc/etheriwl.c @@ -1943,14 +1943,19 @@ iwlifstat(Ether *edev, void *buf, long n, ulong off) static void setoptions(Ether *edev) { + char buf[64], *p; Ctlr *ctlr; - char buf[64]; int i; ctlr = edev->ctlr; for(i = 0; i < edev->nopt; i++){ - if(strncmp(edev->opt[i], "essid=", 6) == 0){ - snprint(buf, sizeof(buf), "essid %s", edev->opt[i]+6); + snprint(buf, sizeof(buf), "%s", edev->opt[i]); + p = strchr(buf, '='); + if(p != nil) + *p = 0; + if(strcmp(buf, "debug") == 0 || strcmp(buf, "essid") == 0){ + if(p != nil) + *p = ' '; if(!waserror()){ wifictl(ctlr->wifi, buf, strlen(buf)); poperror(); |