drivers/net/wireless/intersil/p54/main.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/intersil/p54/main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/intersil/p54/main.c- Extension
.c- Size
- 21723 bytes
- Lines
- 870
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
linux/slab.hlinux/firmware.hlinux/etherdevice.hlinux/module.hnet/mac80211.hp54.hlmac.h
Detected Declarations
function p54_sta_add_removefunction p54_sta_notifyfunction p54_set_timfunction p54_beacon_format_ie_timfunction p54_beacon_updatefunction p54_startfunction p54_stopfunction p54_add_interfacefunction p54_remove_interfacefunction p54_wait_for_statsfunction p54_reset_statsfunction p54_configfunction p54_prepare_multicastfunction p54_configure_filterfunction p54_conf_txfunction p54_workfunction p54_get_statsfunction p54_bss_info_changedfunction p54_set_keyfunction p54_get_surveyfunction p54_flush_countfunction p54_flushfunction p54_set_coverage_classfunction p54_register_commonfunction p54_free_commonfunction p54_unregister_commonexport p54_init_commonexport p54_register_commonexport p54_free_commonexport p54_unregister_common
Annotated Snippet
if (ret) {
priv->curchan = oldchan;
goto out;
}
/*
* TODO: Use the LM_SCAN_TRAP to determine the current
* operating channel.
*/
priv->curchan = priv->hw->conf.chandef.chan;
p54_reset_stats(priv);
WARN_ON(p54_fetch_statistics(priv));
}
if (changed & IEEE80211_CONF_CHANGE_PS) {
WARN_ON(p54_wait_for_stats(dev));
ret = p54_set_ps(priv);
if (ret)
goto out;
WARN_ON(p54_wait_for_stats(dev));
}
if (changed & IEEE80211_CONF_CHANGE_IDLE) {
WARN_ON(p54_wait_for_stats(dev));
ret = p54_setup_mac(priv);
if (ret)
goto out;
WARN_ON(p54_wait_for_stats(dev));
}
out:
mutex_unlock(&priv->conf_mutex);
return ret;
}
static u64 p54_prepare_multicast(struct ieee80211_hw *dev,
struct netdev_hw_addr_list *mc_list)
{
struct p54_common *priv = dev->priv;
struct netdev_hw_addr *ha;
int i;
BUILD_BUG_ON(ARRAY_SIZE(priv->mc_maclist) !=
ARRAY_SIZE(((struct p54_group_address_table *)NULL)->mac_list));
/*
* The first entry is reserved for the global broadcast MAC.
* Otherwise the firmware will drop it and ARP will no longer work.
*/
i = 1;
priv->mc_maclist_num = netdev_hw_addr_list_count(mc_list) + i;
netdev_hw_addr_list_for_each(ha, mc_list) {
memcpy(&priv->mc_maclist[i], ha->addr, ETH_ALEN);
i++;
if (i >= ARRAY_SIZE(priv->mc_maclist))
break;
}
return 1; /* update */
}
static void p54_configure_filter(struct ieee80211_hw *dev,
unsigned int changed_flags,
unsigned int *total_flags,
u64 multicast)
{
struct p54_common *priv = dev->priv;
*total_flags &= FIF_ALLMULTI | FIF_OTHER_BSS;
priv->filter_flags = *total_flags;
if (changed_flags & FIF_OTHER_BSS)
p54_setup_mac(priv);
if (changed_flags & FIF_ALLMULTI || multicast)
p54_set_groupfilter(priv);
}
static int p54_conf_tx(struct ieee80211_hw *dev,
struct ieee80211_vif *vif,
unsigned int link_id, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
struct p54_common *priv = dev->priv;
int ret;
mutex_lock(&priv->conf_mutex);
P54_SET_QUEUE(priv->qos_params[queue], params->aifs,
params->cw_min, params->cw_max, params->txop);
ret = p54_set_edcf(priv);
mutex_unlock(&priv->conf_mutex);
return ret;
}
Annotation
- Immediate include surface: `linux/slab.h`, `linux/firmware.h`, `linux/etherdevice.h`, `linux/module.h`, `net/mac80211.h`, `p54.h`, `lmac.h`.
- Detected declarations: `function p54_sta_add_remove`, `function p54_sta_notify`, `function p54_set_tim`, `function p54_beacon_format_ie_tim`, `function p54_beacon_update`, `function p54_start`, `function p54_stop`, `function p54_add_interface`, `function p54_remove_interface`, `function p54_wait_for_stats`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.