From: Dennis Borgmann <dennis.borgmann@googlemail.com>
To: linux-wireless@vger.kernel.org, hostap@lists.shmoo.com
Subject: "ressource temporarily unavailable" on 2.4 GHz, not on 5GHz
Date: Wed, 16 Jun 2010 16:05:49 +0200 [thread overview]
Message-ID: <4C18DA3D.1030303@googlemail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
Hello wireless-list!
Hello hostapd-list!
I am using ath5k with hostapd-0.6.9 on a debian running kernel 2.6.34
and I am observing a "ressource temporarily unavailable" - error code 11
if I pump out multicast-packets quite fast. I wrote a small
test-program, that handles this test and as soon as I go down to a
8ms-pause or below in betweens the packets, the error is thrown quite
soon after starting the program. Funny thing is, that this error only
occurs in g-band (2.4 GHz), not in a-band (5GHz).
What could be the problem? Is this due to backoff-times in 2.4 GHz, that
don't occur on 5 GHz? Or could this be a bug?
Find attached my small piece of code to test and reproduce this effect.
Kind regards,
Dennis
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: connection_test_multicast.c --]
[-- Type: text/x-csrc; name="connection_test_multicast.c", Size: 2300 bytes --]
#include <sys/types.h> /* See NOTES */
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <linux/ip.h>
#include <string.h>
#include <stdlib.h>
#define MULTICAST_IP "224.0.0.1"
#define PORT 12345
struct sockaddr_in server_address;
int fd_socket;
int init_connection_client( void ) {
int sock, opt;
errno = 0;
//create a socket
sock = socket( PF_INET, SOCK_DGRAM, 0 );
if( sock == -1 ) {
printf("%s:%u socket() error (%s), error-code: %d\n", __FILE__, __LINE__, strerror(errno), sock);
exit(EXIT_FAILURE);
}
server_address.sin_family = PF_INET;
server_address.sin_addr.s_addr = inet_addr( MULTICAST_IP );
server_address.sin_port = htons( PORT );
if( bind( sock, (struct sockaddr*)&server_address, sizeof(struct sockaddr)) == -1 ) {
printf("%s:%u bind error (%s), error-code: %d\n", __FILE__, __LINE__, strerror(errno), errno);
exit(EXIT_FAILURE);
}
//set socket options
//IPTOS = type of service and precedence
//IPTOS_LOWDELAY = minimize delay
//IPTOS_PREC_PRIORITY =
opt = IPTOS_PREC_PRIORITY | IPTOS_LOWDELAY;
if( setsockopt( sock, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) == -1 ) {
printf("%s:%u setsockopt(IP_TOS) error (%s), error-code: %d\n", __FILE__, __LINE__, strerror(errno), errno);
exit(EXIT_FAILURE);
}
//give these packets the maximum priority
//SOL_SOCKET = manipulate at socket level
opt = 7;
if( setsockopt( sock, SOL_SOCKET, SO_PRIORITY, &opt, sizeof(opt)) == -1 ) {
printf("%s:%u setsockopt(SO_PRIORITY) error (%s), error-code: %d\n", __FILE__, __LINE__, strerror(errno), errno);
exit(EXIT_FAILURE);
}
return sock;
}
int send_data( unsigned char *network_data, size_t len ) {
if( sendto( fd_socket, network_data, len, MSG_DONTWAIT, \
(struct sockaddr*)&server_address, sizeof(struct sockaddr_in) ) == -1 ) {
printf("%s:%u sendto() error (%s), error-code: %d\n", __FILE__, __LINE__, strerror(errno), errno);
return errno;
}
return 0;
}
int main(int argc, char **argv) {
unsigned char *data_for_transmission;
int sleeper=atoi(argv[1]);
printf("%d\n",sleeper);
data_for_transmission = malloc( 1068 );
fd_socket=init_connection_client();
while(1) {
send_data( data_for_transmission, 1068 );
usleep(sleeper);
}
return 0;
}
next reply other threads:[~2010-06-16 14:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 14:05 Dennis Borgmann [this message]
2010-06-16 14:21 ` "ressource temporarily unavailable" on 2.4 GHz, not on 5GHz John W. Linville
2010-06-16 14:23 ` John W. Linville
2010-06-16 14:38 ` Bob Copeland
2010-06-17 12:13 ` Dennis Borgmann
2010-06-17 14:38 ` Dennis Borgmann
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=4C18DA3D.1030303@googlemail.com \
--to=dennis.borgmann@googlemail.com \
--cc=hostap@lists.shmoo.com \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.