cregit-Linux how code gets into the kernel

Release 4.11 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c

/*
 * Copyright (c) 2010 Broadcom Corporation
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

/*
 * This is "two-way" interface, acting as the SHIM layer between driver
 * and PHY layer. The driver can optionally call this translation layer
 * to do some preprocessing, then reach PHY. On the PHY->driver direction,
 * all calls go through this layer since PHY doesn't have access to the
 * driver's brcms_hardware pointer.
 */
#include <linux/slab.h>
#include <net/mac80211.h>

#include "main.h"
#include "mac80211_if.h"
#include "phy_shim.h"

/* PHY SHIM module specific state */

struct phy_shim_info {
	
struct brcms_hardware *wlc_hw;	/* pointer to main wlc_hw structure */
	
struct brcms_c_info *wlc;	/* pointer to main wlc structure */
	
struct brcms_info *wl; /* pointer to os-specific private state */
};


struct phy_shim_info *wlc_phy_shim_attach(struct brcms_hardware *wlc_hw, struct brcms_info *wl, struct brcms_c_info *wlc) { struct phy_shim_info *physhim = NULL; physhim = kzalloc(sizeof(struct phy_shim_info), GFP_ATOMIC); if (!physhim) return NULL; physhim->wlc_hw = wlc_hw; physhim->wlc = wlc; physhim->wl = wl; return physhim; }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel71100.00%1100.00%
Total71100.00%1100.00%


void wlc_phy_shim_detach(struct phy_shim_info *physhim) { kfree(physhim); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel15100.00%1100.00%
Total15100.00%1100.00%


struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim, void (*fn)(struct brcms_phy *pi), void *arg, const char *name) { return (struct wlapi_timer *) brcms_init_timer(physhim->wl, (void (*)(void *))fn, arg, name); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel62100.00%1100.00%
Total62100.00%1100.00%


void wlapi_free_timer(struct wlapi_timer *t) { brcms_free_timer((struct brcms_timer *)t); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel20100.00%1100.00%
Total20100.00%1100.00%


void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic) { brcms_add_timer((struct brcms_timer *)t, ms, periodic); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel30100.00%1100.00%
Total30100.00%1100.00%


bool wlapi_del_timer(struct wlapi_timer *t) { return brcms_del_timer((struct brcms_timer *)t); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel21100.00%1100.00%
Total21100.00%1100.00%


void wlapi_intrson(struct phy_shim_info *physhim) { brcms_intrson(physhim->wl); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel17100.00%1100.00%
Total17100.00%1100.00%


u32 wlapi_intrsoff(struct phy_shim_info *physhim) { return brcms_intrsoff(physhim->wl); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel18100.00%1100.00%
Total18100.00%1100.00%


void wlapi_intrsrestore(struct phy_shim_info *physhim, u32 macintmask) { brcms_intrsrestore(physhim->wl, macintmask); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_bmac_write_shm(struct phy_shim_info *physhim, uint offset, u16 v) { brcms_b_write_shm(physhim->wlc_hw, offset, v); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel27100.00%1100.00%
Total27100.00%1100.00%


u16 wlapi_bmac_read_shm(struct phy_shim_info *physhim, uint offset) { return brcms_b_read_shm(physhim->wlc_hw, offset); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel23100.00%1100.00%
Total23100.00%1100.00%


void wlapi_bmac_mhf(struct phy_shim_info *physhim, u8 idx, u16 mask, u16 val, int bands) { brcms_b_mhf(physhim->wlc_hw, idx, mask, val, bands); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel37100.00%1100.00%
Total37100.00%1100.00%


void wlapi_bmac_corereset(struct phy_shim_info *physhim, u32 flags) { brcms_b_corereset(physhim->wlc_hw, flags); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_suspend_mac_and_wait(struct phy_shim_info *physhim) { brcms_c_suspend_mac_and_wait(physhim->wlc); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel17100.00%1100.00%
Total17100.00%1100.00%


void wlapi_switch_macfreq(struct phy_shim_info *physhim, u8 spurmode) { brcms_b_switch_macfreq(physhim->wlc_hw, spurmode); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_enable_mac(struct phy_shim_info *physhim) { brcms_c_enable_mac(physhim->wlc); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel17100.00%1100.00%
Total17100.00%1100.00%


void wlapi_bmac_mctrl(struct phy_shim_info *physhim, u32 mask, u32 val) { brcms_b_mctrl(physhim->wlc_hw, mask, val); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel27100.00%1100.00%
Total27100.00%1100.00%


void wlapi_bmac_phy_reset(struct phy_shim_info *physhim) { brcms_b_phy_reset(physhim->wlc_hw); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel17100.00%1100.00%
Total17100.00%1100.00%


void wlapi_bmac_bw_set(struct phy_shim_info *physhim, u16 bw) { brcms_b_bw_set(physhim->wlc_hw, bw); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim) { return brcms_b_get_txant(physhim->wlc_hw); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel18100.00%1100.00%
Total18100.00%1100.00%


void wlapi_bmac_phyclk_fgc(struct phy_shim_info *physhim, bool clk) { brcms_b_phyclk_fgc(physhim->wlc_hw, clk); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_bmac_macphyclk_set(struct phy_shim_info *physhim, bool clk) { brcms_b_macphyclk_set(physhim->wlc_hw, clk); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_bmac_core_phypll_ctl(struct phy_shim_info *physhim, bool on) { brcms_b_core_phypll_ctl(physhim->wlc_hw, on); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel22100.00%1100.00%
Total22100.00%1100.00%


void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim) { brcms_b_core_phypll_reset(physhim->wlc_hw); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel17100.00%1100.00%
Total17100.00%1100.00%


void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *physhim) { brcms_c_ucode_wake_override_set(physhim->wlc_hw, BRCMS_WAKE_OVERRIDE_PHYREG); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel19100.00%1100.00%
Total19100.00%1100.00%


void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *physhim) { brcms_c_ucode_wake_override_clear(physhim->wlc_hw, BRCMS_WAKE_OVERRIDE_PHYREG); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel19100.00%1100.00%
Total19100.00%1100.00%


void wlapi_bmac_write_template_ram(struct phy_shim_info *physhim, int offset, int len, void *buf) { brcms_b_write_template_ram(physhim->wlc_hw, offset, len, buf); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel33100.00%1100.00%
Total33100.00%1100.00%


u16 wlapi_bmac_rate_shm_offset(struct phy_shim_info *physhim, u8 rate) { return brcms_b_rate_shm_offset(physhim->wlc_hw, rate); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel23100.00%1100.00%
Total23100.00%1100.00%


void wlapi_ucode_sample_init(struct phy_shim_info *physhim) { }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel9100.00%1100.00%
Total9100.00%1100.00%


void wlapi_copyfrom_objmem(struct phy_shim_info *physhim, uint offset, void *buf, int len, u32 sel) { brcms_b_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel38100.00%1100.00%
Total38100.00%1100.00%


void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint offset, const void *buf, int l, u32 sel) { brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel); }

Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel39100.00%1100.00%
Total39100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Arend Van Spriel829100.00%1100.00%
Total829100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.