Description: rk3568 ap failed

Feature or Bugfix: Feature
Binary Source: No

Signed-off-by: jiachanglin <jiachanglin@huawei.com>
This commit is contained in:
jiachanglin
2022-03-10 08:58:35 +00:00
parent ccd5245c80
commit 3220ac4fdd
2 changed files with 16 additions and 17 deletions
@@ -295,7 +295,7 @@ static int32_t WifiCmdStopAp(const RequestContext *context, struct HdfSBuf *reqD
static int32_t WifiCmdChangeBeacon(const RequestContext *context, struct HdfSBuf *reqData, struct HdfSBuf *rspData)
{
struct NetDevice *netdev = NULL;
WifiApSetting *apSettings = NULL;
WifiApSetting apSettings;
const char *ifName = NULL;
(void)context;
(void)rspData;
@@ -308,19 +308,19 @@ static int32_t WifiCmdChangeBeacon(const RequestContext *context, struct HdfSBuf
HDF_LOGE("%s: %s!ParamName=%s", __func__, ERROR_DESC_READ_REQ_FAILED, "ifName");
return HDF_FAILURE;
}
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings->beaconData.head), &(apSettings->beaconData.headLen))) {
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings.beaconData.head), &(apSettings.beaconData.headLen))) {
HDF_LOGE("%s: %s!ParamName=%s", __func__, ERROR_DESC_READ_REQ_FAILED, "head");
return HDF_FAILURE;
}
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings->beaconData.tail), &(apSettings->beaconData.tailLen))) {
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings.beaconData.tail), &(apSettings.beaconData.tailLen))) {
HDF_LOGE("%s: %s!ParamName=%s", __func__, ERROR_DESC_READ_REQ_FAILED, "tail");
return HDF_FAILURE;
}
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings->ssid), &(apSettings->ssidLen))) {
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings.ssid), &(apSettings.ssidLen))) {
HDF_LOGE("%s: %s!ParamName=%s", __func__, ERROR_DESC_READ_REQ_FAILED, "ssid");
return HDF_FAILURE;
}
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings->meshSsid), &(apSettings->meshSsidLen))) {
if (!HdfSbufReadBuffer(reqData, (const void **)&(apSettings.meshSsid), &(apSettings.meshSsidLen))) {
HDF_LOGE("%s: %s!ParamName=%s", __func__, ERROR_DESC_READ_REQ_FAILED, "meshSsid");
return HDF_FAILURE;
}
@@ -329,7 +329,7 @@ static int32_t WifiCmdChangeBeacon(const RequestContext *context, struct HdfSBuf
HDF_LOGE("%s:netdev not found!ifName=%s", __func__, ifName);
return HDF_FAILURE;
}
return ChangeBeacon(netdev, apSettings);
return ChangeBeacon(netdev, &apSettings);
}
static int32_t WifiCmdStaRemove(const RequestContext *context, struct HdfSBuf *reqData, struct HdfSBuf *rspData)
+10 -11
View File
@@ -10,7 +10,6 @@
#define HDF_WIFI_CMD_H
#include "hdf_base.h"
#include <stddef.h>
#include "net_device.h"
#include "hdf_device_desc.h"
#include "hdf_sbuf.h"
@@ -163,7 +162,7 @@ typedef struct {
typedef struct {
int32_t reassoc;
size_t ieLen;
uint32_t ieLen;
uint8_t *ie;
uint8_t macAddr[ETH_ADDR_LEN];
uint8_t resv[2];
@@ -185,14 +184,14 @@ typedef struct {
typedef struct {
uint32_t freq;
size_t dataLen;
uint32_t dataLen;
uint8_t *data;
uint64_t *cookie;
} WifiMlmeData;
typedef struct {
size_t headLen;
size_t tailLen;
uint32_t headLen;
uint32_t tailLen;
uint8_t *head;
uint8_t *tail;
} WifiBeaconData;
@@ -202,7 +201,7 @@ typedef struct {
uint8_t *src;
uint8_t *bssid;
uint8_t *data;
size_t dataLen;
uint32_t dataLen;
} WifiActionData;
typedef struct {
@@ -275,13 +274,13 @@ typedef struct {
typedef struct {
WifiFreqParams freqParams;
WifiBeaconData beaconData;
size_t ssidLen;
uint32_t ssidLen;
int32_t beaconInterval;
int32_t dtimPeriod;
uint8_t *ssid;
uint8_t hiddenSsid;
uint8_t authType;
size_t meshSsidLen;
uint32_t meshSsidLen;
uint8_t *meshSsid;
} WifiApSetting;
@@ -331,7 +330,7 @@ typedef struct {
typedef struct {
uint8_t ssid[MAX_SSID_LEN];
size_t ssidLen;
uint32_t ssidLen;
} WifiDriverScanSsid;
typedef struct {
@@ -389,9 +388,9 @@ typedef struct {
typedef struct {
uint8_t *reqIe;
size_t reqIeLen;
uint32_t reqIeLen;
uint8_t *respIe;
size_t respIeLen;
uint32_t respIeLen;
uint8_t bssid[ETH_ADDR_LEN];
uint8_t rsv[2];
uint16_t status;