aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
Commit message (Expand)AuthorAge
* Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber...John W. Linville2013-08-28
|\
| * mac80211: fix change_interface queue assignmentsJohannes Berg2013-08-26
| * cfg80211: add flags to cfg80211_rx_mgmt()Vladimir Kondratiev2013-08-23
| * mac80211: assign seqnums for group QoS framesBob Copeland2013-08-23
| * mac80211: only respond to probe request with mesh IDChun-Yeow Yeoh2013-08-23
| * mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into driversJohannes Berg2013-08-23
| * mac80211: minstrel_ht: don't use control.flags in TX status pathJohannes Berg2013-08-22
* | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber...John W. Linville2013-08-28
|\ \
| * | mac80211: ignore (E)CSA in probe response framesJohannes Berg2013-08-23
* | | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...John W. Linville2013-08-28
|\| |
| * | mac80211: ibss: fix ignored channel parameterSimon Wunderlich2013-08-21
| * | mac80211: add a flag to indicate CCK support for HT clientsFelix Fietkau2013-08-21
| * | mac80211: add missing channel context releaseJohannes Berg2013-08-21
* | | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber...John W. Linville2013-08-16
|\ \ \ | | |/ | |/|
| * | mac80211: add APIs to allow keeping connections after WoWLANJohannes Berg2013-08-16
| * | mac80211: move ibss presp generation in own functionSimon Wunderlich2013-08-16
| * | mac80211: perform power save processing before decryptionJohan Almbladh2013-08-16
| * | mac80211: ibss - do not scan if not needed when creating an IBSSAntonio Quartulli2013-08-12
| * | mac80211: add vif to testmode cmdDavid Spinadel2013-08-12
| * | cfg80211: add wdev to testmode cmdDavid Spinadel2013-08-12
| * | mac80211: add control port protocol TX control flagJohannes Berg2013-08-12
| * | mac80211: fix ieee80211_sta_process_chanswitch for 5/10 MHz channelsSimon Wunderlich2013-08-09
| * | mac80211: allow lowest basic rate for unicast management for meshChun-Yeow Yeoh2013-08-09
| * | wireless: make TU conversion macros availableJohannes Berg2013-08-06
* | | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber...John W. Linville2013-08-09
|\| |
| * | mac80211: add channel switch command and beacon callbacksSimon Wunderlich2013-08-01
| * | mac80211: add debugfs for driver-buffered TID bitmapJohannes Berg2013-08-01
| * | mac80211: report some VHT radiotap infos for tx statusKarl Beldan2013-08-01
| * | mac80211: ibss - remove not authorized station earlierAntonio Quartulli2013-08-01
| * | mac80211: use oneshot blink API for LED triggersFabio Baltieri2013-08-01
* | | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...John W. Linville2013-08-09
|\ \ \ | | |/ | |/|
| * | mac80211: continue using disabled channels while connectedJohannes Berg2013-07-31
| * | mac80211: ignore HT primary channel while connectedJohannes Berg2013-07-31
| * | mac80211: don't wait for TX status foreverJohannes Berg2013-07-31
| * | mac80211: fix infinite loop in ieee80211_determine_chantypeChris Wright2013-07-31
| * | mac80211: fix monitor interface suspend crash regressionStanislaw Gruszka2013-07-23
| * | mac80211: prevent the buffering or frame transmission to non-assoc mesh STAChun-Yeow Yeoh2013-07-22
* | | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber...John W. Linville2013-08-01
|\ \ \ | |/ / |/| / | |/
| * mac80211: make active monitor injection work w/ HW queueJohannes Berg2013-07-16
| * mac80211: set forwarding in mesh capability infoChun-Yeow Yeoh2013-07-16
| * mac80211: fix off-by-one regression in ibss beacon generationSimon Wunderlich2013-07-16
| * mac80211: fix regression when initializing ibss wmm paramsSimon Wunderlich2013-07-16
| * mac80211: return if IBSS chandef can not be usedSimon Wunderlich2013-07-16
| * mac80211: allow scanning for 5/10 MHz channels in IBSSSimon Wunderlich2013-07-16
| * cfg80211/mac80211: use reduced txpower for 5 and 10 MHzSimon Wunderlich2013-07-16
| * cfg80211/mac80211: get mandatory rates based on scan widthSimon Wunderlich2013-07-16
| * mac80211: select and adjust bitrates according to channel modeSimon Wunderlich2013-07-16
| * mac80211: add radiotap flag and handling for 5/10 MHzSimon Wunderlich2013-07-16
| * mac80211: fix timing for 5 MHz and 10 MHz channelsSimon Wunderlich2013-07-16
| * mac80211/rc80211: add chandef to rate initializationSimon Wunderlich2013-07-16
ss="hl opt">; dest->skip_wmb = src->skip_wmb; dest->size = size; /* * Re-use the CPU mapping only if the mapping was made by the DMA API. * * Bug 2040115: the DMA API wrapper makes the mapping that we should * re-use. */ if (!(src->priv.flags & NVGPU_DMA_NO_KERNEL_MAPPING) || nvgpu_is_enabled(g, NVGPU_USE_COHERENT_SYSMEM)) dest->cpu_va = src->cpu_va + (PAGE_SIZE * start_page); dest->priv.pages = src->priv.pages + start_page; dest->priv.flags = src->priv.flags; new_iova = sg_dma_address(src->priv.sgt->sgl) ? sg_dma_address(src->priv.sgt->sgl) + start : 0; /* * Make a new SG table that is based only on the subset of pages that * is passed to us. This table gets freed by the dma free routines. */ if (src->priv.flags & NVGPU_DMA_NO_KERNEL_MAPPING) ret = nvgpu_get_sgtable_from_pages(g, &dest->priv.sgt, src->priv.pages + start_page, new_iova, size); else ret = nvgpu_get_sgtable(g, &dest->priv.sgt, dest->cpu_va, new_iova, size); return ret; } int __nvgpu_mem_create_from_pages(struct gk20a *g, struct nvgpu_mem *dest, struct page **pages, int nr_pages) { struct sg_table *sgt; struct page **our_pages = nvgpu_kmalloc(g, sizeof(struct page *) * nr_pages); if (!our_pages) return -ENOMEM; memcpy(our_pages, pages, sizeof(struct page *) * nr_pages); if (nvgpu_get_sgtable_from_pages(g, &sgt, pages, 0, nr_pages * PAGE_SIZE)) { nvgpu_kfree(g, our_pages); return -ENOMEM; } /* * If we are making an SGT from physical pages we can be reasonably * certain that this should bypass the SMMU - thus we set the DMA (aka * IOVA) address to 0. This tells the GMMU mapping code to not make a * mapping directed to the SMMU. */ sg_dma_address(sgt->sgl) = 0; dest->mem_flags = __NVGPU_MEM_FLAG_NO_DMA; dest->aperture = APERTURE_SYSMEM; dest->skip_wmb = 0; dest->size = PAGE_SIZE * nr_pages; dest->priv.flags = 0; dest->priv.pages = our_pages; dest->priv.sgt = sgt; return 0; } #ifdef CONFIG_TEGRA_GK20A_NVHOST int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest, u64 src_phys, int nr_pages) { struct page **pages = nvgpu_kmalloc(g, sizeof(struct page *) * nr_pages); int i, ret = 0; if (!pages) return -ENOMEM; for (i = 0; i < nr_pages; i++) pages[i] = phys_to_page(src_phys + PAGE_SIZE * i); ret = __nvgpu_mem_create_from_pages(g, dest, pages, nr_pages); nvgpu_kfree(g, pages); return ret; } #endif static struct nvgpu_sgl *nvgpu_mem_linux_sgl_next(struct nvgpu_sgl *sgl) { return (struct nvgpu_sgl *)sg_next((struct scatterlist *)sgl); } static u64 nvgpu_mem_linux_sgl_phys(struct gk20a *g, struct nvgpu_sgl *sgl) { return (u64)__nvgpu_sgl_phys(g, sgl); } static u64 nvgpu_mem_linux_sgl_dma(struct nvgpu_sgl *sgl) { return (u64)sg_dma_address((struct scatterlist *)sgl); } static u64 nvgpu_mem_linux_sgl_length(struct nvgpu_sgl *sgl) { return (u64)((struct scatterlist *)sgl)->length; } static u64 nvgpu_mem_linux_sgl_gpu_addr(struct gk20a *g, struct nvgpu_sgl *sgl, struct nvgpu_gmmu_attrs *attrs) { if (sg_dma_address((struct scatterlist *)sgl) == 0) return g->ops.mm.gpu_phys_addr(g, attrs, __nvgpu_sgl_phys(g, sgl)); if (sg_dma_address((struct scatterlist *)sgl) == DMA_ERROR_CODE) return 0; return nvgpu_mem_iommu_translate(g, sg_dma_address((struct scatterlist *)sgl)); } static bool nvgpu_mem_linux_sgt_iommuable(struct gk20a *g, struct nvgpu_sgt *sgt) { if (nvgpu_is_enabled(g, NVGPU_MM_USE_PHYSICAL_SG)) return false; return true; } static void nvgpu_mem_linux_sgl_free(struct gk20a *g, struct nvgpu_sgt *sgt) { /* * Free this SGT. All we do is free the passed SGT. The actual Linux * SGT/SGL needs to be freed separately. */ nvgpu_kfree(g, sgt); } static const struct nvgpu_sgt_ops nvgpu_linux_sgt_ops = { .sgl_next = nvgpu_mem_linux_sgl_next, .sgl_phys = nvgpu_mem_linux_sgl_phys, .sgl_dma = nvgpu_mem_linux_sgl_dma, .sgl_length = nvgpu_mem_linux_sgl_length, .sgl_gpu_addr = nvgpu_mem_linux_sgl_gpu_addr, .sgt_iommuable = nvgpu_mem_linux_sgt_iommuable, .sgt_free = nvgpu_mem_linux_sgl_free, }; static struct nvgpu_sgt *__nvgpu_mem_get_sgl_from_vidmem( struct gk20a *g, struct scatterlist *linux_sgl) { struct nvgpu_page_alloc *vidmem_alloc; vidmem_alloc = nvgpu_vidmem_get_page_alloc(linux_sgl); if (!vidmem_alloc) return NULL; return &vidmem_alloc->sgt; } struct nvgpu_sgt *nvgpu_linux_sgt_create(struct gk20a *g, struct sg_table *sgt) { struct nvgpu_sgt *nvgpu_sgt; struct scatterlist *linux_sgl = sgt->sgl; if (nvgpu_addr_is_vidmem_page_alloc(sg_dma_address(linux_sgl))) return __nvgpu_mem_get_sgl_from_vidmem(g, linux_sgl); nvgpu_sgt = nvgpu_kzalloc(g, sizeof(*nvgpu_sgt)); if (!nvgpu_sgt) return NULL; nvgpu_log(g, gpu_dbg_sgl, "Making Linux SGL!"); nvgpu_sgt->sgl = (struct nvgpu_sgl *)linux_sgl; nvgpu_sgt->ops = &nvgpu_linux_sgt_ops; return nvgpu_sgt; } struct nvgpu_sgt *nvgpu_sgt_create_from_mem(struct gk20a *g, struct nvgpu_mem *mem) { return nvgpu_linux_sgt_create(g, mem->priv.sgt); }