Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files62
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- Kconfig
- Makefile
- b43.h
- bus.c
- bus.h
- debugfs.c
- debugfs.h
- dma.c
- dma.h
- leds.c
- leds.h
- lo.c
- lo.h
- main.c
- main.h
- phy_a.h
- phy_ac.c
- phy_ac.h
- phy_common.c
- phy_common.h
- phy_g.c
- phy_g.h
- phy_ht.c
- phy_ht.h
- phy_lcn.c
- phy_lcn.h
- phy_lp.c
- phy_lp.h
- phy_n.c
- phy_n.h
- pio.c
- pio.h
- ppr.c
- ppr.h
- radio_2055.c
- radio_2055.h
- radio_2056.c
- radio_2056.h
- radio_2057.c
- radio_2057.h
- radio_2059.c
- radio_2059.h
- rfkill.c
- rfkill.h
- sdio.c
- sdio.h
- sysfs.c
- sysfs.h
- tables.c
- tables.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/net/wireless/broadcom/b43/phy_ac.c
C · 2,412 bytes/*
* Broadcom B43 wireless driver
* IEEE 802.11ac AC-PHY support
*
* Copyright (c) 2015 Rafał Miłecki <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#include "b43.h"
#include "phy_ac.h"
/**************************************************
* Basic PHY ops
**************************************************/
static int b43_phy_ac_op_allocate(struct b43_wldev *dev)
{
struct b43_phy_ac *phy_ac;
phy_ac = kzalloc(sizeof(*phy_ac), GFP_KERNEL);
if (!phy_ac)
return -ENOMEM;
dev->phy.ac = phy_ac;
return 0;
}
static void b43_phy_ac_op_free(struct b43_wldev *dev)
{
struct b43_phy *phy = &dev->phy;
struct b43_phy_ac *phy_ac = phy->ac;
kfree(phy_ac);
phy->ac = NULL;
}
static void b43_phy_ac_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask,
u16 set)
{
b43_write16f(dev, B43_MMIO_PHY_CONTROL, reg);
b43_write16(dev, B43_MMIO_PHY_DATA,
(b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set);
}
static u16 b43_phy_ac_op_radio_read(struct b43_wldev *dev, u16 reg)
{
b43_write16f(dev, B43_MMIO_RADIO24_CONTROL, reg);
return b43_read16(dev, B43_MMIO_RADIO24_DATA);
}
static void b43_phy_ac_op_radio_write(struct b43_wldev *dev, u16 reg,
u16 value)
{
b43_write16f(dev, B43_MMIO_RADIO24_CONTROL, reg);
b43_write16(dev, B43_MMIO_RADIO24_DATA, value);
}
static unsigned int b43_phy_ac_op_get_default_chan(struct b43_wldev *dev)
{
if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
return 11;
return 36;
}
static enum b43_txpwr_result
b43_phy_ac_op_recalc_txpower(struct b43_wldev *dev, bool ignore_tssi)
{
return B43_TXPWR_RES_DONE;
}
static void b43_phy_ac_op_adjust_txpower(struct b43_wldev *dev)
{
}
/**************************************************
* PHY ops struct
**************************************************/
const struct b43_phy_operations b43_phyops_ac = {
.allocate = b43_phy_ac_op_allocate,
.free = b43_phy_ac_op_free,
.phy_maskset = b43_phy_ac_op_maskset,
.radio_read = b43_phy_ac_op_radio_read,
.radio_write = b43_phy_ac_op_radio_write,
.get_default_chan = b43_phy_ac_op_get_default_chan,
.recalc_txpower = b43_phy_ac_op_recalc_txpower,
.adjust_txpower = b43_phy_ac_op_adjust_txpower,
};