diff options
author | Ajit Vaishya <ajitv@codeaurora.org> | 2017-10-05 22:08:50 +0530 |
---|---|---|
committer | Nandini Suresh <snandini@codeaurora.org> | 2017-10-12 14:22:07 -0700 |
commit | 8dc86d6e54e5bfbf17eb963d0485af1711f20d30 (patch) | |
tree | b13bf684803de1b0eb45057a721d22c76ef9c884 /utils | |
parent | 78acc11a990ded507108d5543ac24ba68df31257 (diff) | |
download | qca-wfi-host-cmn-8dc86d6e54e5bfbf17eb963d0485af1711f20d30.tar.gz |
qcacmn: Fix kernel check patch warnings in PTT
Fix msm-4.4 kernel check patch warnings for PTT module.
Change-Id: I3bb7170c971f66178efe5cda837337a2e362f822
CRs-Fixed: 2041367
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ptt/inc/wlan_ptt_sock_svc.h | 18 | ||||
-rw-r--r-- | utils/ptt/src/wlan_ptt_sock_svc.c | 14 |
2 files changed, 18 insertions, 14 deletions
diff --git a/utils/ptt/inc/wlan_ptt_sock_svc.h b/utils/ptt/inc/wlan_ptt_sock_svc.h index ff0f24b58..2684c7977 100644 --- a/utils/ptt/inc/wlan_ptt_sock_svc.h +++ b/utils/ptt/inc/wlan_ptt_sock_svc.h @@ -115,10 +115,10 @@ static inline int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, * WLAN Driver, in either direction. Each msg will begin with this header and * will followed by the Quarky message */ -typedef struct sAniAppRegReq { +struct sAniAppRegReq { tAniNlModTypes type; /* module id */ int pid; /* process id */ -} tAniNlAppRegReq; +}; /** * struct sptt_app_reg_req - PTT register request structure @@ -127,14 +127,14 @@ typedef struct sAniAppRegReq { * * payload structure received as nl data from PTT app/user space */ -typedef struct sptt_app_reg_req { +struct sptt_app_reg_req { int radio; tAniHdr wmsg; -} ptt_app_reg_req; +}; -typedef struct sAniNlAppRegRsp { - tAniHdr wniHdr; /* Generic WNI msg header */ - tAniNlAppRegReq regReq; /* The original request msg */ - int ret; /* Return code */ -} tAniNlAppRegRsp; +struct sAniNlAppRegRsp { + tAniHdr wniHdr; /* Generic WNI msg header */ + struct sAniAppRegReq regReq; /* The original request msg */ + int ret; /* Return code */ +}; #endif diff --git a/utils/ptt/src/wlan_ptt_sock_svc.c b/utils/ptt/src/wlan_ptt_sock_svc.c index e5b232533..b693bb33d 100644 --- a/utils/ptt/src/wlan_ptt_sock_svc.c +++ b/utils/ptt/src/wlan_ptt_sock_svc.c @@ -60,6 +60,7 @@ static int32_t ptt_pid = INVALID_PID; static void ptt_sock_dump_buf(const unsigned char *pbuf, int cnt) { int i; + for (i = 0; i < cnt; i++) { if ((i % 16) == 0) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, @@ -184,9 +185,10 @@ int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, int src_mod, int pid) */ static void ptt_sock_proc_reg_req(tAniHdr *wmsg, int radio) { - tAniNlAppRegReq *reg_req; - tAniNlAppRegRsp rspmsg; - reg_req = (tAniNlAppRegReq *) (wmsg + 1); + struct sAniAppRegReq *reg_req; + struct sAniNlAppRegRsp rspmsg; + + reg_req = (struct sAniAppRegReq *) (wmsg + 1); memset((char *)&rspmsg, 0, sizeof(rspmsg)); /* send reg response message to the application */ rspmsg.ret = ANI_NL_MSG_OK; @@ -210,6 +212,7 @@ static void ptt_sock_proc_reg_req(tAniHdr *wmsg, int radio) static void ptt_proc_pumac_msg(struct sk_buff *skb, tAniHdr *wmsg, int radio) { u16 ani_msg_type = be16_to_cpu(wmsg->type); + switch (ani_msg_type) { case ANI_MSG_APP_REG_REQ: PTT_TRACE(QDF_TRACE_LEVEL_INFO, @@ -233,6 +236,7 @@ static int ptt_sock_rx_nlink_msg(struct sk_buff *skb) tAniNlHdr *wnl; int radio; int type; + wnl = (tAniNlHdr *) skb->data; radio = wnl->radio; type = wnl->nlh.nlmsg_type; @@ -266,7 +270,7 @@ static int ptt_sock_rx_nlink_msg(struct sk_buff *skb) */ static void ptt_cmd_handler(const void *data, int data_len, void *ctx, int pid) { - ptt_app_reg_req *payload; + struct sptt_app_reg_req *payload; struct nlattr *tb[CLD80211_ATTR_MAX + 1]; /* @@ -290,7 +294,7 @@ static void ptt_cmd_handler(const void *data, int data_len, void *ctx, int pid) return; } - payload = (ptt_app_reg_req *)(nla_data(tb[CLD80211_ATTR_DATA])); + payload = (struct sptt_app_reg_req *)(nla_data(tb[CLD80211_ATTR_DATA])); switch (payload->wmsg.type) { case ANI_MSG_APP_REG_REQ: ptt_sock_send_msg_to_app(&payload->wmsg, payload->radio, |