mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: clemens fischer <ino-news@spotteswoode.dnsalias.org>
To: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	wlanfae@realtek.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8712u: Fix driver to support ad-hoc mode
Date: Fri, 29 Apr 2011 23:15:48 +0200	[thread overview]
Message-ID: <20110429211548.GA4351@spotteswoode.de.eu.org> (raw)
In-Reply-To: <BANLkTimi4cUzS5-r_ofzLnjbVtNNjwD69Q@mail.gmail.com>

> Jeff Chua:

> Try this. This is my working config.
>
> # /etc/wpa1.conf
> ap_scan=2       # 0 does not work. 1 is ok. 2 is fast.
>
> network={
>         auth_alg=SHARED
>         mode=1          # ad-hoc
>         group=WEP104
>         ssid="yourSSID"
>         wep_key0=1234567890ABCDEF123456678
>         wep_tx_keyidx=0
>         key_mgmt=NONE
>         priority=0
>         scan_ssid=0
>         frequency=2412
> }
>
> # modprobe r8712u
> # iwconfig     <- you should be able to see 'wlan0' or 'wlan1' if
> you've more than 1 wireless
> # ifconfig wlan0 up
> # wpa_supplicant -i wlan0 -c /etc/wpa1.conf

Sorry, no dice here.  But before you start weeping, it doesn't seem to
be a problem with the driver.

  0 3 # iwconfig wlan0
  wlan0     IEEE 802.11bgn  ESSID:"manamana"  Nickname:"rtl_wifi"
            Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:11:87:68:0D:A4
            Bit Rate:150 Mb/s   Sensitivity:0/0
            Retry:off   RTS thr:off   Fragment thr:off
            Encryption key:off
            Power Management:off
            Link Quality=100/100  Signal level=58/100  Noise level=0/100
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:0   Missed beacon:0

  0 4 # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
  CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
  Trying to associate with SSID 'manamana'
  CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
  Associated with 02:11:87:68:0d:a4
  CTRL-EVENT-CONNECTED - Connection to 02:11:87:68:0d:a4 completed (auth) [id=0 id_str=]
  Associated with 02:11:87:68:0d:a4
  CTRL-EVENT-CONNECTED - Connection to 02:11:87:68:0d:a4 completed (reauth) [id=0 id_str=]

I cannot find out what it is:  "dnsmasq(8)" even gives out a lease, the
firewall doesn't block any packets etc.  Note that "wpa_supplicant(8)"
could set the ESSID while "iwconfig(8)" couldn't.  I think it has to do
with my mobile, a window$-mobile-6.1 device, because I cannot see the
typical log entries:

  client provides name: wince
  vendor class: Microsoft Windows CE
  DHCPREQUEST(wlan0) 192.168.3.2 ...
  DHCPACK(wlan0) 192.168.3.2 ...
  requested options: 1:netmask, ...

The old driver "r8192s_usb" that could be configured with "iwconfig(8)"
made these settings:

  0 3 # iwconfig wlan0
  wlan0     802.11b/g  link  ESSID:"mana"
            Mode:Ad-Hoc  Frequency=2.412 GHz  Cell: 12:7D:42:55:8D:38
            Bit Rate=54 Mb/s
            Retry min limit:7   RTS thr:off   Fragment thr:off
            Encryption key:7370-6F74-74   Security mode:restricted
            Power Management period:5s  mode:All packets received
            Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Here's a cut out from my setup script:

wlan_settings="${wlan_settings} essid ${station_id}"
wlan_settings="${wlan_settings} mode Ad-Hoc"
wlan_settings="${wlan_settings} channel 5"
wlan_settings="${wlan_settings} power 5s all"
wlan_settings="${wlan_settings} key restricted ${wlan_passkey}"

To match the "iwconfig(8)" output from the working setup better, I put
this line into "/etc/modprobe.d/modprobe.conf":

  options r8712u ht_enable=0

and got this, using "wpa_supplicant(8)":

  0 3 # iwconfig wlan0
  wlan0     IEEE 802.11bg  ESSID:"mana"  Nickname:"rtl_wifi"
            Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:11:87:DB:EC:D7
            Bit Rate:54 Mb/s   Sensitivity:0/0
            Retry:off   RTS thr:off   Fragment thr:off
            Encryption key:off
            Power Management:off
            Link Quality=100/100  Signal level=96/100  Noise level=0/100
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Note the lower "Bit Rate", but this didn't make things better.  BTW,
documentation of the "r8712u" module parameters would be nice.

  wifi_test:int               vrtl_carrier_sense:int
  video_mode:int              vcs_type:int
  chip_version:int            busy_thresh:int
  rfintfs:int                 ht_enable:int
  lbkmode:int                 cbw40_enable:int
  hci:int                     ampdu_enable:int
  network_mode:int            rf_config:int
  channel:int                 power_mgnt:int
  mp_mode:int                 low_power:int
  wmm_enable:int
  ifname: Net interface name, wlan%d=default (string)
  initmac:MAC-Address, default: use FUSE (charp)

I mean, the names can be got from "modinfo(8)", but then people must
read driver sources, which is not exactly user-friendly.

All in all, I think "r8712u" is getting better and I would love to use
it, if only because "r8192s_usb" leaks memory
(CONFIG_ARCH_WANT_FRAME_POINTERS debug/kmemleak).


regards, clemens

  reply	other threads:[~2011-04-29 21:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 16:25 Larry Finger
2011-04-28 15:08 ` clemens fischer
2011-04-28 15:31   ` Larry Finger
2011-04-28 18:05     ` Jeff Chua
2011-04-28 20:15       ` clemens fischer
2011-04-29  0:36         ` Jeff Chua
2011-04-29 21:15           ` clemens fischer [this message]
2011-04-29 21:52             ` Jeff Chua
2011-04-29 22:25               ` clemens fischer
2011-04-29 22:36                 ` Jeff Chua
2011-04-30  1:41                   ` clemens fischer
2011-04-30 12:21                     ` clemens fischer
2011-04-30 23:08                       ` Jeff Chua
2011-05-01 16:40                         ` clemens fischer
2011-05-01 17:21                           ` Jeff Chua
2011-05-01 19:55                             ` clemens fischer
2011-05-02  5:08                               ` Jeff Chua
2011-04-28 20:54     ` clemens fischer
2011-04-30  0:36     ` clemens fischer
2011-04-30  5:04       ` Larry Finger

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=20110429211548.GA4351@spotteswoode.de.eu.org \
    --to=ino-news@spotteswoode.dnsalias.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@suse.de \
    --cc=jeff.chua.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wlanfae@realtek.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®