Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195246
b: refs/heads/master
c: 8116daf
h: refs/heads/master
v: v3
  • Loading branch information
Sujith.Manoharan@atheros.com authored and John W. Linville committed May 12, 2010
1 parent 3d57127 commit c21558a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 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: d8c49ffb2e2a47b23fec7f469435e7b112e2e569
refs/heads/master: 8116daf2146d8fbc5d8d925984b3d4fd34dba1b4
10 changes: 5 additions & 5 deletions trunk/drivers/net/wireless/ath/ath9k/htc_hst.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static struct htc_endpoint *get_next_avail_ep(struct htc_endpoint *endpoint)
{
enum htc_endpoint_id avail_epid;

for (avail_epid = ENDPOINT_MAX; avail_epid > ENDPOINT0; avail_epid--)
for (avail_epid = (ENDPOINT_MAX - 1); avail_epid > ENDPOINT0; avail_epid--)
if (endpoint[avail_epid].service_id == 0)
return &endpoint[avail_epid];
return NULL;
Expand Down Expand Up @@ -117,15 +117,15 @@ static void htc_process_conn_rsp(struct htc_target *target,
max_msglen = be16_to_cpu(svc_rspmsg->max_msg_len);
endpoint = &target->endpoint[epid];

for (tepid = ENDPOINT_MAX; tepid > ENDPOINT0; tepid--) {
for (tepid = (ENDPOINT_MAX - 1); tepid > ENDPOINT0; tepid--) {
tmp_endpoint = &target->endpoint[tepid];
if (tmp_endpoint->service_id == service_id) {
tmp_endpoint->service_id = 0;
break;
}
}

if (!tmp_endpoint)
if (tepid == ENDPOINT0)
return;

endpoint->service_id = service_id;
Expand Down Expand Up @@ -298,7 +298,7 @@ void htc_stop(struct htc_target *target)
enum htc_endpoint_id epid;
struct htc_endpoint *endpoint;

for (epid = ENDPOINT0; epid <= ENDPOINT_MAX; epid++) {
for (epid = ENDPOINT0; epid < ENDPOINT_MAX; epid++) {
endpoint = &target->endpoint[epid];
if (endpoint->service_id != 0)
target->hif->stop(target->hif_dev, endpoint->ul_pipeid);
Expand All @@ -310,7 +310,7 @@ void htc_start(struct htc_target *target)
enum htc_endpoint_id epid;
struct htc_endpoint *endpoint;

for (epid = ENDPOINT0; epid <= ENDPOINT_MAX; epid++) {
for (epid = ENDPOINT0; epid < ENDPOINT_MAX; epid++) {
endpoint = &target->endpoint[epid];
if (endpoint->service_id != 0)
target->hif->start(target->hif_dev,
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/net/wireless/ath/ath9k/htc_hst.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ struct htc_endpoint {
#define HTC_CONTROL_BUFFER_SIZE \
(HTC_MAX_CONTROL_MESSAGE_LENGTH + sizeof(struct htc_frame_hdr))

#define NUM_CONTROL_BUFFERS 8
#define HST_ENDPOINT_MAX 8

struct htc_control_buf {
struct htc_packet htc_pkt;
u8 buf[HTC_CONTROL_BUFFER_SIZE];
Expand All @@ -139,7 +136,7 @@ struct htc_target {
struct ath9k_htc_priv *drv_priv;
struct device *dev;
struct ath9k_htc_hif *hif;
struct htc_endpoint endpoint[HST_ENDPOINT_MAX];
struct htc_endpoint endpoint[ENDPOINT_MAX];
struct completion target_wait;
struct completion cmd_wait;
struct list_head list;
Expand Down

0 comments on commit c21558a

Please sign in to comment.