drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c- Extension
.c- Size
- 12633 bytes
- Lines
- 501
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drv_types.h
Detected Declarations
function Copyrightfunction rtw_validate_ssidfunction rtw_do_joinfunction rtw_set_802_11_ssidfunction rtw_set_802_11_connectfunction rtw_set_802_11_infrastructure_modefunction rtw_set_802_11_disassociatefunction rtw_set_802_11_bssid_list_scanfunction rtw_set_802_11_authentication_modefunction rtw_set_802_11_add_wepfunction rtw_get_cur_max_rate
Annotated Snippet
if (!pmlmepriv->link_detect_info.busy_traffic || rtw_to_roam(padapter) > 0) {
/* submit site_survey_cmd */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
if (ret != _SUCCESS)
pmlmepriv->to_join = false;
} else {
pmlmepriv->to_join = false;
ret = _FAIL;
}
goto exit;
} else {
int select_ret;
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
select_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
if (select_ret == _SUCCESS) {
pmlmepriv->to_join = false;
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
} else {
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
/* submit createbss_cmd to change to a ADHOC_MASTER */
/* pmlmepriv->lock has been acquired by caller... */
struct wlan_bssid_ex *pdev_network = &(padapter->registrypriv.dev_network);
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
pibss = padapter->registrypriv.dev_network.mac_address;
memcpy(&pdev_network->ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
rtw_update_registrypriv_dev_network(padapter);
rtw_generate_random_ibss(pibss);
if (rtw_createbss_cmd(padapter) != _SUCCESS) {
ret = false;
goto exit;
}
pmlmepriv->to_join = false;
} else {
/* can't associate ; reset under-linking */
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
/* when set_ssid/set_bssid for rtw_do_join(), but there are no desired bss in scanning queue */
/* we try to issue sitesurvey firstly */
if (!pmlmepriv->link_detect_info.busy_traffic ||
rtw_to_roam(padapter) > 0) {
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
if (ret != _SUCCESS)
pmlmepriv->to_join = false;
} else {
ret = _FAIL;
pmlmepriv->to_join = false;
}
}
}
}
exit:
return ret;
}
u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
{
u8 status = _SUCCESS;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *pnetwork = &pmlmepriv->cur_network;
netdev_dbg(padapter->pnetdev, "set ssid [%s] fw_state = 0x%08x\n",
ssid->ssid, get_fwstate(pmlmepriv));
if (padapter->hw_init_completed == false) {
status = _FAIL;
goto exit;
}
spin_lock_bh(&pmlmepriv->lock);
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
goto handle_tkip_countermeasure;
else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
Annotation
- Immediate include surface: `drv_types.h`.
- Detected declarations: `function Copyright`, `function rtw_validate_ssid`, `function rtw_do_join`, `function rtw_set_802_11_ssid`, `function rtw_set_802_11_connect`, `function rtw_set_802_11_infrastructure_mode`, `function rtw_set_802_11_disassociate`, `function rtw_set_802_11_bssid_list_scan`, `function rtw_set_802_11_authentication_mode`, `function rtw_set_802_11_add_wep`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.