wapi: fix nxstyle warning

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2020-04-03 13:59:50 +08:00 committed by Abdelatif Guettouche
parent 6ab29d4ffb
commit 7cb5bc3b76
4 changed files with 25 additions and 18 deletions

View File

@ -6,8 +6,8 @@
* Author: Simon Piriou <spiriou31@gmail.com> * Author: Simon Piriou <spiriou31@gmail.com>
* Gregory Nutt <gnutt@nuttx.org> * Gregory Nutt <gnutt@nuttx.org>
* *
* Adapted for NuttX from the driver_ext.c of WPA suplicant written originally * Adapted for NuttX from the driver_ext.c of WPA suplicant written
* by Jouni Malinen * originally by Jouni Malinen
* *
* Copyright (c) 2003-2015, Jouni Malinen <j@w1.fi> * Copyright (c) 2003-2015, Jouni Malinen <j@w1.fi>
* *
@ -41,10 +41,11 @@
****************************************************************************/ ****************************************************************************/
/* This file implements a driver interface for the Linux Wireless Extensions. /* This file implements a driver interface for the Linux Wireless Extensions.
* When used with WE-18 or newer, this interface can be used as-is with number * When used with WE-18 or newer, this interface can be used as-is with
* of drivers. In addition to this, some of the common functions in this file * number of drivers. In addition to this, some of the common functions
* can be used by other driver interface implementations that use generic WE * in this file can be used by other driver interface implementations that
* ioctls, but require private ioctls for some of the functionality. * use generic WE ioctls, but require private ioctls for some of the
* functionality.
*/ */
/**************************************************************************** /****************************************************************************
@ -443,7 +444,8 @@ void wpa_driver_wext_disconnect(int sockfd, FAR const char *ifname)
ssid[i] = rand() & 0xff; ssid[i] = rand() & 0xff;
} }
if (wapi_set_essid(sockfd, ifname, (FAR const char *)ssid, WAPI_ESSID_OFF) < 0) if (wapi_set_essid(sockfd, ifname,
(FAR const char *)ssid, WAPI_ESSID_OFF) < 0)
{ {
nerr("WEXT: Failed to set bogus " "SSID to disconnect\n"); nerr("WEXT: Failed to set bogus " "SSID to disconnect\n");
} }

View File

@ -10,10 +10,11 @@
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions
* are met:
* *
* - Redistributions of source code must retain the above copyright notice, * - Redistributions of source code must retain the above copyright
* this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* *
* - Redistributions in binary form must reproduce the above copyright * - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the

View File

@ -11,10 +11,11 @@
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions
* are met:
* *
* - Redistributions of source code must retain the above copyright notice, * - Redistributions of source code must retain the above copyright
* this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* *
* - Redistributions in binary form must reproduce the above copyright * - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the

View File

@ -10,10 +10,11 @@
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are
* met:
* *
* - Redistributions of source code must retain the above copyright notice, * - Redistributions of source code must retain the above copyright
* this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* *
* - Redistributions in binary form must reproduce the above copyright * - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
@ -151,7 +152,8 @@ static inline double wapi_freq2float(const struct iw_freq *freq)
* Name: wapi_float2freq * Name: wapi_float2freq
* *
* Description: * Description:
* Converts a floating point the our internal representation of frequencies. * Converts a floating point the our internal representation of
* frequencies.
* *
****************************************************************************/ ****************************************************************************/
@ -1061,7 +1063,8 @@ int wapi_get_txpower(int sock, FAR const char *ifname, FAR int *power,
{ {
*flag = WAPI_TXPOWER_MWATT; *flag = WAPI_TXPOWER_MWATT;
} }
else if (IW_TXPOW_RELATIVE == (wrq.u.txpower.flags & IW_TXPOW_RELATIVE)) else if (IW_TXPOW_RELATIVE ==
(wrq.u.txpower.flags & IW_TXPOW_RELATIVE))
{ {
*flag = WAPI_TXPOWER_RELATIVE; *flag = WAPI_TXPOWER_RELATIVE;
} }