~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise-proposed

« back to all changes in this revision

Viewing changes to drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Luke Yelavich, Upstream Kernel Changes
  • Date: 2012-04-04 18:49:36 UTC
  • Revision ID: package-import@ubuntu.com-20120404184936-tqu735914muv4wpg
Tags: 3.2.0-22.30
[ Luke Yelavich ]

* [Config] Update configs after rebase against Ubuntu-3.2.0-22.35

[ Upstream Kernel Changes ]

* Low-latency: Rebase against Ubuntu-3.2.0-22.35

Show diffs side-by-side

added added

removed removed

Lines of Context:
761
761
        struct bnx2x *bp = netdev_priv(dev);
762
762
        u8 phy_fw_ver[PHY_FW_VER_LEN];
763
763
 
764
 
        strcpy(info->driver, DRV_MODULE_NAME);
765
 
        strcpy(info->version, DRV_MODULE_VERSION);
 
764
        strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
 
765
        strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
766
766
 
767
767
        phy_fw_ver[0] = '\0';
768
768
        if (bp->port.pmf) {
773
773
                bnx2x_release_phy_lock(bp);
774
774
        }
775
775
 
776
 
        strncpy(info->fw_version, bp->fw_ver, 32);
 
776
        strlcpy(info->fw_version, bp->fw_ver, sizeof(info->fw_version));
777
777
        snprintf(info->fw_version + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
778
778
                 "bc %d.%d.%d%s%s",
779
779
                 (bp->common.bc_ver & 0xff0000) >> 16,
780
780
                 (bp->common.bc_ver & 0xff00) >> 8,
781
781
                 (bp->common.bc_ver & 0xff),
782
782
                 ((phy_fw_ver[0] != '\0') ? " phy " : ""), phy_fw_ver);
783
 
        strcpy(info->bus_info, pci_name(bp->pdev));
 
783
        strlcpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info));
784
784
        info->n_stats = BNX2X_NUM_STATS;
785
785
        info->testinfo_len = BNX2X_NUM_TESTS;
786
786
        info->eedump_len = bp->common.flash_size;