From: "Sergey N. Yatskevich" <syatskevich@mail.ru> To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org> Subject: Re: [sisyphus] Сегодняшнее обновление: hal + NetworkManager Date: Sat, 22 Nov 2008 15:15:48 +0300 Message-ID: <1227356149.12723.33.camel@snc.2100.gosniias.ru> (raw) In-Reply-To: <1227303177.12586.62.camel@snc.2100.gosniias.ru> [-- Attachment #1: Type: text/plain, Size: 2736 bytes --] Чего-то с этими включениями/выключениями дело мутное. Вот описание для ipw2100 (http://ipw2100.sourceforge.net/README.ipw2100): rf_kill read - 0 = RF kill not enabled (radio on) 1 = SW based RF kill active (radio off) 2 = HW based RF kill active (radio off) 3 = Both HW and SW RF kill active (radio off) write - 0 = If SW based RF kill active, turn the radio back on 1 = If radio is on, activate SW based RF kill NOTE: If you enable the SW based RF kill and then toggle the HW based RF kill from ON -> OFF -> ON, the radio will NOT come back on Так, похоже я был не прав. Всё таки включение/выключение WiFi карточки у меня работает и управляет ею именно rf_kill. 0 - означает, что карточка включена любое положительное число - что выключена Вручную проверил, вроде действительно работает. Т.е. изначально у меня в rf_kill записан 0 и карточка работает. Если я пишу в rf_kill единицу, то как минимум iwlist eth1 scan никаких сетей не видит (реальное выключение карточки я естественно проверить не могу, только по косвенным признакам) Если я опять пишу в rf_kill нолик, то всё опять работает. Ну а в addon-ipw-killswitch.c я вижу: /* Setting status of the killswitch */ static int set_killswitch (gboolean status) { ... // Пишем правильно, т.е status = true (включить), то пишем // 0, false (выключить) - пишем 1. if (status) { ret = fputc (0, f/*.../rf_kill*/); } else { ret = fputc (1, f/*.../rf_kill*/); } ... } /* Getting status of the killswitch */ static int get_killswitch () { ... if (fgets (buf, sizeof (buf), f/*.../rf_kill*/) == NULL) ... kill_status = strtol (buf, NULL, 10); // А вот и проблема - читаем неправильно, если в rf_kill записан 0, // то должны возвращать 1 (а возвращаем 0), а вот если любое другое // число - должны возвращать 0 (а возвращаем 1) ret = (kill_status) ? 1 : 0; // т.е. должно быть //ret = (kill_status) ? 0 : 1; ... return ret; } -- Sergey N. Yatskevich <syatskevich@mail.ru> [-- Attachment #2: Эта часть сообщения подписана цифровой подписью --] [-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-11-22 12:15 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-21 19:57 Sergey N. Yatskevich 2008-11-21 21:32 ` Sergey N. Yatskevich 2008-11-22 12:15 ` Sergey N. Yatskevich [this message] 2008-11-22 12:35 ` Valery V. Inozemtsev 2008-11-22 12:51 ` Sergey N. Yatskevich 2008-11-22 12:55 ` Valery V. Inozemtsev 2008-11-22 13:27 ` Sergey N. Yatskevich 2008-11-22 13:34 ` Valery V. Inozemtsev 2008-11-22 14:11 ` Sergey N. Yatskevich 2008-11-22 14:29 ` Valery V. Inozemtsev 2008-11-22 16:15 ` Sergey N. Yatskevich 2008-11-22 16:17 ` Sergey N. Yatskevich 2008-11-22 16:23 ` Михаил Якушин 2008-11-22 16:25 ` Михаил Якушин 2008-11-22 16:35 ` Valery V. Inozemtsev 2008-11-22 16:41 ` Sergey N. Yatskevich 2008-11-22 16:50 ` Valery V. Inozemtsev 2008-11-22 20:01 ` Sergey N. Yatskevich 2008-11-22 23:31 ` Sergey Bolshakov 2008-11-23 10:04 ` Sergey N. Yatskevich 2008-11-23 13:45 ` Suetnov Kirill 2008-11-23 14:03 ` Sergey N. Yatskevich 2008-11-23 15:01 ` Suetnov Kirill 2008-11-23 15:28 ` Sergey Bolshakov 2008-11-22 13:36 ` Konstantin A. Lepikhov 2008-11-22 13:17 ` Sergey N. Yatskevich 2008-11-23 15:30 ` Sergey N. Yatskevich 2008-11-24 9:29 ` Max Ivanov 2008-11-24 13:05 ` Sergey N. Yatskevich
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1227356149.12723.33.camel@snc.2100.gosniias.ru \ --to=syatskevich@mail.ru \ --cc=sisyphus@lists.altlinux.org \ --cc=syatskevich@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git