Re: urtwn(4) / rtwn(4) drivers are merged - call for testing (Was: RTL8812AU / RTL8821AU driver)
Sun, 04 Sep 2016 11:37:19 +0300 було написано Marcus von Appen: Try to add your vendor / device into sys/dev/rtwn/pci/rtwn_pci_attach.h (sys/dev/rtwn/if_rtwn.c for current driver in HEAD): { 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE }, + { , , "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE }, { 0, 0, NULL, RTWN_CHIP_MAX_PCI } On, Thu Sep 01, 2016, Andriy Voskoboinyk wrote: Hi everyone, rtwn(4), urtwn(4) and urtwm (from previous emails) drivers were merged into a single rtwn driver (plus rtwn_usb / rtwn_pci device glue); the code is available on https://github.com/s3erios/rtwn repository. Among bugfixes / code deduplication, there some new features too: 1) multi-vap support (one any wireless interface + one STA interface + any number of monitor mode interfaces). 2) few new sysctls: * dev.rtwn.#.crypto - controls how to use hardware crypto acceleration * dev.rtwn.#.ratectl_selected * dev.rtwn.#.ratectl - selects current 'rate control' algorithm (currently only 'none' and 'net80211' are supported; RTL8192CE needs testing with the last). I got a RTL8192CE - what should I look for, when using net80211? Cheers Marcus ___ freebsd-wireless@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-wireless To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
Deadlock between device_detach() and usbd_do_request_flags()
There is a rare, but reproducible deadlock for wlan(4) drivers: Thread 1: * uhub_explore_handle_re_enumerate() (obtains enum_sx lock) * usbd_set_config_index() * usb_unconfigure() * usb_detach_device() * usb_detach_device_sub() *typically is executed here (prevents another possible deadlock?) * ieee80211_ifdetach() * ieee80211_vap_destroy() * ic_vap_delete> * ieee80211_vap_detach() here it calls ieee80211_stop() and waits for -> INIT state transition Thread 2 (started from thread 1): * ieee80211_newstate_cb() * vap->iv_newstate() here: if the driver will try to call usbd_do_request_flags() (typically via / ) it will hang (because enum_sx lock is already held by thread 1). Another way: execute some periodical task that will try to access some registers (urtwn_temp_calib(), rum_ratectl_task(), run_ratectl_cb()) while thread 1 is running - deadlock is here too, since will wait for them indefinitely (via ieee80211_draintask()) Right now the most obvious (and, probably, wrong) way is to just detect & release all locks (usbd_enum_unlock()) for ieee80211_ifdetach() / ieee80211_draintask() and re-acquire them later (not tested yet). Any ideas? ___ freebsd-wireless@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-wireless To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
Small example program shut down urtwn
Dears I wrote these two small programs to help debug a problem that I think I have found when using urtwn driver in a baglebone black. The problem is 100% reproducible. In a server machine I run: serverUDP 2508 In beaglebone black I run: ./clientUDP servername 2508 9216 0 All the times, after some packages be sent the urtwn interface do not respond from ping and stops send others packages. Some times this error message appears: % urtwn0: device timeout I have tested with RTL8192CU and RTL8188CUS The problem do no occurs in my notebook. Following the server and client #include #include #include #include #include #include #include #include #define BUFFER_LEN1024*1024 void diep(char *s) { perror(s); exit(1); } int main(int argc, char **argv) { int lidos; struct sockaddr_in si_me, si_other; int s, i, slen=sizeof(si_other); char buf[BUFFER_LEN]; int aux; if(argc != 2){ fprintf(stderr, "Voce deve usar %s \n", argv[0]); exit(1); } if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) diep("socket"); memset((char *) _me, 0, sizeof(si_me)); si_me.sin_family = AF_INET; si_me.sin_port = htons(strtol(argv[1], (char **)NULL, 10)); si_me.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(s, (struct sockaddr *)_me, sizeof(si_me))==-1) diep("bind"); i = 1; do { if ((lidos = recvfrom(s, buf, BUFFER_LEN, 0, (struct sockaddr *)_other, (socklen_t *)))==-1) diep("recvfrom()"); aux = ntohl(*(int*)[0]); printf("Perdidos %d pacotes (%0.2f%%)\n", aux - i, 100*((float)(aux - i))/((float)aux)); printf("Sequencia %d Recebidos %d bytes\n", aux, lidos); i++; }while(lidos>0); close(s); return 0; } #include #include #include #include #include #include #include #include #include #include #include #include #define SOCKET_ERROR-1 #define INVALID_SOCKET-1 #define SRV_IP "127.0.0.1" void diep(char *s) { perror(s); exit(1); } int main(int argc, char **argv) { struct sockaddr_in si_other; int s, i, slen=sizeof(si_other); char *buf; int tamanho; int npack; struct addrinfo *result = NULL, *ptr = NULL, hints; int iResult, aux; fd_set fdset; if(argc != 5){ fprintf(stderr,"Voce deve usar %s \n", argv[0]); exit(1); } tamanho= (int)strtol(argv[3], (char **)NULL, 10); npack= (int)strtol(argv[4], (char **)NULL, 10); buf = malloc(tamanho); bzero(, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; iResult = getaddrinfo(argv[1], argv[2], , ); if ( iResult != 0 ) { printf("getaddrinfo failed with error: %d\n", iResult); return 1; } // Attempt to connect to an address until one succeeds for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) { // Create a SOCKET for connecting to server s = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol); if (s < 0){ perror("socket"); return 1; } // Connect to server. iResult = connect(s, ptr->ai_addr, (int)ptr->ai_addrlen); if (iResult == SOCKET_ERROR) { close(s); s = INVALID_SOCKET; continue; } break; } freeaddrinfo(result); FD_ZERO(); FD_SET(s, ); for (i=1; i<=npack || npack==0; i++) { aux = htonl(i); memcpy([0], , sizeof(aux)); aux = htonl(npack); memcpy([0+sizeof(i)], , sizeof(aux)); do{ if(select(s+1, NULL, , NULL, NULL )<0) diep("select()"); }while(!FD_ISSET(s, )); if (send(s, buf, tamanho, 0)==-1) diep("sendto()"); } printf("Enviados %d pacotes de %d bytes\n", npack, tamanho); close(s); return 0; } ___ freebsd-wireless@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-wireless To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
Problem reports for freebsd-wireless@FreeBSD.org that need special attention
To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status |Bug Id | Description +---+--- New |206801 | iwn(4) page fault on netif restart Open|154598 | [ath] Atheros 5424/2424 can't connect to WPA netw Open|163312 | [panic] [ath] kernel panic: page fault with ath0 Open|166190 | [ath] TX hangs and frames stuck in TX queue Open|166357 | [ath] 802.11n TX stall when the first frame in th Open|169362 | [ath] AR5416: radar pulse PHY errors sometimes in Open|169433 | [iwn] iwn(4) doesn't support 6235 chip. Open|211689 | panic with lagg failover wireless ath and iwm 8 problems total for which you should take action. ___ freebsd-wireless@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-wireless To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
Re: urtwn(4) / rtwn(4) drivers are merged - call for testing (Was: RTL8812AU / RTL8821AU driver)
On, Thu Sep 01, 2016, Andriy Voskoboinyk wrote: > Hi everyone, > > rtwn(4), urtwn(4) and urtwm (from previous emails) drivers were merged > into a > single rtwn driver (plus rtwn_usb / rtwn_pci device glue); the code is > available on https://github.com/s3erios/rtwn repository. Among bugfixes / > code deduplication, there some new features too: > > 1) multi-vap support (one any wireless interface + one STA interface + > any number of monitor mode interfaces). > 2) few new sysctls: > * dev.rtwn.#.crypto - controls how to use hardware crypto acceleration > * dev.rtwn.#.ratectl_selected > * dev.rtwn.#.ratectl - selects current 'rate control' algorithm > (currently only 'none' and 'net80211' are supported; RTL8192CE needs > testing > with the last). I got a RTL8192CE - what should I look for, when using net80211? Cheers Marcus signature.asc Description: PGP signature