drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c- Extension
.c- Size
- 78930 bytes
- Lines
- 2802
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hdrv_types.hlinux/jiffies.hrtw_wifi_regd.h
Detected Declarations
function rtw_2g_channels_initfunction rtw_2g_rates_initfunction rtw_ieee80211_channel_to_frequencyfunction is_same_networkfunction cfg80211_get_bssfunction rtw_cfg80211_ibss_indicate_connectfunction rtw_cfg80211_indicate_connectfunction rtw_cfg80211_indicate_disconnectfunction rtw_cfg80211_ap_set_encryptionfunction rtw_cfg80211_set_encryptionfunction cfg80211_rtw_add_keyfunction cfg80211_rtw_get_keyfunction cfg80211_rtw_del_keyfunction cfg80211_rtw_set_default_keyfunction cfg80211_rtw_get_stationfunction check_fwstatefunction cfg80211_rtw_change_ifacefunction rtw_cfg80211_indicate_scan_donefunction rtw_cfg80211_unlink_bssfunction rtw_cfg80211_surveydone_event_callbackfunction rtw_cfg80211_set_probe_req_wpsp2piefunction cfg80211_rtw_scanfunction cfg80211_rtw_set_wiphy_paramsfunction rtw_cfg80211_set_wpa_versionfunction rtw_cfg80211_set_auth_typefunction rtw_cfg80211_set_cipherfunction rtw_cfg80211_set_key_mgtfunction rtw_cfg80211_set_wpa_iefunction cfg80211_rtw_join_ibssfunction cfg80211_rtw_leave_ibssfunction cfg80211_rtw_connectfunction cfg80211_rtw_disconnectfunction cfg80211_rtw_set_txpowerfunction cfg80211_rtw_get_txpowerfunction rtw_cfg80211_pwr_mgmtfunction cfg80211_rtw_set_power_mgmtfunction cfg80211_rtw_set_pmksafunction cfg80211_rtw_del_pmksafunction cfg80211_rtw_flush_pmksafunction rtw_cfg80211_indicate_sta_assocfunction rtw_cfg80211_indicate_sta_disassocfunction rtw_get_chan_typefunction cfg80211_rtw_get_channelfunction rtw_cfg80211_monitor_if_xmit_entryfunction rtw_cfg80211_add_monitor_iffunction cfg80211_rtw_add_virtual_intffunction cfg80211_rtw_del_virtual_intffunction rtw_add_beacon
Annotated Snippet
static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {
.ndo_start_xmit = rtw_cfg80211_monitor_if_xmit_entry,
};
static int rtw_cfg80211_add_monitor_if(struct adapter *padapter, char *name, struct net_device **ndev)
{
int ret = 0;
struct net_device *mon_ndev = NULL;
struct wireless_dev *mon_wdev = NULL;
struct rtw_netdev_priv_indicator *pnpi;
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(padapter);
if (!name) {
ret = -EINVAL;
goto out;
}
if (pwdev_priv->pmon_ndev) {
ret = -EBUSY;
goto out;
}
mon_ndev = alloc_etherdev(sizeof(struct rtw_netdev_priv_indicator));
if (!mon_ndev) {
ret = -ENOMEM;
goto out;
}
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
strscpy(mon_ndev->name, name);
mon_ndev->needs_free_netdev = true;
mon_ndev->priv_destructor = rtw_ndev_destructor;
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
pnpi = netdev_priv(mon_ndev);
pnpi->priv = padapter;
pnpi->sizeof_priv = sizeof(struct adapter);
/* wdev */
mon_wdev = kzalloc_obj(*mon_wdev);
if (!mon_wdev) {
ret = -ENOMEM;
goto out;
}
mon_wdev->wiphy = padapter->rtw_wdev->wiphy;
mon_wdev->netdev = mon_ndev;
mon_wdev->iftype = NL80211_IFTYPE_MONITOR;
mon_ndev->ieee80211_ptr = mon_wdev;
ret = cfg80211_register_netdevice(mon_ndev);
if (ret)
goto out;
*ndev = pwdev_priv->pmon_ndev = mon_ndev;
memcpy(pwdev_priv->ifname_mon, name, IFNAMSIZ + 1);
out:
if (ret && mon_wdev) {
kfree(mon_wdev);
mon_wdev = NULL;
}
if (ret && mon_ndev) {
free_netdev(mon_ndev);
*ndev = mon_ndev = NULL;
}
return ret;
}
static struct wireless_dev *
cfg80211_rtw_add_virtual_intf(
struct wiphy *wiphy,
const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type, struct vif_params *params)
{
int ret = 0;
struct net_device *ndev = NULL;
struct adapter *padapter = wiphy_to_adapter(wiphy);
switch (type) {
case NL80211_IFTYPE_ADHOC:
case NL80211_IFTYPE_AP_VLAN:
case NL80211_IFTYPE_WDS:
case NL80211_IFTYPE_MESH_POINT:
ret = -ENODEV;
break;
Annotation
- Immediate include surface: `linux/etherdevice.h`, `drv_types.h`, `linux/jiffies.h`, `rtw_wifi_regd.h`.
- Detected declarations: `function rtw_2g_channels_init`, `function rtw_2g_rates_init`, `function rtw_ieee80211_channel_to_frequency`, `function is_same_network`, `function cfg80211_get_bss`, `function rtw_cfg80211_ibss_indicate_connect`, `function rtw_cfg80211_indicate_connect`, `function rtw_cfg80211_indicate_disconnect`, `function rtw_cfg80211_ap_set_encryption`, `function rtw_cfg80211_set_encryption`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.