Commit 20adc1ae authored by John W. Linville's avatar John W. Linville
parents 392e7419 ad226ec2
...@@ -689,9 +689,9 @@ static int htc_setup_tx_complete(struct htc_target *target) ...@@ -689,9 +689,9 @@ static int htc_setup_tx_complete(struct htc_target *target)
return status; return status;
} }
void htc_set_credit_dist(struct htc_target *target, void ath6kl_htc_set_credit_dist(struct htc_target *target,
struct htc_credit_state_info *cred_dist_cntxt, struct htc_credit_state_info *cred_dist_cntxt,
u16 srvc_pri_order[], int list_len) u16 srvc_pri_order[], int list_len)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
int i, ep; int i, ep;
...@@ -717,7 +717,7 @@ void htc_set_credit_dist(struct htc_target *target, ...@@ -717,7 +717,7 @@ void htc_set_credit_dist(struct htc_target *target,
} }
} }
int htc_tx(struct htc_target *target, struct htc_packet *packet) int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
struct list_head queue; struct list_head queue;
...@@ -745,8 +745,8 @@ int htc_tx(struct htc_target *target, struct htc_packet *packet) ...@@ -745,8 +745,8 @@ int htc_tx(struct htc_target *target, struct htc_packet *packet)
} }
/* flush endpoint TX queue */ /* flush endpoint TX queue */
void htc_flush_txep(struct htc_target *target, void ath6kl_htc_flush_txep(struct htc_target *target,
enum htc_endpoint_id eid, u16 tag) enum htc_endpoint_id eid, u16 tag)
{ {
struct htc_packet *packet, *tmp_pkt; struct htc_packet *packet, *tmp_pkt;
struct list_head discard_q, container; struct list_head discard_q, container;
...@@ -785,7 +785,7 @@ void htc_flush_txep(struct htc_target *target, ...@@ -785,7 +785,7 @@ void htc_flush_txep(struct htc_target *target,
} }
static void htc_flush_txep_all(struct htc_target *target) static void ath6kl_htc_flush_txep_all(struct htc_target *target)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
int i; int i;
...@@ -797,12 +797,12 @@ static void htc_flush_txep_all(struct htc_target *target) ...@@ -797,12 +797,12 @@ static void htc_flush_txep_all(struct htc_target *target)
if (endpoint->svc_id == 0) if (endpoint->svc_id == 0)
/* not in use.. */ /* not in use.. */
continue; continue;
htc_flush_txep(target, i, HTC_TX_PACKET_TAG_ALL); ath6kl_htc_flush_txep(target, i, HTC_TX_PACKET_TAG_ALL);
} }
} }
void htc_indicate_activity_change(struct htc_target *target, void ath6kl_htc_indicate_activity_change(struct htc_target *target,
enum htc_endpoint_id eid, bool active) enum htc_endpoint_id eid, bool active)
{ {
struct htc_endpoint *endpoint = &target->endpoint[eid]; struct htc_endpoint *endpoint = &target->endpoint[eid];
bool dist = false; bool dist = false;
...@@ -869,7 +869,7 @@ static int htc_add_rxbuf(struct htc_target *target, struct htc_packet *packet) ...@@ -869,7 +869,7 @@ static int htc_add_rxbuf(struct htc_target *target, struct htc_packet *packet)
INIT_LIST_HEAD(&queue); INIT_LIST_HEAD(&queue);
list_add_tail(&packet->list, &queue); list_add_tail(&packet->list, &queue);
return htc_add_rxbuf_multiple(target, &queue); return ath6kl_htc_add_rxbuf_multiple(target, &queue);
} }
static void htc_reclaim_rxbuf(struct htc_target *target, static void htc_reclaim_rxbuf(struct htc_target *target,
...@@ -1721,8 +1721,8 @@ static int htc_fetch_rxpkts(struct htc_target *target, ...@@ -1721,8 +1721,8 @@ static int htc_fetch_rxpkts(struct htc_target *target,
return status; return status;
} }
int htc_rxmsg_pending_handler(struct htc_target *target, u32 msg_look_ahead[], int ath6kl_htc_rxmsg_pending_handler(struct htc_target *target,
int *num_pkts) u32 msg_look_ahead[], int *num_pkts)
{ {
struct htc_packet *packets, *tmp_pkt; struct htc_packet *packets, *tmp_pkt;
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
...@@ -1904,8 +1904,8 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target) ...@@ -1904,8 +1904,8 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
return NULL; return NULL;
} }
int htc_add_rxbuf_multiple(struct htc_target *target, int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
struct list_head *pkt_queue) struct list_head *pkt_queue)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
struct htc_packet *first_pkt; struct htc_packet *first_pkt;
...@@ -1966,7 +1966,7 @@ int htc_add_rxbuf_multiple(struct htc_target *target, ...@@ -1966,7 +1966,7 @@ int htc_add_rxbuf_multiple(struct htc_target *target,
return status; return status;
} }
void htc_flush_rx_buf(struct htc_target *target) void ath6kl_htc_flush_rx_buf(struct htc_target *target)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
struct htc_packet *packet, *tmp_pkt; struct htc_packet *packet, *tmp_pkt;
...@@ -1994,9 +1994,9 @@ void htc_flush_rx_buf(struct htc_target *target) ...@@ -1994,9 +1994,9 @@ void htc_flush_rx_buf(struct htc_target *target)
} }
} }
int htc_conn_service(struct htc_target *target, int ath6kl_htc_conn_service(struct htc_target *target,
struct htc_service_connect_req *conn_req, struct htc_service_connect_req *conn_req,
struct htc_service_connect_resp *conn_resp) struct htc_service_connect_resp *conn_resp)
{ {
struct htc_packet *rx_pkt = NULL; struct htc_packet *rx_pkt = NULL;
struct htc_packet *tx_pkt = NULL; struct htc_packet *tx_pkt = NULL;
...@@ -2154,7 +2154,8 @@ static void reset_ep_state(struct htc_target *target) ...@@ -2154,7 +2154,8 @@ static void reset_ep_state(struct htc_target *target)
INIT_LIST_HEAD(&target->cred_dist_list); INIT_LIST_HEAD(&target->cred_dist_list);
} }
int htc_get_rxbuf_num(struct htc_target *target, enum htc_endpoint_id endpoint) int ath6kl_htc_get_rxbuf_num(struct htc_target *target,
enum htc_endpoint_id endpoint)
{ {
int num; int num;
...@@ -2212,7 +2213,7 @@ static void htc_setup_msg_bndl(struct htc_target *target) ...@@ -2212,7 +2213,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
} }
} }
int htc_wait_target(struct htc_target *target) int ath6kl_htc_wait_target(struct htc_target *target)
{ {
struct htc_packet *packet = NULL; struct htc_packet *packet = NULL;
struct htc_ready_ext_msg *rdy_msg; struct htc_ready_ext_msg *rdy_msg;
...@@ -2275,7 +2276,7 @@ int htc_wait_target(struct htc_target *target) ...@@ -2275,7 +2276,7 @@ int htc_wait_target(struct htc_target *target)
connect.svc_id = HTC_CTRL_RSVD_SVC; connect.svc_id = HTC_CTRL_RSVD_SVC;
/* connect fake service */ /* connect fake service */
status = htc_conn_service((void *)target, &connect, &resp); status = ath6kl_htc_conn_service((void *)target, &connect, &resp);
if (status) if (status)
ath6kl_hif_cleanup_scatter(target->dev->ar); ath6kl_hif_cleanup_scatter(target->dev->ar);
...@@ -2293,7 +2294,7 @@ int htc_wait_target(struct htc_target *target) ...@@ -2293,7 +2294,7 @@ int htc_wait_target(struct htc_target *target)
* Start HTC, enable interrupts and let the target know * Start HTC, enable interrupts and let the target know
* host has finished setup. * host has finished setup.
*/ */
int htc_start(struct htc_target *target) int ath6kl_htc_start(struct htc_target *target)
{ {
struct htc_packet *packet; struct htc_packet *packet;
int status; int status;
...@@ -2327,13 +2328,13 @@ int htc_start(struct htc_target *target) ...@@ -2327,13 +2328,13 @@ int htc_start(struct htc_target *target)
status = ath6kldev_unmask_intrs(target->dev); status = ath6kldev_unmask_intrs(target->dev);
if (status) if (status)
htc_stop(target); ath6kl_htc_stop(target);
return status; return status;
} }
/* htc_stop: stop interrupt reception, and flush all queued buffers */ /* htc_stop: stop interrupt reception, and flush all queued buffers */
void htc_stop(struct htc_target *target) void ath6kl_htc_stop(struct htc_target *target)
{ {
spin_lock_bh(&target->htc_lock); spin_lock_bh(&target->htc_lock);
target->htc_flags |= HTC_OP_STATE_STOPPING; target->htc_flags |= HTC_OP_STATE_STOPPING;
...@@ -2346,14 +2347,14 @@ void htc_stop(struct htc_target *target) ...@@ -2346,14 +2347,14 @@ void htc_stop(struct htc_target *target)
*/ */
ath6kldev_mask_intrs(target->dev); ath6kldev_mask_intrs(target->dev);
htc_flush_txep_all(target); ath6kl_htc_flush_txep_all(target);
htc_flush_rx_buf(target); ath6kl_htc_flush_rx_buf(target);
reset_ep_state(target); reset_ep_state(target);
} }
void *htc_create(struct ath6kl *ar) void *ath6kl_htc_create(struct ath6kl *ar)
{ {
struct htc_target *target = NULL; struct htc_target *target = NULL;
struct htc_packet *packet; struct htc_packet *packet;
...@@ -2422,7 +2423,7 @@ void *htc_create(struct ath6kl *ar) ...@@ -2422,7 +2423,7 @@ void *htc_create(struct ath6kl *ar)
fail_create_htc: fail_create_htc:
if (i != NUM_CONTROL_BUFFERS || status) { if (i != NUM_CONTROL_BUFFERS || status) {
if (target) { if (target) {
htc_cleanup(target); ath6kl_htc_cleanup(target);
target = NULL; target = NULL;
} }
} }
...@@ -2431,7 +2432,7 @@ void *htc_create(struct ath6kl *ar) ...@@ -2431,7 +2432,7 @@ void *htc_create(struct ath6kl *ar)
} }
/* cleanup the HTC instance */ /* cleanup the HTC instance */
void htc_cleanup(struct htc_target *target) void ath6kl_htc_cleanup(struct htc_target *target)
{ {
struct htc_packet *packet, *tmp_packet; struct htc_packet *packet, *tmp_packet;
......
...@@ -540,27 +540,30 @@ struct htc_target { ...@@ -540,27 +540,30 @@ struct htc_target {
int chk_irq_status_cnt; int chk_irq_status_cnt;
}; };
void *htc_create(struct ath6kl *ar); void *ath6kl_htc_create(struct ath6kl *ar);
void htc_set_credit_dist(struct htc_target *target, void ath6kl_htc_set_credit_dist(struct htc_target *target,
struct htc_credit_state_info *cred_info, struct htc_credit_state_info *cred_info,
u16 svc_pri_order[], int len); u16 svc_pri_order[], int len);
int htc_wait_target(struct htc_target *target); int ath6kl_htc_wait_target(struct htc_target *target);
int htc_start(struct htc_target *target); int ath6kl_htc_start(struct htc_target *target);
int htc_conn_service(struct htc_target *target, int ath6kl_htc_conn_service(struct htc_target *target,
struct htc_service_connect_req *req, struct htc_service_connect_req *req,
struct htc_service_connect_resp *resp); struct htc_service_connect_resp *resp);
int htc_tx(struct htc_target *target, struct htc_packet *packet); int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet);
void htc_stop(struct htc_target *target); void ath6kl_htc_stop(struct htc_target *target);
void htc_cleanup(struct htc_target *target); void ath6kl_htc_cleanup(struct htc_target *target);
void htc_flush_txep(struct htc_target *target, void ath6kl_htc_flush_txep(struct htc_target *target,
enum htc_endpoint_id endpoint, u16 tag); enum htc_endpoint_id endpoint, u16 tag);
void htc_flush_rx_buf(struct htc_target *target); void ath6kl_htc_flush_rx_buf(struct htc_target *target);
void htc_indicate_activity_change(struct htc_target *target, void ath6kl_htc_indicate_activity_change(struct htc_target *target,
enum htc_endpoint_id endpoint, bool active); enum htc_endpoint_id endpoint,
int htc_get_rxbuf_num(struct htc_target *target, enum htc_endpoint_id endpoint); bool active);
int htc_add_rxbuf_multiple(struct htc_target *target, struct list_head *pktq); int ath6kl_htc_get_rxbuf_num(struct htc_target *target,
int htc_rxmsg_pending_handler(struct htc_target *target, u32 msg_look_ahead[], enum htc_endpoint_id endpoint);
int *n_pkts); int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
struct list_head *pktq);
int ath6kl_htc_rxmsg_pending_handler(struct htc_target *target,
u32 msg_look_ahead[], int *n_pkts);
static inline void set_htc_pkt_info(struct htc_packet *packet, void *context, static inline void set_htc_pkt_info(struct htc_packet *packet, void *context,
u8 *buf, unsigned int len, u8 *buf, unsigned int len,
......
...@@ -416,8 +416,8 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done) ...@@ -416,8 +416,8 @@ static int proc_pending_irqs(struct ath6kl_device *dev, bool *done)
* improve performance by reducing context switching when * improve performance by reducing context switching when
* we rapidly pull packets. * we rapidly pull packets.
*/ */
status = htc_rxmsg_pending_handler(dev->htc_cnxt, status = ath6kl_htc_rxmsg_pending_handler(dev->htc_cnxt,
&lk_ahd, &fetched); &lk_ahd, &fetched);
if (status) if (status)
goto out; goto out;
......
...@@ -160,7 +160,7 @@ static int ath6kl_connectservice(struct ath6kl *ar, ...@@ -160,7 +160,7 @@ static int ath6kl_connectservice(struct ath6kl *ar,
memset(&response, 0, sizeof(response)); memset(&response, 0, sizeof(response));
status = htc_conn_service(ar->htc_target, con_req, &response); status = ath6kl_htc_conn_service(ar->htc_target, con_req, &response);
if (status) { if (status) {
ath6kl_err("failed to connect to %s service status:%d\n", ath6kl_err("failed to connect to %s service status:%d\n",
desc, status); desc, status);
...@@ -1069,7 +1069,7 @@ static int ath6kl_init(struct net_device *dev) ...@@ -1069,7 +1069,7 @@ static int ath6kl_init(struct net_device *dev)
* driver layer has to init BMI in order to set the host block * driver layer has to init BMI in order to set the host block
* size. * size.
*/ */
if (htc_wait_target(ar->htc_target)) { if (ath6kl_htc_wait_target(ar->htc_target)) {
status = -EIO; status = -EIO;
goto err_node_cleanup; goto err_node_cleanup;
} }
...@@ -1098,7 +1098,7 @@ static int ath6kl_init(struct net_device *dev) ...@@ -1098,7 +1098,7 @@ static int ath6kl_init(struct net_device *dev)
ath6kl_cookie_init(ar); ath6kl_cookie_init(ar);
/* start HTC */ /* start HTC */
status = htc_start(ar->htc_target); status = ath6kl_htc_start(ar->htc_target);
if (status) { if (status) {
ath6kl_cookie_cleanup(ar); ath6kl_cookie_cleanup(ar);
...@@ -1138,9 +1138,9 @@ static int ath6kl_init(struct net_device *dev) ...@@ -1138,9 +1138,9 @@ static int ath6kl_init(struct net_device *dev)
goto ath6kl_init_done; goto ath6kl_init_done;
err_htc_stop: err_htc_stop:
htc_stop(ar->htc_target); ath6kl_htc_stop(ar->htc_target);
err_rxbuf_cleanup: err_rxbuf_cleanup:
htc_flush_rx_buf(ar->htc_target); ath6kl_htc_flush_rx_buf(ar->htc_target);
ath6kl_cleanup_amsdu_rxbufs(ar); ath6kl_cleanup_amsdu_rxbufs(ar);
err_cleanup_scatter: err_cleanup_scatter:
ath6kl_hif_cleanup_scatter(ar); ath6kl_hif_cleanup_scatter(ar);
...@@ -1179,7 +1179,7 @@ int ath6kl_core_init(struct ath6kl *ar) ...@@ -1179,7 +1179,7 @@ int ath6kl_core_init(struct ath6kl *ar)
if (ret) if (ret)
goto err_bmi_cleanup; goto err_bmi_cleanup;
ar->htc_target = htc_create(ar); ar->htc_target = ath6kl_htc_create(ar);
if (!ar->htc_target) { if (!ar->htc_target) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -1217,7 +1217,7 @@ int ath6kl_core_init(struct ath6kl *ar) ...@@ -1217,7 +1217,7 @@ int ath6kl_core_init(struct ath6kl *ar)
return ret; return ret;
err_htc_cleanup: err_htc_cleanup:
htc_cleanup(ar->htc_target); ath6kl_htc_cleanup(ar->htc_target);
err_bmi_cleanup: err_bmi_cleanup:
ath6kl_bmi_cleanup(ar); ath6kl_bmi_cleanup(ar);
err_wq: err_wq:
...@@ -1275,7 +1275,7 @@ void ath6kl_destroy(struct net_device *dev, unsigned int unregister) ...@@ -1275,7 +1275,7 @@ void ath6kl_destroy(struct net_device *dev, unsigned int unregister)
destroy_workqueue(ar->ath6kl_wq); destroy_workqueue(ar->ath6kl_wq);
if (ar->htc_target) if (ar->htc_target)
htc_cleanup(ar->htc_target); ath6kl_htc_cleanup(ar->htc_target);
aggr_module_destroy(ar->aggr_cntxt); aggr_module_destroy(ar->aggr_cntxt);
......
...@@ -375,7 +375,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile, ...@@ -375,7 +375,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
if (ar->htc_target) { if (ar->htc_target) {
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: shut down htc\n", __func__); ath6kl_dbg(ATH6KL_DBG_TRC, "%s: shut down htc\n", __func__);
htc_stop(ar->htc_target); ath6kl_htc_stop(ar->htc_target);
} }
/* /*
...@@ -568,7 +568,7 @@ int ath6k_setup_credit_dist(void *htc_handle, ...@@ -568,7 +568,7 @@ int ath6k_setup_credit_dist(void *htc_handle,
servicepriority[4] = WMI_DATA_BK_SVC; /* lowest */ servicepriority[4] = WMI_DATA_BK_SVC; /* lowest */
/* set priority list */ /* set priority list */
htc_set_credit_dist(htc_handle, cred_info, servicepriority, 5); ath6kl_htc_set_credit_dist(htc_handle, cred_info, servicepriority, 5);
return 0; return 0;
} }
......
...@@ -221,7 +221,7 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb, ...@@ -221,7 +221,7 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb,
* This interface is asynchronous, if there is an error, cleanup * This interface is asynchronous, if there is an error, cleanup
* will happen in the TX completion callback. * will happen in the TX completion callback.
*/ */
htc_tx(ar->htc_target, &cookie->htc_pkt); ath6kl_htc_tx(ar->htc_target, &cookie->htc_pkt);
return 0; return 0;
...@@ -331,7 +331,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -331,7 +331,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
* HTC interface is asynchronous, if this fails, cleanup will * HTC interface is asynchronous, if this fails, cleanup will
* happen in the ath6kl_tx_complete callback. * happen in the ath6kl_tx_complete callback.
*/ */
htc_tx(ar->htc_target, &cookie->htc_pkt); ath6kl_htc_tx(ar->htc_target, &cookie->htc_pkt);
return 0; return 0;
...@@ -403,7 +403,7 @@ void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active) ...@@ -403,7 +403,7 @@ void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active)
notify_htc: notify_htc:
/* notify HTC, this may cause credit distribution changes */ /* notify HTC, this may cause credit distribution changes */
htc_indicate_activity_change(ar->htc_target, eid, active); ath6kl_htc_indicate_activity_change(ar->htc_target, eid, active);
} }
enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target, enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,
...@@ -611,8 +611,8 @@ void ath6kl_tx_data_cleanup(struct ath6kl *ar) ...@@ -611,8 +611,8 @@ void ath6kl_tx_data_cleanup(struct ath6kl *ar)
/* flush all the data (non-control) streams */ /* flush all the data (non-control) streams */
for (i = 0; i < WMM_NUM_AC; i++) for (i = 0; i < WMM_NUM_AC; i++)
htc_flush_txep(ar->htc_target, ar->ac2ep_map[i], ath6kl_htc_flush_txep(ar->htc_target, ar->ac2ep_map[i],
ATH6KL_DATA_PKT_TAG); ATH6KL_DATA_PKT_TAG);
} }
/* Rx functions */ /* Rx functions */
...@@ -672,7 +672,7 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint) ...@@ -672,7 +672,7 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint)
struct list_head queue; struct list_head queue;
n_buf_refill = ATH6KL_MAX_RX_BUFFERS - n_buf_refill = ATH6KL_MAX_RX_BUFFERS -
htc_get_rxbuf_num(ar->htc_target, endpoint); ath6kl_htc_get_rxbuf_num(ar->htc_target, endpoint);
if (n_buf_refill <= 0) if (n_buf_refill <= 0)
return; return;
...@@ -695,7 +695,7 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint) ...@@ -695,7 +695,7 @@ void ath6kl_rx_refill(struct htc_target *target, enum htc_endpoint_id endpoint)
} }
if (!list_empty(&queue)) if (!list_empty(&queue))
htc_add_rxbuf_multiple(ar->htc_target, &queue); ath6kl_htc_add_rxbuf_multiple(ar->htc_target, &queue);
} }
void ath6kl_refill_amsdu_rxbufs(struct ath6kl *ar, int count) void ath6kl_refill_amsdu_rxbufs(struct ath6kl *ar, int count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment