diff --git a/core/hdd/inc/wlan_hdd_softap_tx_rx.h b/core/hdd/inc/wlan_hdd_softap_tx_rx.h index 5501fd945749..06a81fd23b6a 100644 --- a/core/hdd/inc/wlan_hdd_softap_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_softap_tx_rx.h @@ -42,9 +42,20 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, void hdd_softap_tx_timeout(struct net_device *dev); QDF_STATUS hdd_softap_init_tx_rx(struct hdd_adapter *adapter); QDF_STATUS hdd_softap_deinit_tx_rx(struct hdd_adapter *adapter); + +/** + * hdd_softap_init_tx_rx_sta() - Initialize tx/rx for a softap station + * @adapter: pointer to adapter context + * @sta_id: Station ID to initialize + * @sta_mac: pointer to the MAC address of the station + * + * Return: QDF_STATUS_E_FAILURE if any errors encountered, + * QDF_STATUS_SUCCESS otherwise + */ QDF_STATUS hdd_softap_init_tx_rx_sta(struct hdd_adapter *adapter, - uint8_t STAId, - struct qdf_mac_addr *pmacAddrSTA); + uint8_t sta_id, + struct qdf_mac_addr *sta_mac); + QDF_STATUS hdd_softap_deinit_tx_rx_sta(struct hdd_adapter *adapter, uint8_t STAId); diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 73899fce9e3f..ed46379d732f 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -630,32 +630,23 @@ QDF_STATUS hdd_softap_deinit_tx_rx(struct hdd_adapter *adapter) return QDF_STATUS_SUCCESS; } -/** - * hdd_softap_init_tx_rx_sta() - Initialize tx/rx for a softap station - * @adapter: pointer to adapter context - * @STAId: Station ID to initialize - * @pmacAddrSTA: pointer to the MAC address of the station - * - * Return: QDF_STATUS_E_FAILURE if any errors encountered, - * QDF_STATUS_SUCCESS otherwise - */ QDF_STATUS hdd_softap_init_tx_rx_sta(struct hdd_adapter *adapter, - uint8_t STAId, - struct qdf_mac_addr *pmacAddrSTA) + uint8_t sta_id, + struct qdf_mac_addr *sta_mac) { spin_lock_bh(&adapter->staInfo_lock); - if (adapter->aStaInfo[STAId].in_use) { + if (adapter->aStaInfo[sta_id].in_use) { spin_unlock_bh(&adapter->staInfo_lock); - hdd_err("Reinit of in use station %d", STAId); + hdd_err("Reinit of in use station %d", sta_id); return QDF_STATUS_E_FAILURE; } - qdf_mem_zero(&adapter->aStaInfo[STAId], + qdf_mem_zero(&adapter->aStaInfo[sta_id], sizeof(struct hdd_station_info)); - adapter->aStaInfo[STAId].in_use = true; - adapter->aStaInfo[STAId].is_deauth_in_progress = false; - qdf_copy_macaddr(&adapter->aStaInfo[STAId].macAddrSTA, pmacAddrSTA); + adapter->aStaInfo[sta_id].in_use = true; + adapter->aStaInfo[sta_id].is_deauth_in_progress = false; + qdf_copy_macaddr(&adapter->aStaInfo[sta_id].macAddrSTA, sta_mac); spin_unlock_bh(&adapter->staInfo_lock); return QDF_STATUS_SUCCESS;