Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324497
b: refs/heads/master
c: 86d03a0
h: refs/heads/master
i:
  324495: a5e26b1
v: v3
  • Loading branch information
Rupesh Gujare authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent a345eb3 commit b4e3ab6
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5494ebdf3c1ac634b133369736632be82a0255f8
refs/heads/master: 86d03a0f4f575dda7988800a3da8d6e9f776a819
8 changes: 1 addition & 7 deletions trunk/drivers/staging/ozwpan/ozpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
/*------------------------------------------------------------------------------
*/
#define OZ_MAX_TX_POOL_SIZE 6
/* Maximum number of uncompleted isoc frames that can be pending in network.
*/
#define OZ_MAX_SUBMITTED_ISOC 16
/* Maximum number of uncompleted isoc frames that can be pending in Tx Queue.
*/
#define OZ_MAX_TX_QUEUE_ISOC 32
/*------------------------------------------------------------------------------
*/
static struct oz_tx_frame *oz_tx_frame_alloc(struct oz_pd *pd);
Expand Down Expand Up @@ -854,7 +848,7 @@ int oz_send_isoc_unit(struct oz_pd *pd, u8 ep_num, u8 *data, int len)
if (!(pd->mode & OZ_F_ISOC_ANYTIME)) {
struct oz_tx_frame *isoc_unit = NULL;
int nb = pd->nb_queued_isoc_frames;
if (nb >= OZ_MAX_TX_QUEUE_ISOC) {
if (nb >= pd->isoc_latency) {
oz_trace2(OZ_TRACE_TX_FRAMES,
"Dropping ISOC Unit nb= %d\n",
nb);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/ozwpan/ozpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct oz_pd {
u8 heartbeat_requested;
u8 mode;
u8 ms_per_isoc;
unsigned isoc_latency;
unsigned max_stream_buffering;
int nb_queued_frames;
int nb_queued_isoc_frames;
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/staging/ozwpan/ozproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ static struct oz_pd *oz_connect_req(struct oz_pd *cur_pd, struct oz_elt *elt,
pd->ms_per_isoc = body->ms_per_isoc;
if (!pd->ms_per_isoc)
pd->ms_per_isoc = 4;

switch (body->ms_isoc_latency & OZ_LATENCY_MASK) {
case OZ_ONE_MS_LATENCY:
pd->isoc_latency = (body->ms_isoc_latency &
~OZ_LATENCY_MASK) / pd->ms_per_isoc;
break;
case OZ_TEN_MS_LATENCY:
pd->isoc_latency = ((body->ms_isoc_latency &
~OZ_LATENCY_MASK) * 10) / pd->ms_per_isoc;
break;
default:
pd->isoc_latency = OZ_MAX_TX_QUEUE_ISOC;
}
}
if (body->max_len_div16)
pd->max_tx_size = ((u16)body->max_len_div16)<<4;
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/staging/ozwpan/ozproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
/* Maximun sizes of tx frames. */
#define OZ_MAX_TX_SIZE 1514

/* Maximum number of uncompleted isoc frames that can be pending in network. */
#define OZ_MAX_SUBMITTED_ISOC 16

/* Maximum number of uncompleted isoc frames that can be pending in Tx Queue. */
#define OZ_MAX_TX_QUEUE_ISOC 32

/* Application handler functions.
*/
typedef int (*oz_app_init_fn_t)(void);
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/staging/ozwpan/ozprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ struct oz_hdr {

#define OZ_LAST_PN_HALF_CYCLE 127

#define OZ_LATENCY_MASK 0xc0
#define OZ_ONE_MS_LATENCY 0x40
#define OZ_TEN_MS_LATENCY 0x80

/* Connect request data structure.
*/
struct oz_elt_connect_req {
Expand All @@ -73,7 +77,7 @@ struct oz_elt_connect_req {
u8 pd_info;
u8 session_id;
u8 presleep;
u8 resv2;
u8 ms_isoc_latency;
u8 host_vendor;
u8 keep_alive;
u16 apps;
Expand Down

0 comments on commit b4e3ab6

Please sign in to comment.