qcacmn: Rename OSIF logging macros

The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.

Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
This commit is contained in:
Jeff Johnson
2019-06-11 13:42:26 -07:00
committed by nshrivas
parent d897403241
commit 23e26381c0
8 changed files with 233 additions and 241 deletions

View File

@@ -50,13 +50,13 @@ static void os_if_wifi_pos_send_rsp(uint32_t pid, uint32_t rsp_msg_type,
/* OEM msg is always to a specific process and cannot be a broadcast */
if (pid == 0) {
cfg80211_err("invalid dest pid");
osif_err("invalid dest pid");
return;
}
skb = alloc_skb(NLMSG_SPACE(sizeof(tAniMsgHdr) + buf_len), GFP_ATOMIC);
if (!skb) {
cfg80211_alert("alloc_skb failed");
osif_alert("alloc_skb failed");
return;
}
@@ -73,8 +73,8 @@ static void os_if_wifi_pos_send_rsp(uint32_t pid, uint32_t rsp_msg_type,
aniHdr->length = buf_len;
skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr) + buf_len));
cfg80211_debug("sending oem rsp: type: %d len(%d) to pid (%d)",
rsp_msg_type, buf_len, pid);
osif_debug("sending oem rsp: type: %d len(%d) to pid (%d)",
rsp_msg_type, buf_len, pid);
nl_srv_ucast_oem(skb, pid, MSG_DONTWAIT);
}
@@ -86,18 +86,18 @@ static int wifi_pos_parse_req(const void *data, int len, int pid,
struct nlattr *tb[CLD80211_ATTR_MAX + 1];
if (wlan_cfg80211_nla_parse(tb, CLD80211_ATTR_MAX, data, len, NULL)) {
cfg80211_err("invalid data in request");
osif_err("invalid data in request");
return OEM_ERR_INVALID_MESSAGE_TYPE;
}
if (!tb[CLD80211_ATTR_DATA]) {
cfg80211_err("CLD80211_ATTR_DATA not present");
osif_err("CLD80211_ATTR_DATA not present");
return OEM_ERR_INVALID_MESSAGE_TYPE;
}
msg_hdr = (tAniMsgHdr *)nla_data(tb[CLD80211_ATTR_DATA]);
if (!msg_hdr) {
cfg80211_err("msg_hdr null");
osif_err("msg_hdr null");
return OEM_ERR_NULL_MESSAGE_HEADER;
}
@@ -124,19 +124,19 @@ static int wifi_pos_parse_req(struct sk_buff *skb, struct wifi_pos_req_msg *req)
nlh = (struct nlmsghdr *)skb->data;
if (!nlh) {
cfg80211_err("Netlink header null");
osif_err("Netlink header null");
return OEM_ERR_NULL_MESSAGE_HEADER;
}
msg_hdr = NLMSG_DATA(nlh);
if (!msg_hdr) {
cfg80211_err("Message header null");
osif_err("Message header null");
return OEM_ERR_NULL_MESSAGE_HEADER;
}
if (nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*msg_hdr) + msg_hdr->length)) {
cfg80211_err("nlmsg_len(%d) and animsg_len(%d) mis-match",
nlh->nlmsg_len, msg_hdr->length);
osif_err("nlmsg_len(%d) and animsg_len(%d) mis-match",
nlh->nlmsg_len, msg_hdr->length);
return OEM_ERR_INVALID_MESSAGE_LENGTH;
}
@@ -165,9 +165,9 @@ static void __os_if_wifi_pos_callback(const void *data, int data_len,
struct wifi_pos_req_msg req = {0};
struct wlan_objmgr_psoc *psoc = wifi_pos_get_psoc();
cfg80211_debug("enter: pid %d", pid);
osif_debug("enter: pid %d", pid);
if (!psoc) {
cfg80211_err("global psoc object not registered yet.");
osif_err("global psoc object not registered yet.");
return;
}
@@ -182,8 +182,8 @@ static void __os_if_wifi_pos_callback(const void *data, int data_len,
status = ucfg_wifi_pos_process_req(psoc, &req, os_if_wifi_pos_send_rsp);
if (QDF_IS_STATUS_ERROR(status))
cfg80211_err("ucfg_wifi_pos_process_req failed. status: %d",
status);
osif_err("ucfg_wifi_pos_process_req failed. status: %d",
status);
release_psoc_ref:
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_OSIF_ID);
@@ -208,9 +208,9 @@ static int __os_if_wifi_pos_callback(struct sk_buff *skb)
struct wifi_pos_req_msg req = {0};
struct wlan_objmgr_psoc *psoc = wifi_pos_get_psoc();
cfg80211_debug("enter");
osif_debug("enter");
if (!psoc) {
cfg80211_err("global psoc object not registered yet.");
osif_err("global psoc object not registered yet.");
return -EINVAL;
}
@@ -225,8 +225,8 @@ static int __os_if_wifi_pos_callback(struct sk_buff *skb)
status = ucfg_wifi_pos_process_req(psoc, &req, os_if_wifi_pos_send_rsp);
if (QDF_IS_STATUS_ERROR(status))
cfg80211_err("ucfg_wifi_pos_process_req failed. status: %d",
status);
osif_err("ucfg_wifi_pos_process_req failed. status: %d",
status);
release_psoc_ref:
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_OSIF_ID);
@@ -255,7 +255,7 @@ int os_if_wifi_pos_register_nl(void)
int ret = register_cld_cmd_cb(WLAN_NL_MSG_OEM,
os_if_wifi_pos_callback, NULL);
if (ret)
cfg80211_err("register_cld_cmd_cb failed");
osif_err("register_cld_cmd_cb failed");
return ret;
}
@@ -271,7 +271,7 @@ int os_if_wifi_pos_deregister_nl(void)
{
int ret = deregister_cld_cmd_cb(WLAN_NL_MSG_OEM);
if (ret)
cfg80211_err("deregister_cld_cmd_cb failed");
osif_err("deregister_cld_cmd_cb failed");
return ret;
}
@@ -293,13 +293,13 @@ void os_if_wifi_pos_send_peer_status(struct qdf_mac_addr *peer_mac,
struct wmi_pos_peer_status_info *peer_info;
if (!psoc) {
cfg80211_err("global wifi_pos psoc object not registered");
osif_err("global wifi_pos psoc object not registered");
return;
}
if (!wifi_pos_is_app_registered(psoc) ||
wifi_pos_get_app_pid(psoc) == 0) {
cfg80211_debug("app is not registered or pid is invalid");
osif_debug("app is not registered or pid is invalid");
return;
}
@@ -340,7 +340,7 @@ int os_if_wifi_pos_populate_caps(struct wlan_objmgr_psoc *psoc,
struct wifi_pos_driver_caps *caps)
{
if (!psoc || !caps) {
cfg80211_err("psoc or caps buffer is null");
osif_err("psoc or caps buffer is null");
return -EINVAL;
}