Переглянути джерело

Merge "qcacmn: Remove code related to mmap functionality for pktlog"

Linux Build Service Account 7 роки тому
батько
коміт
1072d6c74a
3 змінених файлів з 8 додано та 107 видалено
  1. 2 3
      hif/src/snoc/if_snoc.c
  2. 0 102
      utils/pktlog/linux_ac.c
  3. 6 2
      wmi/src/wmi_unified_non_tlv.c

+ 2 - 3
hif/src/snoc/if_snoc.c

@@ -40,7 +40,6 @@
 #include "ce_api.h"
 #include "ce_internal.h"
 #include "snoc_api.h"
-#include <soc/qcom/icnss.h>
 #include "pld_common.h"
 #include "qdf_util.h"
 #ifdef IPA_OFFLOAD
@@ -191,7 +190,7 @@ int hif_snoc_bus_configure(struct hif_softc *scn)
 	if (ret)
 		goto unconfig_ce;
 
-	scn->wake_irq = icnss_get_irq(wake_ce_id);
+	scn->wake_irq = pld_get_irq(scn->qdf_dev->dev, wake_ce_id);
 
 	HIF_INFO(FL("expecting wake from ce %d, irq %d"),
 		 wake_ce_id, scn->wake_irq);
@@ -462,7 +461,7 @@ int hif_snoc_bus_suspend_noirq(struct hif_softc *scn)
 
 int hif_snoc_map_ce_to_irq(struct hif_softc *scn, int ce_id)
 {
-	return icnss_get_irq(ce_id);
+	return pld_get_irq(scn->qdf_dev->dev, ce_id);
 }
 
 /**

+ 0 - 102
utils/pktlog/linux_ac.c

@@ -82,14 +82,12 @@ static int pktlog_attach(struct hif_opaque_softc *sc);
 static void pktlog_detach(struct ol_txrx_pdev_t *handle);
 static int pktlog_open(struct inode *i, struct file *f);
 static int pktlog_release(struct inode *i, struct file *f);
-static int pktlog_mmap(struct file *f, struct vm_area_struct *vma);
 static ssize_t pktlog_read(struct file *file, char *buf, size_t nbytes,
 			   loff_t *ppos);
 
 static struct file_operations pktlog_fops = {
 	open:  pktlog_open,
 	release:pktlog_release,
-	mmap : pktlog_mmap,
 	read : pktlog_read,
 };
 
@@ -1016,106 +1014,6 @@ pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
 	return ret;
 }
 
-#ifndef VMALLOC_VMADDR
-#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#endif
-
-/* vma operations for mapping vmalloced area to user space */
-static void pktlog_vopen(struct vm_area_struct *vma)
-{
-	PKTLOG_MOD_INC_USE_COUNT;
-}
-
-static void pktlog_vclose(struct vm_area_struct *vma)
-{
-	PKTLOG_MOD_DEC_USE_COUNT;
-}
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
-static inline unsigned long pktlog_get_fault_address(struct vm_fault *vmf)
-{
-	return (unsigned long)vmf->virtual_address;
-}
-#else
-static inline unsigned long pktlog_get_fault_address(struct vm_fault *vmf)
-{
-	return vmf->address;
-}
-#endif /* KERNEL_VERSION(4, 10, 0) */
-
-static int
-pktlog_fault_handler(struct vm_area_struct *vma, struct vm_fault *vmf)
-{
-	unsigned long address = pktlog_get_fault_address(vmf);
-
-	if (address == 0UL)
-		return VM_FAULT_NOPAGE;
-
-	if (vmf->pgoff > vma->vm_end)
-		return VM_FAULT_SIGBUS;
-
-	get_page(virt_to_page((void *)address));
-	vmf->page = virt_to_page((void *)address);
-	return 0;
-}
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
-static int pktlog_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-{
-	return pktlog_fault_handler(vma, vmf);
-}
-#else
-static int pktlog_fault(struct vm_fault *vmf)
-{
-	return pktlog_fault_handler(vmf->vma, vmf);
-}
-#endif
-
-static struct vm_operations_struct pktlog_vmops = {
-	open: pktlog_vopen,
-	close:pktlog_vclose,
-	fault:pktlog_fault,
-};
-
-static int __pktlog_mmap(struct file *file, struct vm_area_struct *vma)
-{
-	struct ath_pktlog_info *pl_info;
-
-	pl_info = (struct ath_pktlog_info *)
-					PDE_DATA(file->f_path.dentry->d_inode);
-
-	if (vma->vm_pgoff != 0) {
-		/* Entire buffer should be mapped */
-		return -EINVAL;
-	}
-
-	if (!pl_info->buf) {
-		printk(PKTLOG_TAG "%s: Log buffer unavailable\n", __func__);
-		return -ENOMEM;
-	}
-
-	if (cds_is_module_state_transitioning()) {
-		pr_info("%s: module transition in progress", __func__);
-		return -EAGAIN;
-	}
-
-	vma->vm_flags |= VM_LOCKED;
-	vma->vm_ops = &pktlog_vmops;
-	pktlog_vopen(vma);
-	return 0;
-}
-
-static int pktlog_mmap(struct file *file, struct vm_area_struct *vma)
-{
-	int ret;
-
-	cds_ssr_protect(__func__);
-	ret = __pktlog_mmap(file, vma);
-	cds_ssr_unprotect(__func__);
-
-	return ret;
-}
-
 int pktlogmod_init(void *context)
 {
 	int ret;

+ 6 - 2
wmi/src/wmi_unified_non_tlv.c

@@ -512,9 +512,12 @@ static QDF_STATUS convert_host_peer_id_to_target_id_non_tlv(
 	case WMI_HOST_PEER_EXT_STATS_ENABLE:
 		*targ_paramid = WMI_PEER_EXT_STATS_ENABLE;
 		break;
-	/* Populate appropriate targetid once feature is supported in FW */
 	case WMI_HOST_PEER_NSS_VHT160:
+		*targ_paramid = WMI_PEER_NSS_VHT160;
+		break;
 	case WMI_HOST_PEER_NSS_VHT80_80:
+		*targ_paramid = WMI_PEER_NSS_VHT80_80;
+		break;
 	default:
 		return QDF_STATUS_E_NOSUPPORT;
 	}
@@ -8426,6 +8429,8 @@ static void populate_non_tlv_service(uint32_t *wmi_service)
 				WMI_SERVICE_BTCOEX_DUTY_CYCLE;
 	wmi_service[wmi_service_4_wire_coex_support] =
 				WMI_SERVICE_4_WIRE_COEX_SUPPORT;
+	wmi_service[wmi_service_extended_nss_support] =
+				WMI_SERVICE_EXTENDED_NSS_SUPPORT;
 
 	wmi_service[wmi_service_roam_scan_offload] = WMI_SERVICE_UNAVAILABLE;
 	wmi_service[wmi_service_arpns_offload] = WMI_SERVICE_UNAVAILABLE;
@@ -8529,7 +8534,6 @@ static void populate_non_tlv_service(uint32_t *wmi_service)
 	wmi_service[wmi_service_pkt_routing] = WMI_SERVICE_UNAVAILABLE;
 	wmi_service[wmi_service_offchan_tx_wmi] = WMI_SERVICE_UNAVAILABLE;
 	wmi_service[wmi_service_chan_load_info] = WMI_SERVICE_UNAVAILABLE;
-	wmi_service[wmi_service_extended_nss_support] = WMI_SERVICE_UNAVAILABLE;
 	wmi_service[wmi_service_ack_timeout] = WMI_SERVICE_UNAVAILABLE;
 }