From patchwork Thu Apr 22 18:20:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 425879 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp602604jao; Thu, 22 Apr 2021 11:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYgpbTZcmgPrMEIr5bi9g9HR3aruzdo330xZ/KC5dIPQgVMunMQg9MdQbAuCGtHzrN0gVJ X-Received: by 2002:a63:4512:: with SMTP id s18mr4819303pga.275.1619115664210; Thu, 22 Apr 2021 11:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619115664; cv=none; d=google.com; s=arc-20160816; b=sqsRGVZ6hvai4iqPEUGabWFzWshHo0WHs/SpAOSa9Qs5Wx3s01OoWVIaqQUrebBojz qLLTwL0NR2UyiEXtr2s4xTEK+xhUyGAuLXXUEcCBsScpx9DJKbG9axnWrynpsCA0MCz0 hXoo27V5LuWQ8BeDBGM4nsvBS4cEKQm5sr+7u/ddqNCM4KsMMNVbw05RsIFFuVr/dc25 ZPBn2Zxd4DwFWsQ9SmFQSctR0cGkGqv/TS+v1W4gvYZEh7yOOnzFSZtl2oBbt4/0S2gi nGRzs7uBNdnKJF5n91eU9rHzt9clrXhexeU2h+CEggRhhXuRpauUkt5NQNe6Gdg2rbWP uUiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4P/Z0BjOeHd7Em2QyQWG2wZNocvEtZNBkiauwY2SGp4=; b=BIsyWLnAPOrrlL70bJjV+j+zB3WHGLbONhywyozhEAGF4YsvjfYo1+iox6wdZ398Qt C8Tvpvfqvf8q5fKmKyZd6Cwid4Ql0MahdTPUJWqgkuom4IPoyRVuEvjgpF8cOkR576Gw kQCLS8CKKpZBz5tYDkJ91uIrIPl6Fxtux4NTBMoOR32ZIZ6eqagAW9VmCGayLJwCoTPl +Xob1ISWyXpFCnpOl3dLq0gj95WpYrO2aEudogr8V6OCJ0a1jsNhXie9822+rzqd1Wqt 76J1WP4VyiipY0EJcL68RKT4lduRYT+CvMZz6zAiV+UZjI1HrvlsTqZVF+dmdJcxTHn+ TjNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T2QemxN7; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n17si4275021plf.49.2021.04.22.11.21.03; Thu, 22 Apr 2021 11:21:04 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T2QemxN7; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236287AbhDVSV2 (ORCPT + 8 others); Thu, 22 Apr 2021 14:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236668AbhDVSVX (ORCPT ); Thu, 22 Apr 2021 14:21:23 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436DAC06174A for ; Thu, 22 Apr 2021 11:20:47 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id d25so9202982oij.5 for ; Thu, 22 Apr 2021 11:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4P/Z0BjOeHd7Em2QyQWG2wZNocvEtZNBkiauwY2SGp4=; b=T2QemxN7ttWSae0PyiMiwtcUsKIi+8bf2p2e6clu7ex0nD0XDo38eaQv5SjyJB4arN cucbglVUchz/JTtFxienPnQ52W/KVEjL6yXRHfV/+Je1s/Te32ZGD9LHLuGQolhSoqgk iJZ/SzO7lUTHtRbzzP7HLmnUwcmLAv4Gya+G0Pxws88KUP9Mg2h7RNTDdZd6TvSZS0bh dXYjqaXnxAP2u2shvNG/jy0Uz8jgw7WbFJh9N5pg5PQn4qACG5MLRTvsNP8CMsTVtmcQ sGnWPittx31cy6pwqiA4hmzJRexjQ9cCEChc3BqVRG9zrxQEc9jxJJVTEgknpLLL7rVx bRGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4P/Z0BjOeHd7Em2QyQWG2wZNocvEtZNBkiauwY2SGp4=; b=B3lKK3abOYUu2Zs+QRqs7z/2FcqIfVMw5lxsN6bHJ2pzlgk+1oUjIuP/lEYNrAVOwK 45y14ICpkAsfguqnwnERn9XuZYqy3NLRLRJnnu7sgeXznaDwfYzvUF+A5Ot4zghq46lY iIampeZV3m9QnKw99pYF+cRyeHuAqAJYVoApiKkbshx0jNAm6ZNAHXBdYmb/LoC12dUA jQrBTdiD5nC0sQICHYlw3o85VB4eZD2lNi1GR0xAA27hr7DRswsFxPm45G5sOsZvC6aG ZTcugRe4xOfUy2t8fqHKDY7G7gPrzQ+/A0il3XNJE948fM1jkzFYQGyzuZZbgr1KqR7U se+A== X-Gm-Message-State: AOAM5322wEI7m90nMduCN+vV5C7zdPmgJcDDSlC3ZkydGLpfhzsoHCVn hn1srcN3CzXQs5QpEI3Kq7IJJg== X-Received: by 2002:aca:fdc7:: with SMTP id b190mr3175938oii.14.1619115646623; Thu, 22 Apr 2021 11:20:46 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id r9sm711634ool.3.2021.04.22.11.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 11:20:46 -0700 (PDT) From: Bjorn Andersson To: Subash Abhinov Kasiviswanathan , Sean Tranchetti , "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Daniele Palmas , Alex Elder , Aleksander Morgado , Loic Poulain Subject: [PATCH] net: qualcomm: rmnet: Allow partial updates of IFLA_FLAGS Date: Thu, 22 Apr 2021 13:20:45 -0500 Message-Id: <20210422182045.1040966-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The idiomatic way to handle the changelink flags/mask pair seems to be allow partial updates of the driver's link flags. In contrast the rmnet driver masks the incoming flags and then use that as the new flags. Change the rmnet driver to follow the common scheme, before the introduction of IFLA_RMNET_FLAGS handling in iproute2 et al. Signed-off-by: Bjorn Andersson --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.31.0 Reviewed-by: Alex Elder diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c index 8d51b0cb545c..2c8db2fcc53d 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c @@ -336,7 +336,8 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[], old_data_format = port->data_format; flags = nla_data(data[IFLA_RMNET_FLAGS]); - port->data_format = flags->flags & flags->mask; + port->data_format &= ~flags->mask; + port->data_format |= flags->flags & flags->mask; if (rmnet_vnd_update_dev_mtu(port, real_dev)) { port->data_format = old_data_format;